
<div class="container">
	

	<div class="col-sm-9 col-sm-push-3">
		<?php
/**
 * @package LZ Restaurant Premium
 */
if(get_theme_mod('lz_fitness_featured_section_disable') != 'on' ){
	wp_enqueue_script('slider', get_template_directory_uri().'/js/slider.js', array(), '1.1', true);
	?>
	<section id="featured-post-section" class="ht-section">
		<div class="lightbox">
			<div class="featured-posts-box">
				<div class="wow fadeInUp" data-wow-duration="1s">
					<?php
					$showStatic = true;
					for( $i = 1; $i < 4; $i++ ){
						$lz_fitness_featured_page_id = get_theme_mod('lz_fitness_featured_page'.$i); 
						if(!empty($lz_fitness_featured_page_id)){
							$showStatic = false;
							break;
						}
					}
			
					$lz_fitness_featured_title = get_theme_mod('lz_fitness_featured_title', 'FEATURED PRODUCTS');	
					
					?>
					<div class="row">
						<div class="ht-section-title-tagline">
							<h2 class="ht-section-title lz-featured-heading">
								<p>
								<?php
								if(!empty($lz_fitness_featured_title))	{
									echo ($lz_fitness_featured_title);
								} ?>
							</p>
							</h2>
						</div>
						<div class="clearfix"></div>
					</div>
					<div class="row">
						<button class="slide-prev ctrl-btn pro-prev fa fa-chevron-left"></button>
						<button class="ctrl-btn pro-next fa fa-chevron-right slide-next"></button>
						<!-- Wrapper for slides -->
						<div class="slider" id="slider">
							<div class="slides" id="slide">
					    <!-- <div class="row-fluid">
					    	<div class="recent-box">-->
					    		<?php
					    		if(function_exists('woocommerce_template_loop_add_to_cart') && function_exists('WC')){
					    			$args = array( 'post_type' => 'product', 'stock' => 1, 'posts_per_page' => 4, 'orderby' =>'date','order' => 'DESC' );
					    			$meta_query   = WC()->query->get_meta_query();
					    			$tax_query   = WC()->query->get_tax_query();
					    			$tax_query[] = array(
					    				'taxonomy' => 'product_visibility',
					    				'field'    => 'name',
					    				'terms'    => 'featured',
					    				'operator' => 'IN',
					    			);
					    			$args = array(
					    				'post_type'   =>  'product',
					    				'stock'       =>  1,
					    				'posts_per_page' => -1, 
					    				'orderby'     =>  'date',
					    				'order'       =>  'DESC',
					    				'meta_query'  =>  $meta_query,
					    				'tax_query'   => $tax_query,
					    			);
					    			$loop = new WP_Query( $args );
					    			if($loop->post_count > 0){
					    				while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
					    					<div class="col-md-3 slide-item featured-product fpost padding0"> 
					    						<div id="recent-porduct">
					    							<div class="pro-img text-center">
					    								<a id="id-<?php the_id(); ?>" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
					    									<?php if (has_post_thumbnail( $loop->post->ID )) 
					    									echo get_the_post_thumbnail($loop->post->ID, 'shop_catalog');
					    									else
					    										echo '<img src="'.get_template_directory_uri().'/images/default.png" alt="Placeholder" width="100%" height="200px" />'; ?>	
					    								</a>
					    							</div>
					    							<div class="total-product-title-wrap">
					    								<a id="id-<?php the_id(); ?>" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">	
					    									<h6><?php the_title(); ?></h6></a>
					    									<span class="price"><?php echo $product->get_price_html(); ?></span>
					    								</div>
					    								<div class="ht-featured-social-id"> 
					    									<ul>
					    									
					    										<li>
					    											<?php
					    											$product->is_icon = true;
					    											woocommerce_template_loop_add_to_cart( $product ); ?>
					    										</li>
					    										<li>
					    											<?php //do_action( 'woocommerce_after_shop_loop_item' ); ?>
					    											<a id="id-<?php the_id(); ?>" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><i class="fa fa-eye"></i></a>
					    										</li>
					    										
					    									</ul>
					    								</div>
					    							</div>
					    						</div><!-- /span3 -->
					    						<?php
					    					endwhile; 
					    				}else{ ?>
					    					<div class="alert alert-warning text-center">
					    						<strong>Sorry, no featured product to show.</strong>
					    					</div>
					    					<?php
					    				}
					    				?>
					    				<!-- </div>-->
					    				<!-- </div>-->
					    				<?php
					    				wp_reset_query(); 
					    			}else{ ?>
					    				<div class="alert alert-warning text-center">
					    					Kindly Install or Activate the WooCommerce plugin.
					    				</div>
					    				<?php
					    			}?>
					    		</div>
					    	</div><!-- /row-fluid -->
					    </div>
					</div>
				</div>
				<div class="clearfix"></div>

			</div>
		</section>
		<script>
	jQuery.noConflict();
	$(function(){
		function fpostHeight(){
			var ht = 0;
			$('#featured-post-section #recent-porduct').each(function(i){
				var tHt = $(this).height();
				if(ht<tHt){
					ht=tHt;
				}
			});
			$('#featured-post-section #recent-porduct').height(ht+'px');
		}
		fpostHeight();
	});
	$( window ).resize(function(){
		fpostHeight();
	});
</script>

	<?php }?>


	<!-- end feaured products section-->
	<?php
/**
 * @package LZ Restaurant Premium
 */
if(get_theme_mod('lz_fitness_premium_facility_section_disable') != 'on' ){
	wp_enqueue_script('slider', get_template_directory_uri().'/js/slider.js', array(), '1.1', true);
	?>
	<section id="recent-post-section" class="ht-section">
		<div class="lightbox">
			<div class="recent-posts-box">
				<div class="wow fadeInUp" data-wow-duration="1s">
					<?php
					$showStatic = true;
					for( $i = 1; $i < 4; $i++ ){
						$lz_fitness_facility_page_id = get_theme_mod('lz_fitness_facility_page'.$i); 
						if(!empty($lz_fitness_facility_page_id)){
							$showStatic = false;
							break;
						}
					}
				
					$lz_fitness_recent_product_title = get_theme_mod('lz_fitness_recent_product_title', 'RECENT PRODUCTS');	
					?>
					<div class="row">
						<div class="ht-section-title-tagline">
							<h2 class="ht-section-title lz-recentproduct-heading">
								<p>
								<?php
								if(!empty($lz_fitness_recent_product_title))	{
									echo ($lz_fitness_recent_product_title);
								} ?>
							</p>
							</h2>
						</div>
						<div class="clearfix"></div>
					</div>
					<div class="row">
						<button class="slide-prev ctrl-btn pro-prev fa fa-chevron-left"></button>
						<button class="ctrl-btn pro-next fa fa-chevron-right slide-next"></button>
						<!-- Wrapper for slides -->
						<div class="slider" id="slider">
							<div class="slides" id="slide">
					    <!-- <div class="row-fluid">
					    	<div class="recent-box">-->
					    		<?php
					    		if(function_exists('woocommerce_template_loop_add_to_cart') && function_exists('WC')){
					    			$args = array( 'post_type' => 'product', 'stock' => 1, 'posts_per_page' => 4, 'orderby' =>'date','order' => 'DESC' );
					    			$meta_query   = WC()->query->get_meta_query();
					    			$tax_query   = WC()->query->get_tax_query();
					    			
					    			$args = array(
					    				'post_type'   =>  'product',
					    				'stock'       =>  1,
					    				'posts_per_page' => -1, 
					    				'orderby'     =>  'date',
					    				'order'       =>  'DESC',
					    				'meta_query'  =>  $meta_query,
					    				'tax_query'   => $tax_query,
					    			);
					    			$loop = new WP_Query( $args );
					    			if($loop->post_count > 0){
					    				while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
					    					<div class="col-md-3 slide-item featured-product rpost padding0"> 
					    						<div id="recent-porduct">
					    							<div class="pro-img text-center">
					    								<a id="id-<?php the_id(); ?>" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
					    									<?php if (has_post_thumbnail( $loop->post->ID )) 
					    									echo get_the_post_thumbnail($loop->post->ID, 'shop_catalog');
					    									else
					    										echo '<img src="'.get_template_directory_uri().'/images/default.png" alt="Placeholder" width="100%" height="200px" />'; ?>	
					    								</a>
					    							</div>
					    							
					    							<div class="total-products-title-wrap">
					    								<a id="id-<?php the_id(); ?>" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">	
					    									<h6><?php the_title(); ?></h6></a>
					    									<span class="price"><?php echo $product->get_price_html(); ?></span>
					    								</div>
					    								<div class="ht-recent-social-id">
					    									<ul>
					    									
					    										<li>
					    											<?php
					    											$product->is_icon = true;
					    											woocommerce_template_loop_add_to_cart( $product ); ?>
					    										</li>
					    										<li>
					    											<?php //do_action( 'woocommerce_after_shop_loop_item' ); ?>
					    											<a id="id-<?php the_id(); ?>" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><i class="fa fa-eye"></i></a>
					    										</li>
					    										
					    									</ul>
					    								</div>
					    							</div>
					    						</div><!-- /span3 -->
					    						<?php
					    					endwhile; 
					    				}else{ ?>
					    					<div class="alert alert-warning text-center">
					    						<strong>Sorry, no recent products to show.</strong>
					    					</div>
					    					<?php
					    				}
					    				?>
					    				<!-- </div>-->
					    				<!-- </div>-->
					    				<?php
					    				wp_reset_query(); 
					    			}else{ ?>
					    				<div class="alert alert-warning text-center">
					    					Kindly Install or Activate the WooCommerce plugin.
					    				</div>
					    				<?php
					    			}?>
					    		</div>
					    	</div><!-- /row-fluid -->
					    </div>
					</div>
				</div>
				<div class="clearfix"></div>

			</div>
		</section>
		<script>
	jQuery.noConflict();
	$(function(){
		function rpostHeight(){
			var ht = 0;
			$('#recent-post-section #recent-porduct').each(function(i){
				var tHt = $(this).height();
				if(ht<tHt){
					ht=tHt;
				}
			});
			$('#recent-post-section #recent-porduct').height(ht+'px');
		}
		rpostHeight();
	});
	$( window ).resize(function(){
		rpostHeight();
	});
</script>

	<?php }?>
	<!--end recent product secton-->
	<?php
/**
 *
 * @package theme-eye-Premium
 */
if(get_theme_mod('product_category_section_disable') != 'on' ){ ?>
<section id="product-category-section" class="ht-section product-category-section">
	<div class="lightbox">
			<div class="row">
	
				<div class="product-grid">
					<?php
					$static=true;
					for($i=1;$i<=2;$i++){
						$discounttitle = get_theme_mod('product_catelauge_discounttitle'.$i);
						$discounttext = get_theme_mod('product_catelauge_discounttext'.$i);
						$title = get_theme_mod('product_catelauge_title'.$i);
						$link = get_theme_mod('product_category_link'.$i);
						$img = get_theme_mod('product_category_image'.$i);
						if (!empty($title) || !empty($img) || !empty($link) || !empty($discounttitle) || !empty($discounttext)){
							$static=false;
						}
					}

					if(function_exists('get_woocommerce_term_meta')){
						for($i=1;$i<=3;$i++){

							if($static==false){
								$discounttitle = get_theme_mod('product_catelauge_discounttitle'.$i);
								$discounttext = get_theme_mod('product_catelauge_discounttext'.$i);
								$title = get_theme_mod('product_catelauge_title'.$i);
								$link = get_theme_mod('product_category_link'.$i);
								$img = get_theme_mod('product_category_image'.$i);
								$url = get_theme_mod('product_catelauge_url_'.$i, '#');
								$category = get_term_by( 'id', $link, 'product_cat' );

								$img = !empty($img)?$img:get_template_directory_uri().'/images/collection1.jpg';

								if( !empty($url) || !empty($category) ){
							    	//echo $term->name;
									?>
									<div class="col-md-4 col-sm-4 cat-product padding10 main-banner">
										<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
											<img src="<?php echo esc_url($img);?>" alt="" width="520" height="280">
										</a>
										<?php
										$theme_eye_product_cat_page_id = get_theme_mod('theme_eye_product_cat_page');
										$theme_eye_product_cat_button_title = get_theme_mod('theme_eye_product_cat_button_title_'.$i, 'SHOP NOW');
										?>
										<h5>
											<a href="<?php echo esc_url(!empty($url)?$url:'#');?>"><?php echo esc_html($title);?></a>
											<div class="banner-text">
										<?php echo esc_html($discounttext); ?>
									</div>
											<div class="special-banner">
									<div class="col-md-12 discount">
										<?php echo esc_html($discounttitle); ?>
									</div>
									<div class="clearfix"></div>
								</div>
											<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
												<div class="category-read-more">
													<button> <?php echo $theme_eye_product_cat_button_title; ?></button>
												</div>
											</a>
										</h5>
									</div>
									<?php
								}
							}
						}
					
					}else{ ?>
					<div class="alert alert-warning">
						Kindly Install or Activate the WooCommerce plugin.
					</div>
					<?php }

					if($static==true){
						?>
						<div class="col-md-4 col-sm-4 cat-product padding10 main-banner">
							<a href="#">
								<img class="img-responsive" src="<?php echo get_template_directory_uri(); ?>/images/collection2.jpg" alt="">
							</a>
							<h5>
								<a href="#">SPECIAL WINTER EXCLUSIVE</a>
								<div class="banner-text">
									ALL CATEGORIES
								</div>
								<div class="special-banner">
									<div class="col-md-12 discount">
										10% OFF
									</div>
									<div class="clearfix"></div>
								</div>
								<a href="#">
									<div class="category-read-more">
										<button> SHOP NOW</button>
									</div>
								</a>
							</h5>
						</div>
						<div class="col-md-4 col-sm-4 cat-product padding10 main-banner">
							<a href="#">
								<img class="img-responsive" src="<?php echo get_template_directory_uri(); ?>/images/collection3.jpg" alt="">
							</a>
							<h5>
								<a href="#">MEN'S EXCLUSIVE COLLECTIONS</a>
								<div class="banner-text">
									ALL CATEGORIES
								</div>
								<div class="special-banner">
									<div class="col-md-12 discount">
									10% OFF
									</div>
									<div class="clearfix"></div>
								</div>
								
								<a href="#">
									<div class="category-read-more"> 
										<button> SHOP NOW</button>
									</div>
								</a>
							</h5>
						</div>
						<div class="col-md-4 col-sm-4 cat-product padding10 main-banner">
							<a href="#">
								<img class="img-responsive" src="<?php echo get_template_directory_uri(); ?>/images/collection1.jpg" alt="">
							</a>
							<h5>
								<a href="#">WOMEN'S EXCLUSIVE COLLECTIONS</a>
								<div class="banner-text">
									ALL CATEGORIES
								</div>
								<div class="special-banner">
									<div class="col-md-12 discount">
										10% OFF
									</div>
									<div class="clearfix"></div>
								</div>
								<!-- <p>SALE UP TO 50% OFF</p> -->
								<a href="#">
									<div class="category-read-more">
										<button> SHOP NOW</button>
									</div> 
								</a>
							</h5>
						</div>
						<?php
					}?>

				</div>
			</div>

			<div class="clearfix"></div>

	</div>

</section>
<?php }

?>
<?php
/**
 * @package LZ Restaurant Premium
 */
if(get_theme_mod('lz_fitness_premium_top_product_section_disable') != 'on' ){
    wp_enqueue_script('slider', get_template_directory_uri().'/js/slider.js', array(), '1.1', true);
    ?>
    <section id="top-product-section" class="ht-section">
        <div class="lightbox">
            <div class="top-product-box">
                <div class="wow fadeInUp" data-wow-duration="1s">
                    <?php
                    $showStatic = true;
                    for( $i = 1; $i < 4; $i++ ){
                        $lz_fitness_top_product_page_id = get_theme_mod('lz_fitness_top_product_page'.$i); 
                        if(!empty($lz_fitness_top_product_page_id)){
                            $showStatic = false;
                            break;
                        }
                    }
              
                    $lz_fitness_top_product_title = get_theme_mod('lz_fitness_top_product_title', 'TOPSELLAR'); 
                      
                    ?>
                    <div class="row">
                        <div class="ht-section-title-tagline">
                            <h2 class="ht-section-title lz-topsellar-heading">
                            	<p>
                                <?php
                                if(!empty($lz_fitness_top_product_title))    {
                                    echo ($lz_fitness_top_product_title);
                                } ?>
                            </p>
                            </h2>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div class="row">
                        <button class="slide-prev ctrl-btn pro-prev fa fa-chevron-left"></button>
                            <button class="ctrl-btn pro-next fa fa-chevron-right slide-next"></button>
                        <!-- Wrapper for slides -->
                        <div class="slider" id="slider">
                            <div class="slides" id="slide">
                        <!-- <div class="row-fluid">
                            <div class="recent-box">-->
                                <?php
                                if(function_exists('woocommerce_template_loop_add_to_cart') && function_exists('WC')){

                                     $categories = get_theme_mod('lz_fitness_product_tab_categories');
                                    $args = array(
                                //'number' => 12,
                                'orderby' => 'name',
                                'posts_per_page' => -1, 
                                'order' => 'asc',
                                'hide_empty' => false,
                                'include' => $categories
                            );
                                    $product_categories = get_terms('product_cat', $args);
                                    $i = 0;
                                    if(function_exists('get_woocommerce_term_meta')){
                                    foreach ($product_categories as $cat) {
                                    if(!empty($cat)){
                                    ?>
                                  
                                    <?php
                            $i = 0;
                            $args = array( 'post_type' => 'product', 'posts_per_page' => 12,  'orderby' =>'name','order' => 'asc' );
                                    
                                    if(!empty($cat->slug)){
                                        $args['product_cat']= $cat->slug;
                                        $product = new stdClass();
                                        $loop = new WP_Query( $args );
                                        while ( $loop->have_posts() ) : $loop->the_post(); global $product; 
                                            ?>
                                        <div class="col-md-3 slide-item topsellar tpost padding0"> 
                                            <div id="topsellar-porduct">
                                                <div class="pro-img text-center">
                                                    <a id="id-<?php the_id(); ?>" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
                                                        <?php if (has_post_thumbnail( $loop->post->ID )) 
                                                        echo get_the_post_thumbnail($loop->post->ID, 'shop_catalog');
                                                        else
                                                            echo '<img src="'.get_template_directory_uri().'/images/default.png" alt="Placeholder" width="100%" height="200px" />'; ?>  
                                                    </a>
                                                </div>
                                                
                                                <div class="topsellar-products-title-wrap">
                                                    <a id="id-<?php the_id(); ?>" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">   
                                                        <h6><?php the_title(); ?></h6></a>
                                                        <span class="price"><?php echo $product->get_price_html(); ?></span>
                                                    </div>
                                                    <div class="ht-topsellar-social-id">
                                                    <ul>
					    										
					    										<li>
					    											<?php
					    											$product->is_icon = true;
					    											woocommerce_template_loop_add_to_cart( $product ); ?>
					    										</li>
					    										<li>
					    											<?php //do_action( 'woocommerce_after_shop_loop_item' ); ?>
					    											<a id="id-<?php the_id(); ?>" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><i class="fa fa-eye"></i></a>
					    										</li>
					    										
					    									</ul>
                                                </div>
                                                </div>
                                            </div><!-- /span3 -->
                                            <?php
                                        endwhile; 
                                    }
                                }

                            }
                        }else{ ?>
                                    <div class="alert alert-warning text-center">
                                        <strong>Uncategorizwd</strong>
                                    </div>
                                    <?php
                                }
                                ?>
                                
                                <?php
                                wp_reset_query(); 

                            }else{ ?>
                            <div class="alert alert-warning text-center">
                                Kindly Install or Activate the WooCommerce plugin.
                            </div>
                            <?php
                        }?>
                    </div>
                </div><!-- /row-fluid -->
            </div>
        </div>
    </div>
    <div class="clearfix"></div>

</div>
</section>
<script>
	jQuery.noConflict();
	$(function(){
		function tpostHeight(){
			var ht = 0;
			$('section#top-product-section #topsellar-porduct').each(function(i){
				var tHt = $(this).height();
				if(ht<tHt){
					ht=tHt;
				}
			});
			$('section#top-product-section #topsellar-porduct').height(ht+'px');
		}
		tpostHeight();
	});
	$( window ).resize(function(){
		tpostHeight();
	});
</script>

<?php }
?>
</div>

<div class="col-sm-3 col-sm-pull-9 main-section-sidebar">
		<?php  get_sidebar(); ?> 
	</div>
</div>
<div class="clearfix"></div>

