<?php
/*
Template Name: Salon Inventory Management System
*/
get_header('new');
?>
<style>
.owl-nav.disabled {
    display: none;
}
.salon-product-inventory .box {
    background-image: url(https://warego.co/wp-content/uploads/2025/12/product-bg.webp);
   
}
</style>
<!-- first section -->
<section class="section banner supply-chain-banner pb-5 no-lazy">
    <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>
					<?php $highlights = get_field('banner_highlights'); ?>
                    <ul>
                        <?php if ($highlights && is_array($highlights)) : ?>
                            <?php foreach ($highlights as $highlight) : ?>
                                <li>
                                    <img src="<?php echo get_template_directory_uri(); ?>/assets/img/apparel-inventory-management/tick.webp" alt="tick" class="img-fluid">
                                    <?php echo $highlight['item']; ?>
                                </li>
                            <?php endforeach; ?>
                        <?php endif; ?>
                    </ul>
                    <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']; ?>
                            <!-- <svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <path d="M5.598 0.799999H8.19L13.59 6.2L8.19 11.6H5.598L10.062 7.136H0.9V5.264H10.062L5.598 0.799999Z" fill="white"/>
                            </svg> -->
                        </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">
                <div class="img-cont">
					<?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="636" height="385" 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>
<!-- end first section -->

<!-- 2nd section -->
<section class="section about-our-product">
    <div class="container">
        <div class="text-cont text-center">
            <h2 class="section-title"><?php echo get_field('certificates_title'); ?></h2>
			<p class="section-content text-center"><?php echo get_field('certificates_description'); ?></p>
        </div>
		
		
        <div class="logos-wrapper">
            <div class="owl-carousel owl-theme about-our-product-slider">
                <?php if (have_rows('certificates')): ?>
                    <?php while (have_rows('certificates')): the_row(); 
                        $image = get_sub_field('image');
                        if ($image): ?>
                            <div class="item">
                                <img src="<?php echo $image; ?>" alt="certificate" width="120" height="150" loading="lazy" class="img-fluid">
                            </div>
                        <?php endif; ?>
                    <?php endwhile; ?>
                <?php endif; ?>
            </div>
        </div>
    </div>
</section>
<!-- end 2nd section -->
<!-- Icons Cards Start start -->
 <?php
 $counters = ['class' => 'pt-5 '];
 get_template_part('templates-parts/pages/counter-new',null,$counters)?>
<!-- Icons Cards Start end -->



<!-- Construction Inventory Management Process Section Start -->
<?php
// ====== Salon Inventory Services (ACF Dynamic) ======
$heading = get_field('salon_inv_heading');
$content = get_field('salon_inv_content');
?>

<section class="section salon-inventory-services pt-4 bg-white">
    <div class="container">
        <div class="text-cont text-center">
            <?php if (!empty($heading)) : ?>
                <h2 class="section-title mb-3">
                    <?php echo wp_kses_post($heading); ?>
                </h2>
            <?php endif; ?>

            <?php if (!empty($content)) : ?>
                <p class="section-content">
                    <?php echo wp_kses_post($content); ?>
                </p>
            <?php endif; ?>
        </div>

        <?php if (have_rows('salon_inv_services')) : ?>
            <div class="owl-carousel owl-theme salon-inventory-services-slider">

                <?php while (have_rows('salon_inv_services')) : the_row();

                    $pain_point_title = get_sub_field('pain_point_title');
                    $service_title    = get_sub_field('service_title');
                    $service_desc     = get_sub_field('service_desc');
                    $service_image    = get_sub_field('service_image'); // image array
                    $btn_text         = get_sub_field('btn_text');
                    $btn_link         = get_sub_field('btn_link'); // ACF link array: url, title, target

                    $img_url = !empty($service_image['url']) ? $service_image['url'] : '';
                    $img_alt = !empty($service_image['alt']) ? $service_image['alt'] : 'service';

                    $link_url    = !empty($btn_link['url']) ? $btn_link['url'] : 'javascript:;';
                    $link_target = !empty($btn_link['target']) ? $btn_link['target'] : '_self';

                    // If btn_text empty, fallback to link title, else keep btn_text
                    if (empty($btn_text) && !empty($btn_link['title'])) {
                        $btn_text = $btn_link['title'];
                    }
                ?>
                    <div class="item">
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="img-content">
                                    <?php if (!empty($img_url)) : ?>
                                        <img
                                            src="<?php echo esc_url($img_url); ?>"
                                            alt="<?php echo esc_attr($img_alt); ?>"
                                            class="img-fluid"
                                            loading="lazy"
                                        >
                                    <?php endif; ?>
                                </div>
                            </div>

                            <div class="col-lg-6">
                                <div class="text-content">
                                    <div class="top-wrapper">
                                        <?php if (!empty($pain_point_title)) : ?>
                                            <h3><?php echo esc_html($pain_point_title); ?></h3>
                                        <?php endif; ?>
                                    </div>

                                    <div class="bottom-wrapper">
                                        <?php if (!empty($service_title)) : ?>
                                            <h4><?php echo esc_html($service_title); ?></h4>
                                        <?php endif; ?>

                                        <?php if (!empty($service_desc)) : ?>
                                            <p><?php echo wp_kses_post($service_desc); ?></p>
                                        <?php endif; ?>

                                        <?php if (!empty($btn_text)) : ?>
                                            <a href="<?php echo esc_url($link_url); ?>"
                                               target="<?php echo esc_attr($link_target); ?>"
                                               class="primary animated-cta-btn">
                                                <?php echo esc_html($btn_text); ?>
                                            </a>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                <?php endwhile; ?>

            </div>
        <?php endif; ?>

    </div>
</section>

<!-- Construction Inventory Management Process Section End -->

<!-- integration tabs start -->
<?php
// ====== ACF Fields ======
$heading   = get_field('key_features_heading');
$content   = get_field('key_features_content');

$btn_text  = get_field('key_features_btn_text');
$btn_link  = get_field('key_features_btn_link'); // array: url,title,target

$cta_url    = !empty($btn_link['url']) ? $btn_link['url'] : 'javascript:;';
$cta_target = !empty($btn_link['target']) ? $btn_link['target'] : '_self';

// ====== Prepare tabs data from repeater ======
$tabs = [];
if (have_rows('key_features_tabs')) {
    while (have_rows('key_features_tabs')) { the_row();

        $tab_number = get_sub_field('tab_number');
        $tab_title  = get_sub_field('tab_title');
        $tab_desc   = get_sub_field('tab_description');
        $tab_img    = get_sub_field('tab_image'); // array

        $tabs[] = [
            'number' => $tab_number,
            'title'  => $tab_title,
            'desc'   => $tab_desc,
            'img'    => $tab_img,
        ];
    }
}

// Helper: convert index => A, B, C...
function wgo_tab_letter($index) {
    return chr(65 + (int)$index); // 0->A, 1->B ...
}
?>

<section class="section salon-inventory-key-features bg-white">
    <div class="container">
        <div class="text-cont text-center">
            <?php if (!empty($heading)) : ?>
                <h2 class="section-title mb-3"><?php echo esc_html($heading); ?></h2>
            <?php endif; ?>

            <?php if (!empty($content)) : ?>
                <p class="section-content"><?php echo wp_kses_post($content); ?></p>
            <?php endif; ?>
        </div>

        <!-- Tabs Start Here -->
        <div class="responsive-tabs">
            <div class="row">

                <!-- LEFT NAV -->
                <div class="col-lg-4">
                    <?php if (!empty($tabs)) : ?>
                        <ul class="nav nav-tabs" role="tablist">
                            <?php foreach ($tabs as $i => $t) :
                                $letter   = wgo_tab_letter($i);
                                $is_active = ($i === 0) ? 'active' : '';
                                $tab_id   = 'tab-' . $letter;
                                $pos_id   = 'pos-' . $letter;

                                $num  = !empty($t['number']) ? $t['number'] : str_pad((string)($i + 1), 2, '0', STR_PAD_LEFT);
                                $title = !empty($t['title']) ? $t['title'] : '';
                            ?>
                                <li class="nav-item">
                                    <a id="<?php echo esc_attr($tab_id); ?>"
                                       href="#<?php echo esc_attr($pos_id); ?>"
                                       class="nav-link <?php echo esc_attr($is_active); ?>"
                                       data-bs-toggle="tab"
                                       role="tab">
                                        <span><?php echo esc_html($num); ?></span>
                                        <?php echo esc_html($title); ?>
                                    </a>
                                </li>
                            <?php endforeach; ?>
                        </ul>
                    <?php endif; ?>
                </div>

                <!-- RIGHT CONTENT -->
                <div class="col-lg-8">
                    <div id="content" class="tab-content">
                        <?php if (!empty($tabs)) : ?>
                            <?php foreach ($tabs as $i => $t) :
                                $letter     = wgo_tab_letter($i);
                                $is_active  = ($i === 0) ? 'show active' : '';
                                $collapsed  = ($i === 0) ? '' : 'collapsed';
                                $collapse_show = ($i === 0) ? 'show' : '';

                                $pos_id      = 'pos-' . $letter;
                                $heading_id  = 'heading-' . $letter;
                                $collapse_id = 'pos-collapse-' . $letter;

                                $num   = !empty($t['number']) ? $t['number'] : str_pad((string)($i + 1), 2, '0', STR_PAD_LEFT);
                                $title = !empty($t['title']) ? $t['title'] : '';
                                $desc  = !empty($t['desc']) ? $t['desc'] : '';

                                $img_url = !empty($t['img']['url']) ? $t['img']['url'] : '';
                                $img_alt = !empty($t['img']['alt']) ? $t['img']['alt'] : 'tab';
                            ?>
                                <div id="<?php echo esc_attr($pos_id); ?>"
                                     class="card tab-pane fade <?php echo esc_attr($is_active); ?>"
                                     role="tabpanel"
                                     aria-labelledby="tab-<?php echo esc_attr($letter); ?>">

                                    <div class="card-header" role="tab" id="<?php echo esc_attr($heading_id); ?>">
                                        <div class="mb-0">
                                            <a class="<?php echo esc_attr($collapsed); ?>"
                                               data-bs-toggle="collapse"
                                               href="#<?php echo esc_attr($collapse_id); ?>"
                                               aria-expanded="<?php echo ($i === 0) ? 'true' : 'false'; ?>"
                                               aria-controls="collapse-<?php echo esc_attr($letter); ?>">
                                                <span><?php echo esc_html($num); ?></span>
                                                <?php echo esc_html($title); ?>
                                            </a>
                                        </div>
                                    </div>

                                    <div id="<?php echo esc_attr($collapse_id); ?>"
                                         class="collapse <?php echo esc_attr($collapse_show); ?>"
                                         data-bs-parent="#content"
                                         role="tabpanel"
                                         aria-labelledby="<?php echo esc_attr($heading_id); ?>">

                                        <div class="card-body">
                                            <div class="row">
                                                <div class="col-lg-6">
                                                    <div class="img-content">
                                                        <?php if (!empty($img_url)) : ?>
                                                            <img src="<?php echo esc_url($img_url); ?>"
                                                                 alt="<?php echo esc_attr($img_alt); ?>"
                                                                 class="img-fluid">
                                                        <?php endif; ?>
                                                    </div>
                                                </div>

                                                <div class="col-lg-6">
                                                    <div class="text-content">
                                                        <?php if (!empty($desc)) : ?>
                                                            <p><?php echo wp_kses_post($desc); ?></p>
                                                        <?php endif; ?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

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

            </div>
        </div>
        <!-- Tabs END Here -->

        <!-- Bottom Button -->
        <?php if (!empty($btn_text)) : ?>
            <div class="text-center mt-lg-5 mt-md-4">
                <a href="<?php echo esc_url($cta_url); ?>"
                   target="<?php echo esc_attr($cta_target); ?>"
                   class="primary animated-cta-btn">
                    <?php echo esc_html($btn_text); ?>
                </a>
            </div>
        <?php endif; ?>

    </div>
</section>

<!-- integration tabs end -->


<!-- step Salon Inventory Works Section-->
<?php
$heading  = get_field('works_heading');
$content  = get_field('works_content');
$image    = get_field('works_image');

$btn_text = get_field('works_btn_text');
$btn_link = get_field('works_btn_link');

$btn_url    = !empty($btn_link['url']) ? $btn_link['url'] : 'javascript:;';
$btn_target = !empty($btn_link['target']) ? $btn_link['target'] : '_self';

$img_url = !empty($image['url']) ? $image['url'] : '';
$img_alt = !empty($image['alt']) ? $image['alt'] : 'work';
?>

<section class="section salon-inventory-works bg-white pt-4">
    <div class="container">
        <div class="text-cont text-center">
            <?php if (!empty($heading)) : ?>
                <h2 class="section-title mb-3"><?php echo esc_html($heading); ?></h2>
            <?php endif; ?>

            <?php if (!empty($content)) : ?>
                <p class="section-content"><?php echo wp_kses_post($content); ?></p>
            <?php endif; ?>
        </div>

        <div class="row">
            <div class="col-lg-6">
                <div class="img-cont">
                    <?php if (!empty($img_url)) : ?>
                        <img src="<?php echo esc_url($img_url); ?>"
                             alt="<?php echo esc_attr($img_alt); ?>"
                             class="img-fluid">
                    <?php endif; ?>
                </div>
            </div>

            <div class="col-lg-6">
                <?php if (have_rows('works_steps')) : ?>
                    <ul>
                        <?php while (have_rows('works_steps')) : the_row();
                            $step_label = get_sub_field('step_label');
                            $step_title = get_sub_field('step_title');
                            $step_desc  = get_sub_field('step_desc');
                        ?>
                            <li>
                                <?php if (!empty($step_label)) : ?>
                                    <label><?php echo esc_html($step_label); ?></label>
                                <?php endif; ?>

                                <?php if (!empty($step_title)) : ?>
                                    <h3><?php echo esc_html($step_title); ?></h3>
                                <?php endif; ?>

                                <?php if (!empty($step_desc)) : ?>
                                    <p><?php echo wp_kses_post($step_desc); ?></p>
                                <?php endif; ?>
                            </li>
                        <?php endwhile; ?>
                    </ul>
                <?php endif; ?>
            </div>
        </div>

        <?php if (!empty($btn_text)) : ?>
            <div class="text-center mt-5">
                <a href="<?php echo esc_url($btn_url); ?>"
                   target="<?php echo esc_attr($btn_target); ?>"
                   class="primary animated-cta-btn">
                    <?php echo esc_html($btn_text); ?>
                </a>
            </div>
        <?php endif; ?>
    </div>
</section>


<!--Salon Inventory Works Section  -->

<!--Salon Product Inventory Section  -->
<?php
$heading = get_field('spi_heading');
?>

<section class="section salon-product-inventory p-0 bg-white">
    <div class="container">
        <div class="box">
            <div class="text-cont">
                <?php if (!empty($heading)) : ?>
                    <h2 class="section-title">
                        <?php echo wp_kses_post($heading); ?>
                    </h2>
                <?php endif; ?>
            </div>

            <div class="salon-product-inventory-slider">
                <?php if (have_rows('spi_slides')) : ?>
                    <?php while (have_rows('spi_slides')) : the_row();

                        $img     = get_sub_field('spi_image'); // array
                        $desc    = get_sub_field('spi_desc');
                        $btn_txt = get_sub_field('spi_btn_text');
                        $btn_lnk = get_sub_field('spi_btn_link'); // array url,title,target

                        $img_url = !empty($img['url']) ? $img['url'] : '';
                        $img_alt = !empty($img['alt']) ? $img['alt'] : 'product';

                        $btn_url    = !empty($btn_lnk['url']) ? $btn_lnk['url'] : 'javascript:;';
                        $btn_target = !empty($btn_lnk['target']) ? $btn_lnk['target'] : '_self';

                        if (empty($btn_txt) && !empty($btn_lnk['title'])) {
                            $btn_txt = $btn_lnk['title'];
                        }
                    ?>
                        <div class="row align-items-center">
                            <div class="col-xl-8 col-lg-7 col-md-6">
                                <div class="img-content">
                                    <?php if (!empty($img_url)) : ?>
                                        <img src="<?php echo esc_url($img_url); ?>"
                                             alt="<?php echo esc_attr($img_alt); ?>"
                                             class="img-fluid">
                                    <?php endif; ?>
                                </div>
                            </div>

                            <div class="col-xl-4 col-lg-5 col-md-6">
                                <div class="text-content">
                                    <?php if (!empty($desc)) : ?>
                                        <p><?php echo wp_kses_post($desc); ?></p>
                                    <?php endif; ?>

                                    <?php if (!empty($btn_txt)) : ?>
                                        <a href="<?php echo esc_url($btn_url); ?>"
                                           target="<?php echo esc_attr($btn_target); ?>"
                                           class="primary animated-cta-btn">
                                            <?php echo esc_html($btn_txt); ?>
                                        </a>
                                    <?php endif; ?>
                                </div>
                            </div>
                        </div>
                    <?php endwhile; ?>
                <?php endif; ?>
            </div>

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


<!--end Salon Product Inventory Section  -->
<!--Cloud-Based Salon Inventory Comparison Table  -->
<?php
$heading = get_field('cbs_heading');
$content = get_field('cbs_content');

$th_aspect = get_field('cbs_th_aspect') ?: 'Aspect';
$th_warego = get_field('cbs_th_warego') ?: 'WareGo';
$th_others = get_field('cbs_th_others') ?: 'Others';

$btn_text = get_field('cbs_btn_text');
$btn_link = get_field('cbs_btn_link');

$btn_url    = !empty($btn_link['url']) ? $btn_link['url'] : 'javascript:;';
$btn_target = !empty($btn_link['target']) ? $btn_link['target'] : '_self';
?>

<section class="section cloud-bassed-salon-inventory bg-white">
  <div class="container">
      <div class="text-cont text-center">
          <?php if (!empty($heading)) : ?>
              <h2 class="section-title mb-3"><?php echo esc_html($heading); ?></h2>
          <?php endif; ?>

          <?php if (!empty($content)) : ?>
              <p class="section-content"><?php echo wp_kses_post($content); ?></p>
          <?php endif; ?>
      </div>

      <div class="table-responsive">
          <table class="table">
              <thead>
              <tr>
                  <th><?php echo esc_html($th_aspect); ?></th>
                  <th>&nbsp;</th>
                  <th><?php echo esc_html($th_warego); ?></th>
                  <th><?php echo esc_html($th_others); ?></th>
              </tr>
              </thead>

              <tbody>
              <!-- (Optional) spacer row same as your HTML -->
              <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
              </tr>

              <?php if (have_rows('cbs_rows')) : ?>
                  <?php while (have_rows('cbs_rows')) : the_row();
                      $aspect = get_sub_field('cbs_aspect');
                      $warego = get_sub_field('cbs_warego');
                      $others = get_sub_field('cbs_others');
                  ?>
                      <tr>
                          <td><?php echo esc_html($aspect); ?></td>
                          <td>&nbsp;</td>
                          <td><?php echo wp_kses_post($warego); ?></td>
                          <td><?php echo wp_kses_post($others); ?></td>
                      </tr>
                  <?php endwhile; ?>
              <?php endif; ?>

              </tbody>
          </table>
      </div>

      <?php if (!empty($btn_text)) : ?>
          <div class="text-center mt-4">
              <a href="<?php echo esc_url($btn_url); ?>"
                 target="<?php echo esc_attr($btn_target); ?>"
                 class="primary animated-cta-btn">
                  <?php echo esc_html($btn_text); ?>
              </a>
          </div>
      <?php endif; ?>
  </div>
</section>
<!-- end Cloud-Based Salon Inventory Comparison Table -->

<!-- industry  section start -->
<?php 
$industry = [
    'class' => 'pale-blue',
    'category' => 'return-management',
];
get_template_part('templates-parts/pages/industry-solutions',null,$industry)?>
<!-- industry section end -->


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


<?php
$heading = get_field('cta_heading');
$content = get_field('cta_content');

$btn_text = get_field('cta_btn_text');
$btn_link = get_field('cta_btn_link');

$image = get_field('cta_image');

$btn_url    = !empty($btn_link['url']) ? $btn_link['url'] : 'javascript:;';
$btn_target = !empty($btn_link['target']) ? $btn_link['target'] : '_self';

$img_url = !empty($image['url']) ? $image['url'] : '';
$img_alt = !empty($image['alt']) ? $image['alt'] : 'cta';
?>

<section class="section dashboard-access-cta ebay-access-cta brewery-access-cta pt-5">
    <div class="container">
        <div class="box">
            <div class="row justify-content-between align-items-end">
                <div class="col-lg-6 col-xl-6">
                    <div class="text-cont">
                        <?php if (!empty($heading)) : ?>
                            <h2><?php echo esc_html($heading); ?></h2>
                        <?php endif; ?>

                        <?php if (!empty($content)) : ?>
                            <p><?php echo wp_kses_post($content); ?></p>
                        <?php endif; ?>

                        <?php if (!empty($btn_text)) : ?>
                            <a href="<?php echo esc_url($btn_url); ?>"
                               target="<?php echo esc_attr($btn_target); ?>"
                               class="primary animated-cta-btn">
                                <?php echo esc_html($btn_text); ?>
                            </a>
                        <?php endif; ?>
                    </div>
                </div>

                <div class="col-lg-6 col-xl-5">
                    <div class="img-cont">
                        <?php if (!empty($img_url)) : ?>
                            <img src="<?php echo esc_url($img_url); ?>"
                                 alt="<?php echo esc_attr($img_alt); ?>"
                                 class="img-fluid">
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>


<?php
/* ============================
 *  FAQS
 * ============================ */
?>
<section class="section faqs pt-0 bg-white">
    <div class="container">
        <div class="text-cont slide-down">
            <?php
            $faq_title      = get_field('faq_section_title');
            $faq_highlight  = get_field('faq_section_title_highlight');
            ?>
            <?php if ( $faq_title ) : ?>
                <h2 class="section-title">
                    <?php echo esc_html( $faq_title ); ?>
                    <?php if ( $faq_highlight ) : ?>
                        <span><?php echo esc_html( $faq_highlight ); ?></span>
                    <?php endif; ?>
                </h2>
            <?php endif; ?>
        </div>

        <?php if ( have_rows('faq_items') ) : ?>
            <div class="accordion" id="faqs-accordion">
                <?php
                $i = 1;
                while ( have_rows('faq_items') ) :
                    the_row();
                    $question   = get_sub_field('faq_question');
                    $answer     = get_sub_field('faq_answer');

                    // Unique IDs for accordion items
                    $heading_id  = 'headingFaq' . $i;
                    $collapse_id = 'collapseFaq' . $i;

                    // First item open by default
                    $is_first    = ( $i === 1 );
                    $show_class  = $is_first ? 'show' : '';
                    $expanded    = $is_first ? 'true' : 'false';
                    $btn_class   = $is_first ? '' : 'collapsed';
                ?>
                    <div class="accordion-item slide-down">
                        <h2 class="accordion-header" id="<?php echo esc_attr( $heading_id ); ?>">
                            <button
                                class="accordion-button <?php echo esc_attr( $btn_class ); ?>"
                                type="button"
                                data-bs-toggle="collapse"
                                data-bs-target="#<?php echo esc_attr( $collapse_id ); ?>"
                                aria-expanded="<?php echo esc_attr( $expanded ); ?>"
                                aria-controls="<?php echo esc_attr( $collapse_id ); ?>">
                                <?php echo esc_html( $i . '. ' . $question ); ?>
                            </button>
                        </h2>
                        <div
                            id="<?php echo esc_attr( $collapse_id ); ?>"
                            class="accordion-collapse collapse <?php echo esc_attr( $show_class ); ?>"
                            aria-labelledby="<?php echo esc_attr( $heading_id ); ?>"
                            data-bs-parent="#faqs-accordion">
                            <div class="accordion-body">
                                <?php
                              
                                echo $answer;
                                ?>
                            </div>
                        </div>
                    </div>
                <?php
                    $i++;
                endwhile;
                ?>
            </div>
        <?php endif; ?>
    </div>
</section>



<?php get_footer('new'); ?>



<script>
    $('.banner-logos-slider').owlCarousel({
        loop: false,
        margin: 10,
        nav: false,
        autoplay: true,
        dots: false,
        responsive: {
            0: {
                items: 1
            },
            600: {
                items: 2
            },
            1000: {
                items: 4
            }
        }
    });
    $('.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
            }
        }
    });
    $('.more-industries-slider').owlCarousel({
    loop: false, 
    margin: 20,
    nav: true,
    navText: ["<img src='assets/img/left-arrow.webp'>", "<img src='assets/img/right-arrow.webp'>"],
    dots: false,
    // stagePadding: 90, 
    responsive: {
        0: {
            items: 1, 
            stagePadding: 1, 
        },
        480: {
            items: 1, 
            stagePadding: 5, 
        },
        600: {
            items: 2, 
            stagePadding: 0, 

        },
        1200: {
            items : 3 ,
            // stagePadding: 35,
        },
    }
});
$('.real-feedback-slider').owlCarousel({
        loop:false,
        margin:40,
        nav:false,
        dots:false,
        dotsData:true,
        responsive:{
            0:{
                items:1
            },
            768:{
                items:2,
                margin:20
            },
            1000:{
                items:2
            }
        }
    });


</script>
<script>
    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
            },
        }
    });
</script>

<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
            }
        }
    });
    $('.real-feedback-slider').owlCarousel({
        loop:false,
        margin:40,
        nav:false,
        dots:false,
        dotsData:true,
        responsive:{
            0:{
                items:1
            },
            768:{
                items:2,
                margin:20
            },
            1000:{
                items:2
            }
        }
    });
</script>


<script>
document.addEventListener("DOMContentLoaded", function () {
  const section = document.querySelector(".construction-inventory-management-process");
  if (!section) return;

  const processImg = section.querySelector("#process-img");
  const stepCards  = section.querySelectorAll(".inventory-steps-card-wrapper");

  if (processImg && stepCards.length) {
    const firstCard = stepCards[0];
    firstCard.classList.add("active");
    const firstImg = firstCard.getAttribute("data-image");
    if (firstImg) processImg.src = firstImg;

    stepCards.forEach(card => {
      card.addEventListener("click", () => {
        stepCards.forEach(c => c.classList.remove("active"));
        card.classList.add("active");

        const imgPath = card.getAttribute("data-image");
        if (imgPath) {
          processImg.src = imgPath;
        }
      });
    });
  }

  const scrollList  = section.querySelector(".inventory-process-steps-wrapper");  
  const scrollTrack = section.querySelector(".scroll-height-control");            
  const trackDiv    = scrollTrack ? scrollTrack.querySelector(".track-div") : null;

  function updateScrollIndicator() {
    if (!scrollList || !scrollTrack || !trackDiv) return;

    const contentHeight = scrollList.scrollHeight;
    const visibleHeight = scrollList.clientHeight;
    const scrollTop     = scrollList.scrollTop;
    const trackHeight   = scrollTrack.offsetHeight;

    if (contentHeight <= visibleHeight) {
      trackDiv.style.display = "none";
      return;
    } else {
      trackDiv.style.display = "block";
    }

    const thumbHeight = Math.max((visibleHeight / contentHeight) * trackHeight, 30);
    trackDiv.style.height = thumbHeight + "px";

    const maxThumbTop = trackHeight - thumbHeight;
    const thumbTop = (scrollTop / (contentHeight - visibleHeight)) * maxThumbTop;

    trackDiv.style.top = thumbTop + "px";
  }

  updateScrollIndicator();

  if (scrollList) {
    scrollList.addEventListener("scroll", updateScrollIndicator);
  }

  window.addEventListener("resize", updateScrollIndicator);
});
</script>




<script>
    $(document).ready(function () {
        $('.warehouse-slotting-optimization').each(function () {
            
            var $section = $(this);
            var $slider = $section.find('.banner-main-slider');
            var $navBox = $section.find('.owl-nav-links');

            if (!$slider.length) return;

            var slideCount = $slider.find('.slottting-card').length;

            $navBox.empty();
            for (var i = 0; i < slideCount; i++) {
                $navBox.append(
                    '<a href="#" aria-label="Go to slide ' + (i + 1) + '"></a>'
                );
            }

            var $navLinks = $navBox.find('a');

            $navLinks.eq(0).addClass('active');

            $slider.owlCarousel({
                items: 3,
                loop: true,
                autoplay: true,
                autoplayTimeout: 4000,
                autoplayHoverPause: true,
                margin: 23,
                nav: false,
                dots: false,
                smartSpeed: 600,
                mouseDrag: true,
                touchDrag: true,
                pullDrag: true,
                slideBy: 1, 
                responsive: {
                    0: { items: 1 },
                    768: { items: 2 },
                    1200: { items: 3 }
                }
            });

            $navLinks.on('click', function (e) {
                e.preventDefault();

                var index = $(this).index();

                $slider.trigger('to.owl.carousel', [index, 500, true]);

                $navLinks.removeClass('active');
                $(this).addClass('active');
            });

            $slider.on('changed.owl.carousel', function (event) {
                var carousel = event.relatedTarget;

                var relIndex = carousel.relative(carousel.current());

                $navLinks.removeClass('active')
                    .eq(relIndex).addClass('active');
            });

        });

    });
</script>
<script>
    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
            },
        }
    });
</script>
<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
            }
        }
    });
</script>
<script>
    $('.salon-inventory-services-slider').owlCarousel({
        loop:true,
        items: 1,
        margin:10,
        nav:true,
        mouseDrag: false,
        navText: ["< Prev","Next >"],
        dots: false
    });
</script>