<?php get_header(); 
global $post, $pixomi_data;
$woo_single_layout = $pixomi_data['woo_single_layout'];
$woo_product_columns = $pixomi_data['woo_product_columns'];
$header_layout  = pixomi_choose_header(); 

// Woo Single Layout
if($woo_single_layout == 'right_sidebar'){
    $woo_single_layout_class = 'right-sidebar col-lg-9 col-md-9 col-sm-12'; }
elseif($woo_single_layout == 'left_sidebar'){
    $woo_single_layout_class = 'left-sidebar col-lg-9 col-md-9 col-sm-12'; }
elseif($woo_single_layout == 'fullwidth'){
    $woo_single_layout_class = 'col-xs-12'; }
else{ $woo_single_layout_class = 'right-sidebar col-lg-9 col-md-9 col-sm-12'; } 

// Woo Shop Layout
$woo_shop_layout = $pixomi_data['woo_shop_layout'];
if($woo_shop_layout == 'right_sidebar'){
    $woo_shop_layout_class = 'right-sidebar col-lg-9 col-md-9 col-sm-12'; }
elseif($woo_shop_layout == 'left_sidebar'){
    $woo_shop_layout_class = 'left-sidebar col-lg-9 col-md-9 col-sm-12'; }
elseif($woo_shop_layout == 'fullwidth'){
    $woo_shop_layout_class = 'col-xs-12'; }
else{ $woo_shop_layout_class = 'right-sidebar col-lg-9 col-md-9 col-sm-12'; } 

// Header Layout
if($header_layout == '2'){
    $header_class = 'content-modern'; 
} elseif($header_layout == '3'){
    $header_class = 'content-trans'; 
} elseif($header_layout == '5'){
    $header_class = 'content-stack'; 
} else{ $header_class = ''; } ?>

<?php if(is_product()){
get_template_part( 'functions/titlebar' ); ?> 
<div id="main-content" class="<?php echo esc_attr( $header_class ); ?>">
    <div class="container">
        <div class="row">
            <div class="<?php echo esc_attr( $woo_single_layout_class ); ?>">             
                <?php woocommerce_content(); ?>
            </div>
            <?php if($woo_single_layout == 'right_sidebar' || $woo_single_layout == 'left_sidebar' ){ ?>
            <div id="sidebar" class="col-lg-3 col-md-3 col-sm-12" role="complementary">
                <?php dynamic_sidebar( 'pixomi-shop_sidebar' ); ?>
            </div>
            <?php } ?>
        </div>
    </div>
</div>
<?php } else{ ?> 
<div id="main-content" class="<?php echo esc_attr( $header_class ); ?>">
    <div class="container">
        <div class="row">
            <div class="<?php echo esc_attr( $woo_shop_layout_class ); ?> <?php if(!is_product()){ echo esc_attr( $woo_product_columns ); } ?>">             
                <?php woocommerce_content(); ?>
            </div>
            <?php if($woo_shop_layout == 'right_sidebar' || $woo_shop_layout == 'left_sidebar' ){ ?>
            <div id="sidebar" class="col-lg-3 col-md-3 col-sm-12" role="complementary">
                <?php dynamic_sidebar( 'pixomi-shop_sidebar' ); ?>
            </div>
            <?php } ?>        
        </div>
    </div>
</div>
<?php } ?>
<?php get_footer(); ?>
