<?php
/**
 * Single Product Template
 *
 * @see https://woocommerce.com/document/template-structure/
 * @package WooCommerce\Templates
 */

defined( 'ABSPATH' ) || exit;

$blog_reflection_enable_single_product_details = get_theme_mod(
    'single_shop_page_layout',
    'rtl'
);

get_header( 'shop' );
?>

<div class="container">
    <div class="row">

        <?php
        // LEFT SIDEBAR
        if ( $blog_reflection_enable_single_product_details === 'ltl' ) {
            do_action( 'woocommerce_sidebar' );
        }

        // CONTENT COLUMN
        if ( $blog_reflection_enable_single_product_details === 'no-sidebar' ) :
        ?>
            <div class="col-12">
        <?php else : ?>
            <div class="col-xxl-8 col-lg-7">
        <?php endif; ?>

                <?php
                /**
                 * Hook: woocommerce_before_main_content
                 * @hooked woocommerce_output_content_wrapper - 10
                 * @hooked woocommerce_breadcrumb - 20
                 */
                do_action( 'woocommerce_before_main_content' );
                ?>

                <?php
                while ( have_posts() ) :
                    the_post();
                    wc_get_template_part( 'content', 'single-product' );
                endwhile;
                ?>

                <?php
                /**
                 * Hook: woocommerce_after_main_content
                 * @hooked woocommerce_output_content_wrapper_end - 10
                 */
                do_action( 'woocommerce_after_main_content' );
                ?>

            </div>

        <?php
        // RIGHT SIDEBAR
        if ( $blog_reflection_enable_single_product_details === 'rtl' ) {
            do_action( 'woocommerce_sidebar' );
        }
        ?>

    </div>
</div>

<?php
get_footer( 'shop' );
