<?php
/**
 * Template Name: WooCommerce Template
 *
 * This template is used to display WooCommerce pages.
 *
 * @package GrShop
 */

$grshop_grocery_column = is_active_sidebar('grshop-grocery-woocommerce-sidebar') ? 'col-lg-9' : 'col-12';

get_header();
?>
<div class="grshop-grocery-woocommerce-page grshop-grocery-page">
    <div class="container">
        <div class="row">
            <div class="<?php echo $grshop_grocery_column;?>">
                <!-- Main Content Area -->
                <main id="main" class="site-main">
                    <?php woocommerce_content(); ?>
                </main>
                <!-- End Main Content Area -->
            </div>
            <?php if (is_active_sidebar('grshop-grocery-woocommerce-sidebar')) : ?>
            <div class="col-lg-3 col-12">
                <!-- Sidebar -->
                <aside id="secondary" class="sidebar">               
                    <div class="widget-area">
                        <?php dynamic_sidebar('grshop-grocery-woocommerce-sidebar'); ?>
                    </div>
                </aside>
                <!-- End Sidebar -->
            </div>
            <?php endif; ?>
        </div>
    </div>
</div>

<?php
get_footer();
?>
