<?php
/**
 * Template part for displaying the services section
 *
 * @package SAAS Agency
 * @subpackage SAAS Agency
 */
?>

<?php if (get_theme_mod('saas_agency_show_hide_brand_sec', true)) : ?>
  <section id="brand-sec" class="py-5 px-md-0 px-3">
    <div class="container">
      <div class="text-center">
        <div class="row">
          <?php
            $saas_agency_image_count = get_theme_mod('saas_agency_product_banner_count', 6);
            ?>
            <?php
            $saas_agency_image_count = get_theme_mod('saas_agency_posts_to_show', 6);
            ?>
            <div class="owl-carousel owl-carousel-brand">
              <?php for ($saas_agency_i = 1; $saas_agency_i <= $saas_agency_image_count; $saas_agency_i++) :
                $saas_agency_image_url = get_theme_mod('saas_agency_product_banner' . $saas_agency_i);
                if ($saas_agency_image_url) : ?>
                  <div class="item product-img text-center">
                    <img src="<?php echo esc_url($saas_agency_image_url); ?>" alt="<?php echo esc_attr__('Brand Image ', 'saas-agency') . $saas_agency_i; ?>" />
                  </div>
                <?php endif;
              endfor; ?>
            </div>
        </div>
      </div>
    </div>
  </section>
<?php endif; ?>