<?php
/*
Template Name: Distribution inventory software
*/

get_header('new');
?>
<section class="section banner supply-chain-banner pb-5">
    <div class="container">
        <div class="row mt-xl-5 mt-lg-0">
            <div class="col-lg-6">
                <div class="text-cont mt-0">
                    <h1 class="banner-heading"><?php echo get_field('banner_heading'); ?></h1>
                    <p class="banner-content">
                        <?php echo get_field('banner_description'); ?>
                    </p>
                    <div class="banner-btns">
					<?php $cta_1 = get_field('banner_cta_1'); ?>
					 <?php if (!is_null($cta_1)) : ?>
                        <a href="<?php echo esc_url($cta_1['url']); ?>" class="primary animated-cta-btn <?php echo is_modal_link($cta_1['url']); ?>"><?php echo $cta_1['title']; ?>
                        </a>
						<?php endif; ?>
						<?php $cta_2 = get_field('banner_cta_2'); ?>
						<?php if (!is_null($cta_2)) : ?>
                        <a href="<?php echo esc_url($cta_2['url']); ?>" class="border-gradient-btn animated-btn <?php echo is_modal_link($cta_2['url']); ?>"><?php echo $cta_2['title']; ?>
                            <svg width="14" height="11" viewBox="0 0 14 11" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <path d="M5.35816 0.0996094H7.95016L13.3502 5.49961L7.95016 10.8996H5.35816L9.82216 6.43561H0.660156V4.56361H9.82216L5.35816 0.0996094Z" fill="black"/>
                            </svg>
                        </a>
						<?php endif; ?>
                    </div>
                </div>
            </div>
            <div class="col-lg-6 align-self-center">
                <div class="img-cont d-block text-center">
					<?php
					$desktop_img_url = get_field('banner_image');
					$mobile_img_url  = get_field('banner_mobile_image');
				?>
					<picture>
    <source class="no-lazy" media="(max-width: 767px)" data-mobile-src="<?php echo esc_url($mobile_img_url ? $mobile_img_url : $desktop_img_url); ?>" width="370" height="260">
    <img src="<?php echo esc_url($desktop_img_url); ?>" loading="eager" fetchpriority="high" width="546" height="352" class="img-fluid no-lazy" alt="<?php echo strip_tags(get_field('banner_heading')); ?>">
</picture>
<script>var s=document.querySelector('source[data-mobile-src]');if(s)s.srcset=s.dataset.mobileSrc;</script>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- Certificates Section Start -->
<?php get_template_part('templates-parts/pages/certificates'); ?>
<!-- Certificates Section End -->



<!-- Icons Cards Start start -->
 <?php
 $counters = ['class' => 'pt-5 '];
 get_template_part('templates-parts/pages/counter-new',null,$counters)?>
<!-- Icons Cards Start end -->

<section class="section what-is-distribution-inventory bg-white">
  <div class="container">
    <div class="row">
      
      <div class="col-lg-6">
        <div class="img-cont">
          <?php 
            $img = get_field('distinv_sec_image');
            $img_alt = get_field('distinv_sec_image_alt');
          ?>
          <?php if (!empty($img)) : ?>
            <img 
              src="<?php echo esc_url($img['url']); ?>"
              alt="<?php echo esc_attr($img_alt ? $img_alt : $img['alt']); ?>"
              class="img-fluid"
            >
          <?php endif; ?>
        </div>
      </div>

      <div class="col-lg-6">
        <div class="text-cont">
          
          <?php $title = get_field('distinv_sec_title'); ?>
          <?php if ($title) : ?>
            <h2 class="section-title"><?php echo esc_html($title); ?></h2>
          <?php endif; ?>

          <?php $desc = get_field('distinv_sec_desc'); ?>
          <?php if ($desc) : ?>
            <p class="section-content"><?php echo wp_kses_post($desc); ?></p>
          <?php endif; ?>

          <?php if (have_rows('distinv_sec_features')) : ?>
            <ul>
              <?php while (have_rows('distinv_sec_features')) : the_row(); 
                $f_title = get_sub_field('distinv_feature_title');
                $f_text  = get_sub_field('distinv_feature_text');
              ?>
                <li>
                  <?php if ($f_title) : ?>
                    <h3><?php echo esc_html($f_title); ?></h3>
                  <?php endif; ?>

                  <?php if ($f_text) : ?>
                    <p><?php echo wp_kses_post($f_text); ?></p>
                  <?php endif; ?>
                </li>
              <?php endwhile; ?>
            </ul>
          <?php endif; ?>

          <?php
            $btn_text  = get_field('distinv_sec_btn_text');
            $btn_url   = get_field('distinv_sec_btn_url');
            $btn_class = get_field('distinv_sec_btn_class');
          ?>
          <?php if ($btn_text) : ?>
            <div class="demo-btn-wrapper mt-4">
              <a 
                href="<?php echo esc_url($btn_url ? $btn_url : 'javascript:;'); ?>" 
                class="<?php echo esc_attr($btn_class ? $btn_class : 'primary animated-cta-btn'); ?>"
              >
                <?php echo esc_html($btn_text); ?>
              </a>
            </div>
          <?php endif; ?>

        </div>
      </div>

    </div>
  </div>
</section>


<section class="section portal-benefits-3pl bg-white distribution-key-challenges pt-4">
  <div class="container">
    <div class="row mb-3">
      <div class="col-lg-12">
        <?php $title = get_field('distkc_sec_title'); ?>
        <?php if ($title) : ?>
          <h2 class="section-title text-center">
            <?php echo esc_html($title); ?>
          </h2>
        <?php endif; ?>
      </div>

      <div class="col-lg-12">
        <?php $desc = get_field('distkc_sec_desc'); ?>
        <?php if ($desc) : ?>
          <p class="section-content text-center">
            <?php echo wp_kses_post($desc); ?>
          </p>
        <?php endif; ?>
      </div>
    </div>

    <div class="row gy-4">
      <div class="col-xl-6">
        <div class="img-wrapper">
          <?php 
            $img = get_field('distkc_sec_image');
            $img_alt = get_field('distkc_sec_image_alt');
          ?>
          <?php if (!empty($img)) : ?>
            <img 
              src="<?php echo esc_url($img['url']); ?>" 
              alt="<?php echo esc_attr($img_alt ? $img_alt : $img['alt']); ?>" 
              class="img-fluid"
            >
          <?php endif; ?>
        </div>
      </div>

      <div class="col-xl-6">
        <div class="row gy-4">

          <?php if (have_rows('distkc_sec_cards')) : ?>
            <?php while (have_rows('distkc_sec_cards')) : the_row(); 
              $num = get_sub_field('distkc_card_number');
              $ct  = get_sub_field('distkc_card_title');
              $tx  = get_sub_field('distkc_card_text');
            ?>
              <div class="col-md-6 col-lg-6">
                <div class="card">

                  <?php if ($num) : ?>
                    <div class="numeric-wrapper">
                      <?php echo esc_html($num); ?>
                    </div>
                  <?php endif; ?>

                  <div class="d-flex gap-4 align-items-center title-box">
                    <?php if ($ct) : ?>
                      <h3><?php echo esc_html($ct); ?></h3>
                    <?php endif; ?>
                  </div>

                  <?php if ($tx) : ?>
                    <p class="text">
                      <?php echo wp_kses_post($tx); ?>
                    </p>
                  <?php endif; ?>

                </div>
              </div>
            <?php endwhile; ?>
          <?php endif; ?>

        </div>
      </div>
    </div>

    <?php
      $btn_text  = get_field('distkc_sec_btn_text');
      $btn_url   = get_field('distkc_sec_btn_url');
      $btn_class = get_field('distkc_sec_btn_class');
    ?>

    <?php if ($btn_text) : ?>
      <div class="demo-btn-wrapper text-center mt-5">
        <a 
          href="<?php echo esc_url($btn_url ? $btn_url : 'javascript:;'); ?>" 
          class="<?php echo esc_attr($btn_class ? $btn_class : 'primary animated-cta-btn'); ?>"
        >
          <?php echo esc_html($btn_text); ?>
        </a>
      </div>
    <?php endif; ?>

  </div>
</section>


<section class="section dashboard-access-cta distribution-software-cta">
  <div class="container">
    <div class="box">
      <div class="row gy-3 gy-lg-0 align-items-center justify-content-between">
        
        <div class="col-lg-6 col-xl-6">
          <div class="img-cont d-flex justify-content-center justify-content-lg-end">
            <?php 
              $img = get_field('distcta_sec_image');
              $img_alt = get_field('distcta_sec_image_alt');
            ?>
            <?php if (!empty($img)) : ?>
              <img 
                src="<?php echo esc_url($img['url']); ?>" 
                alt="<?php echo esc_attr($img_alt ? $img_alt : $img['alt']); ?>" 
                class="img-fluid"
              >
            <?php endif; ?>
          </div>
        </div>

        <div class="col-lg-6 col-xl-5">
          <div class="text-cont">
            <?php $text = get_field('distcta_sec_text'); ?>
            <?php if ($text) : ?>
              <p><?php echo wp_kses_post($text); ?></p>
            <?php endif; ?>

            <?php
              $btn_text  = get_field('distcta_sec_btn_text');
              $btn_url   = get_field('distcta_sec_btn_url');
              $btn_class = get_field('distcta_sec_btn_class');
            ?>
            <?php if ($btn_text) : ?>
              <a 
                href="<?php echo esc_url($btn_url ? $btn_url : 'javascript:;'); ?>" 
                class="<?php echo esc_attr($btn_class ? $btn_class : 'accent-btn animated-cta-btn'); ?>"
              >
                <?php echo esc_html($btn_text); ?>
              </a>
            <?php endif; ?>
          </div>
        </div>

      </div>
    </div>
  </div>
</section>


<section class="section portal-benefits-3pl bg-white distribution-key-challenges">
  <div class="container">

    <div class="row mb-3">
      <div class="col-xl-12">
        <?php $title = get_field('distkcr_sec_title'); ?>
        <?php if ($title) : ?>
          <h2 class="section-title text-center">
            <?php echo esc_html($title); ?>
          </h2>
        <?php endif; ?>
      </div>

      <div class="col-xl-12">
        <?php $desc = get_field('distkcr_sec_desc'); ?>
        <?php if ($desc) : ?>
          <p class="section-content text-center">
            <?php echo wp_kses_post($desc); ?>
          </p>
        <?php endif; ?>
      </div>
    </div>

    <div class="row gy-4">
      <div class="col-xl-6">
        <div class="row gy-4">

          <?php if (have_rows('distkcr_sec_cards')) : ?>
            <?php while (have_rows('distkcr_sec_cards')) : the_row();
              $num = get_sub_field('distkcr_card_number');
              $ct  = get_sub_field('distkcr_card_title');
              $tx  = get_sub_field('distkcr_card_text');
            ?>
              <div class="col-md-6 col-lg-6">
                <div class="card">

                  <?php if ($num) : ?>
                    <div class="numeric-wrapper">
                      <?php echo esc_html($num); ?>
                    </div>
                  <?php endif; ?>

                  <div class="d-flex gap-4 align-items-center title-box">
                    <?php if ($ct) : ?>
                      <h3><?php echo esc_html($ct); ?></h3>
                    <?php endif; ?>
                  </div>

                  <?php if ($tx) : ?>
                    <p class="text">
                      <?php echo wp_kses_post($tx); ?>
                    </p>
                  <?php endif; ?>

                </div>
              </div>
            <?php endwhile; ?>
          <?php endif; ?>

        </div>
      </div>

      <div class="col-xl-6">
        <div class="img-wrapper">
          <?php
            $img = get_field('distkcr_sec_image');
            $img_alt = get_field('distkcr_sec_image_alt');
          ?>
          <?php if (!empty($img)) : ?>
            <img
              src="<?php echo esc_url($img['url']); ?>"
              alt="<?php echo esc_attr($img_alt ? $img_alt : $img['alt']); ?>"
              class="img-fluid"
            >
          <?php endif; ?>
        </div>
      </div>

    </div>

    <?php
      $btn_text  = get_field('distkcr_sec_btn_text');
      $btn_url   = get_field('distkcr_sec_btn_url');
      $btn_class = get_field('distkcr_sec_btn_class');
    ?>
    <?php if ($btn_text) : ?>
      <div class="demo-btn-wrapper text-center mt-5">
        <a
          href="<?php echo esc_url($btn_url ? $btn_url : 'javascript:;'); ?>"
          class="<?php echo esc_attr($btn_class ? $btn_class : 'primary animated-cta-btn'); ?>"
        >
          <?php echo esc_html($btn_text); ?>
        </a>
      </div>
    <?php endif; ?>

  </div>
</section>



<section class="section how-distribution-inventory">
  <div class="container">

    <div class="text-cont">
      <div class="row">
        <div class="col-xl-8">
          <?php $title = get_field('distwork_sec_title'); ?>
          <?php if ($title) : ?>
            <h2 class="section-title">
              <?php echo wp_kses_post($title); ?>
            </h2>
          <?php endif; ?>
        </div>

        <div class="col-xl-4">
          <?php $desc = get_field('distwork_sec_desc'); ?>
          <?php if ($desc) : ?>
            <p class="section-content">
              <?php echo wp_kses_post($desc); ?>
            </p>
          <?php endif; ?>
        </div>
      </div>
    </div>

    <div class="row gy-4">
      <?php if (have_rows('distwork_sec_cards')) : ?>
        <?php while (have_rows('distwork_sec_cards')) : the_row();
          $num = get_sub_field('distwork_card_number');
          $ct  = get_sub_field('distwork_card_title');
          $tx  = get_sub_field('distwork_card_text');
        ?>
          <div class="col-xl-3 col-lg-4 col-md-6">
            <div class="card">
              <div class="text-content">

                <?php if ($num) : ?>
                  <h3><?php echo esc_html($num); ?></h3>
                <?php endif; ?>

                <?php if ($ct) : ?>
                  <h4><?php echo esc_html($ct); ?></h4>
                <?php endif; ?>

                <?php if ($tx) : ?>
                  <p><?php echo wp_kses_post($tx); ?></p>
                <?php endif; ?>

              </div>
            </div>
          </div>
        <?php endwhile; ?>
      <?php endif; ?>
    </div>

    <?php
      $btn_text  = get_field('distwork_sec_btn_text');
      $btn_url   = get_field('distwork_sec_btn_url');
      $btn_class = get_field('distwork_sec_btn_class');
    ?>
    <?php if ($btn_text) : ?>
      <div class="demo-btn-wrapper text-center mt-5">
        <a
          href="<?php echo esc_url($btn_url ? $btn_url : 'javascript:;'); ?>"
          class="<?php echo esc_attr($btn_class ? $btn_class : 'primary animated-cta-btn'); ?>"
        >
          <?php echo esc_html($btn_text); ?>
        </a>
      </div>
    <?php endif; ?>

  </div>
</section>


<section class="section netsuite-wms-process bg-white distribution-key-features">
  <div class="container">

    <div class="text-cont">
      <?php $title = get_field('distfeat_sec_title'); ?>
      <?php if ($title) : ?>
        <h2 class="section-title text-center">
          <?php echo esc_html($title); ?>
        </h2>
      <?php endif; ?>

      <?php $desc = get_field('distfeat_sec_desc'); ?>
      <?php if ($desc) : ?>
        <p class="section-content text-center">
          <?php echo wp_kses_post($desc); ?>
        </p>
      <?php endif; ?>
    </div>

    <div class="netsuite-process-cards-wrapper">
      <div class="row gy-4">

        <?php if (have_rows('distfeat_sec_cards')) : ?>
          <?php while (have_rows('distfeat_sec_cards')) : the_row();
            $num = get_sub_field('distfeat_card_number');
            $ct  = get_sub_field('distfeat_card_title');
            $tx  = get_sub_field('distfeat_card_content');
          ?>
            <div class="col-md-6 col-lg-4">
              <div class="netsuite-card">

                <?php if ($num) : ?>
                  <div class="number-wrapper">
                    <span class="number"><?php echo esc_html($num); ?></span>
                  </div>
                <?php endif; ?>

                <?php if ($ct) : ?>
                  <h3 class="netsuite-process-card-title">
                    <?php echo esc_html($ct); ?>
                  </h3>
                <?php endif; ?>

                <?php if ($tx) : ?>
                  <p class="netsuite-process-card-content">
                    <?php echo wp_kses_post($tx); ?>
                  </p>
                <?php endif; ?>

              </div>
            </div>
          <?php endwhile; ?>
        <?php endif; ?>

      </div>
    </div>

    <?php
      $btn_text  = get_field('distfeat_sec_btn_text');
      $btn_url   = get_field('distfeat_sec_btn_url');
      $btn_class = get_field('distfeat_sec_btn_class');
    ?>
    <?php if ($btn_text) : ?>
      <div class="text-center mt-4 mt-lg-5">
        <a
          href="<?php echo esc_url($btn_url ? $btn_url : 'javascript:;'); ?>"
          class="<?php echo esc_attr($btn_class ? $btn_class : 'primary animated-cta-btn'); ?>"
        >
          <?php echo esc_html($btn_text); ?>
        </a>
      </div>
    <?php endif; ?>

  </div>
</section>



<!-- industries solution section -->
<?php $args = [
    'category' => 'distrubution-software'
]; 
get_template_part('templates-parts/pages/industry-solutions',null,$args);
?>
<!-- industries solution section end -->

<section class="section features-integration bg-white">
  <div class="container">
    <div class="row align-items-center">

      <div class="col-lg-6">
        <div class="img-cont">
          <?php 
            $img = get_field('distint_sec_image');
            $img_alt = get_field('distint_sec_image_alt');
          ?>
          <?php if (!empty($img)) : ?>
            <img
              src="<?php echo esc_url($img['url']); ?>"
              alt="<?php echo esc_attr($img_alt ? $img_alt : $img['alt']); ?>"
              class="img-fluid"
            >
          <?php endif; ?>
        </div>
      </div>

      <div class="col-lg-6">
        <div class="text-cont">
          <?php $title = get_field('distint_sec_title'); ?>
          <?php if ($title) : ?>
            <h2 class="section-title mb-4"><?php echo esc_html($title); ?></h2>
          <?php endif; ?>

          <?php $desc = get_field('distint_sec_desc'); ?>
          <?php if ($desc) : ?>
            <p class="section-content mb-4"><?php echo wp_kses_post($desc); ?></p>
          <?php endif; ?>

          <?php
            $btn_text  = get_field('distint_sec_btn_text');
            $btn_url   = get_field('distint_sec_btn_url');
            $btn_class = get_field('distint_sec_btn_class');
          ?>
          <?php if ($btn_text) : ?>
            <div class="mt-4">
              <a
                href="<?php echo esc_url($btn_url ? $btn_url : 'javascript:;'); ?>"
                class="<?php echo esc_attr($btn_class ? $btn_class : 'primary animated-cta-btn'); ?>"
              >
                <?php echo esc_html($btn_text); ?>
              </a>
            </div>
          <?php endif; ?>

        </div>
      </div>

    </div>
  </div>
</section>


<section class="section why-this-solution pale-blue">
  <div class="container">

    <div class="text-cont text-center">
      <?php $title = get_field('distsol_sec_title'); ?>
      <?php if ($title) : ?>
        <h2 class="section-title"><?php echo $title; ?></h2>
      <?php endif; ?>

      <?php $desc = get_field('distsol_sec_desc'); ?>
      <?php if ($desc) : ?>
        <p class="section-content"><?php echo $desc; ?></p>
      <?php endif; ?>
    </div>

    <?php
      $h1 = get_field('distsol_tbl_head_1');
      $h2 = get_field('distsol_tbl_head_2');
      $h3 = get_field('distsol_tbl_head_3');
      $h4 = get_field('distsol_tbl_head_4');
    ?>

    <div class="table-responsive">
      <table class="table table-bordered">
        <thead>
          <tr>
            <th><?php echo $h1 ? $h1 : 'Features'; ?></th>
            <th><?php echo $h2 ? $h2 : 'Spreadsheet'; ?></th>
            <th><?php echo $h3 ? $h3 : 'Basic Tools'; ?></th>
            <th><?php echo $h4 ? $h4 : 'Warego Distribution Solution'; ?></th>
          </tr>
        </thead>

        <tbody>
          <?php if (have_rows('distsol_tbl_rows')) : ?>
            <?php while (have_rows('distsol_tbl_rows')) : the_row();
              $feature = get_sub_field('distsol_row_feature');
              $sp      = get_sub_field('distsol_row_spreadsheet');
              $basic   = get_sub_field('distsol_row_basic');
              $warego  = get_sub_field('distsol_row_warego');
            ?>
              <tr>
                <td><?php echo $feature; ?></td>
                <td><?php echo $sp; ?></td>
                <td><?php echo $basic; ?></td>
                <td><?php echo $warego; ?></td>
              </tr>
            <?php endwhile; ?>
          <?php endif; ?>
        </tbody>
      </table>
    </div>

    <?php
      $btn_text  = get_field('distsol_sec_btn_text');
      $btn_url   = get_field('distsol_sec_btn_url');
      $btn_class = get_field('distsol_sec_btn_class');
    ?>
    <?php if ($btn_text) : ?>
      <div class="text-center mt-4">
        <a
          href="<?php echo esc_url($btn_url ? $btn_url : 'javascript:;'); ?>"
          class="<?php echo esc_attr($btn_class ? $btn_class : 'primary animated-cta-btn'); ?>"
        >
          <?php echo esc_html($btn_text); ?>
        </a>
      </div>
    <?php endif; ?>

  </div>
</section>


<!-- pricing section start -->
<?php 
$pricing = [
    'class' => 'supply-chain-pricing-cards pt-5',
    'category' => 'home',
    'headingcon' => 'h2',
];
get_template_part('templates-parts/pages/pricing',null,$pricing)?>
<!-- pricing section end -->

<!-- pricing section end -->
<!-- case studies start -->
<?php 
$portfolio = ['class' => 'bg-white pt-lg-0'];
get_template_part('templates-parts/pages/case-studies',null,$portfolio);?>
<!-- case studies end -->

<section class="section why-choose-distribution bg-white pt-0">
  <div class="container">
    <div class="text-cont">
      <div class="row">
        <div class="col-xl-6">
          <?php $title = get_field('distwch_sec_title'); ?>
          <?php if ($title) : ?>
            <h2 class="section-title"><?php echo esc_html($title); ?></h2>
          <?php endif; ?>
        </div>

        <div class="col-xl-6">
          <?php $desc = get_field('distwch_sec_desc'); ?>
          <?php if ($desc) : ?>
            <p class="section-content"><?php echo wp_kses_post($desc); ?></p>
          <?php endif; ?>
        </div>
      </div>
    </div>
  </div>

  <div class="container-fluid px-0">
    <div class="owl-carousel owl-theme why-choose-distribution-slider">

      <?php if (have_rows('distwch_sec_slides')) : ?>
        <?php while (have_rows('distwch_sec_slides')) : the_row();

          $slide_img      = get_sub_field('distwch_slide_image');
          $slide_img_alt  = get_sub_field('distwch_slide_image_alt');

          $pro_img        = get_sub_field('distwch_slide_profile_image');
          $pro_img_alt    = get_sub_field('distwch_slide_profile_image_alt');
          $pro_meta       = get_sub_field('distwch_slide_profile_meta');

          $rpro_img       = get_sub_field('distwch_slide_right_profile_image');
          $rpro_img_alt   = get_sub_field('distwch_slide_right_profile_image_alt');

          $heading        = get_sub_field('distwch_slide_heading');
          $text           = get_sub_field('distwch_slide_text');
        ?>
          <div class="item">
            <div class="row gy-4">

              <div class="col-lg-6">
                <div class="img-cont">

                  <?php if (!empty($slide_img)) : ?>
                    <img
                      src="<?php echo esc_url($slide_img['url']); ?>"
                      alt="<?php echo esc_attr($slide_img_alt ? $slide_img_alt : $slide_img['alt']); ?>"
                      class="img-fluid card-img"
                    >
                  <?php endif; ?>

                  <ul>
                    <li>
                      <?php if (!empty($pro_img)) : ?>
                        <img
                          src="<?php echo esc_url($pro_img['url']); ?>"
                          alt="<?php echo esc_attr($pro_img_alt ? $pro_img_alt : $pro_img['alt']); ?>"
                          class="img-fluid"
                        >
                      <?php endif; ?>
                    </li>
                    <li><?php echo wp_kses_post($pro_meta); ?></li>
                  </ul>

                </div>
              </div>

              <div class="col-lg-6">
                <div class="text-content">

                  <?php if (!empty($rpro_img)) : ?>
                    <img
                      src="<?php echo esc_url($rpro_img['url']); ?>"
                      alt="<?php echo esc_attr($rpro_img_alt ? $rpro_img_alt : $rpro_img['alt']); ?>"
                      class="img-fluid"
                    >
                  <?php endif; ?>

                  <?php if ($heading) : ?>
                    <h3><?php echo $heading; ?></h3>
                  <?php endif; ?>

                  <?php if ($text) : ?>
                    <p><?php echo wp_kses_post($text); ?></p>
                  <?php endif; ?>

                </div>
              </div>

            </div>
          </div>
        <?php endwhile; ?>
      <?php endif; ?>

    </div>

    <?php
      $btn_text  = get_field('distwch_sec_btn_text');
      $btn_url   = get_field('distwch_sec_btn_url');
      $btn_class = get_field('distwch_sec_btn_class');
    ?>
    <?php if ($btn_text) : ?>
      <div class="text-center mt-5">
        <a
          href="<?php echo esc_url($btn_url ? $btn_url : 'javascript:;'); ?>"
          class="<?php echo esc_attr($btn_class ? $btn_class : 'primary animated-cta-btn'); ?>"
        >
          <?php echo esc_html($btn_text); ?>
        </a>
      </div>
    <?php endif; ?>

  </div>
</section>


<section class="section dashboard-access-cta brewery-access-cta distribution-cta">
  <div class="container">
    <div class="box">
      <div class="row gy-3 gy-lg-0 align-items-center justify-content-between">

        <div class="col-lg-6 col-xl-5">
          <div class="text-cont">

            <?php $heading = get_field('distcta2_sec_heading'); ?>
            <?php if ($heading) : ?>
              <h2><?php echo esc_html($heading); ?></h2>
            <?php endif; ?>

            <?php $text = get_field('distcta2_sec_text'); ?>
            <?php if ($text) : ?>
              <p><?php echo wp_kses_post($text); ?></p>
            <?php endif; ?>

            <?php
              $btn_text  = get_field('distcta2_sec_btn_text');
              $btn_url   = get_field('distcta2_sec_btn_url');
              $btn_class = get_field('distcta2_sec_btn_class');
            ?>
            <?php if ($btn_text) : ?>
              <a
                href="<?php echo esc_url($btn_url ? $btn_url : 'javascript:;'); ?>"
                class="<?php echo esc_attr($btn_class ? $btn_class : 'accent-btn animated-cta-btn'); ?>"
              >
                <?php echo esc_html($btn_text); ?>
              </a>
            <?php endif; ?>

          </div>
        </div>

        <div class="col-lg-6 col-xl-6">
          <div class="img-cont">
            <?php
              $img = get_field('distcta2_sec_image');
              $img_alt = get_field('distcta2_sec_image_alt');
            ?>
            <?php if (!empty($img)) : ?>
              <img
                src="<?php echo esc_url($img['url']); ?>"
                alt="<?php echo esc_attr($img_alt ? $img_alt : $img['alt']); ?>"
                class="img-fluid"
              >
            <?php endif; ?>
          </div>
        </div>

      </div>
    </div>
  </div>
</section>


<!-- Faqs start -->
<?php
    $args = [   
        'category'  => 'distribution-software',
    ];
    get_template_part('templates-parts/pages/faqs-new', null, $args);
?>





<script src="<?php echo get_template_directory_uri(); ?>/assets/js/owl.carousel.min.js"></script>
<?php
    get_footer();
?>
<script>
    $('.about-our-product-slider').owlCarousel({
        loop: false,
        margin: 10,
        nav: false,
        dots: false,
        responsive: {
            0: {
                items: 1,
                autoplay: true
            },
            600: {
                loop: true,
                items: 3,
                autoplay: true
            },
            1000: {
                items: 5
            }
        }
    });

    $('.portfolio-slider').owlCarousel({
        loop:false,
        margin:40,
        nav:false,
        dots:false,
        dotsData:true,
        responsive:{
            0:{
                items:1
            },
            600:{
                items:2,
                margin:20
            },
            1000:{
                items:2
            }
        }
    });
    var more_industries_slider = $('.industry-specific-slider');

    $('.slide-next-button').click(function() {
        more_industries_slider.trigger('next.owl.carousel');
    });

    $('.slide-prev-button').click(function() {
        more_industries_slider.trigger('prev.owl.carousel');
    });
    $('.industry-specific-slider').owlCarousel({
        loop: true,
        autoplay:false,
        margin: 20,
        nav: false,
        stagePadding: 50,
        dots: false,
        responsive: {
            0: {
                items: 1,
                stagePadding: 1,
            },
            480: {
                items: 1
            },
            600: {
                items: 2

            },
            1400: {
                items : 2
            },
        }
    });
    $('.why-choose-distribution-slider').owlCarousel({
        loop:true,
        margin:20,
        nav: false,
        dots: false,
        autoplay: true,
        autoplayTimeout: 4000,
        autoplayHoverPause: true,
        smartSpeed: 1200,
        responsive:{
            0:{
                items:1
            },
            600:{
                items:1.5
            },
            1000:{
                items:1.9
            }
        }
    })
</script>