<?php if ( get_theme_mod('watch_collection_blog_box_enable',true) ) : ?>

<div class="slider">
  <div class="container">
    <div class="owl-carousel">
        <?php
        $watch_collection_catData = get_theme_mod('watch_collection_featured_product_category','');
        if ( class_exists( 'WooCommerce' ) ) {
          $watch_collection_args = array(
            'post_type' => 'product',
            'posts_per_page' => 100,
            'product_cat' => $watch_collection_catData,
            'order' => 'ASC'
          );
          $loop = new WP_Query( $watch_collection_args );
          while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>
            <div class="tab-product">
              <div class="row">
                <div class="col-lg-6 col-md-6 align-self-center">
                  <div class="product-details text-center text-md-start wow fadeInLeft">
                    <?php if ( get_theme_mod('watch_collection_slider_text_extra') ) : ?>
                      <h6><?php echo esc_html(get_theme_mod('watch_collection_slider_text_extra'));?></h6>
                    <?php endif; ?>
                    <h3 class="my-2"><?php the_title(); ?></h3>
                    <p><?php echo wp_trim_words(get_the_content(), 15); ?></p>
                    <div class="slider-btn mt-4">
                      <a href="<?php the_permalink(); ?>"><?php esc_html_e('Shop Now','watch-collection'); ?></a>
                    </div>
                  </div>
                </div>
                <div class="col-lg-6 col-md-6 align-self-center">
                  <div class="product-image text-center text-md-end wow fadeInRight">
                      <figure class="mb-0">
                        <?php if (has_post_thumbnail( $loop->post->ID )) echo get_the_post_thumbnail($loop->post->ID, 'shop_catalog'); else echo '<img src="'.esc_url(wc_placeholder_img_src()).'" />'; ?>
                      </figure>
                      <?php if ( $product->get_price()) {?>
                        <h6 class="price mb-0"><p class="mb-0"><?php esc_html_e('Start From','watch-collection'); ?></p><?php echo $product->get_price_html(); ?></h6>
                      <?php } ?>
                  </div>
                </div>
              </div>
            </div>
          <?php endwhile; wp_reset_postdata(); ?>
        <?php } ?>
    </div>
  </div>
</div>

<?php endif; ?>