<?php
/**
 * The template for displaying woocommerce pages
 *
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package StoreZ 
 */
$full_width_class ='';
if(is_product()){
	$sidebar = 'product';
}else{
	$sidebar = 'shop';
}
$layout ='';
$layout_class ='';

$layout =  get_theme_mod( 'storez_shop_index_layout', 'left');
$layout_class = ($layout == 'full')?'full-width':(($layout == 'left')?'left-sidebar order-last':'left-sidebar order-first');

if(is_product()){
	$layout =  get_theme_mod( 'storez_shop_single_product_layout', 'full');
	$layout_class = ($layout == 'full')?'full-width':(($layout == 'left')?'left-sidebar order-last':'left-sidebar order-first');
}



$woocommerce_breadcrumb_args = array(
		'delimiter' => ' <i class="fa fa-angle-right "></i> ',
);

get_header(); 
do_action( 'storez_before_shop');
?>
<div class="container-full space blog-post-index">
	<div class="container">
		<div id="primary" class="content-area row justify-content-center woocommerce-container">
			<main id="main" class="site-main wc-site-main <?php echo esc_attr( $layout_class );?>">
				<div class="wc-content">
					<?php if ( have_posts() ) : ?>
	                    <?php 
	                     	woocommerce_content();
	                     ?>
	                <?php endif; ?>
				</div>
				<div class="clear"></div>
			</main><!-- #main -->
			<?php 
				if($layout != 'full'){
					get_sidebar($sidebar); 
				}
			?>
		</div><!-- #primary -->
	</div>
</div>
<?php
get_footer();