<?php
/*
Template Name: Jewellery Inventory Software
*/

get_header('new');
?>
<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>
                    <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-content-lg-center">
                <div class="img-cont d-block text-center" style="min-height:300px">
					<?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)" srcset="<?php echo $mobile_img_url ? $mobile_img_url : $desktop_img_url ?>">
        <img src="<?php echo $desktop_img_url;?>" loading="eager" fetchpriority="high" decoding="async" width="636" height="365" class="img-fluid no-lazy" alt="Jewellry Banner">
    </picture>
					
                </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 -->


<!-- Why Jewellry Inventory Gets Hard Start -->
<section class="section why-jewelry-inventory pale-blue">
    <div class="container">
        <div class="row">
            <div class="col-lg-6">
                <div class="img-cont">
                    <img src="<?php echo get_field('why_jewellry_inventory_gets_hard_section_image'); ?>" alt="<?php echo wp_strip_all_tags(get_field('why_jewellry_inventory_gets_hard_section_title')); ?>" class="img-fluid" loading="lazy">
                </div>
            </div>
            <div class="col-lg-6">
                <div class="text-cont">

                    <?php if(get_field('why_jewellry_inventory_gets_hard_section_title')): ?>
                        <h2 class="section-title">
                            <?php echo get_field('why_jewellry_inventory_gets_hard_section_title'); ?>
                        </h2>
                    <?php endif; ?>

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

                    <?php if(have_rows('why_jewellry_inventory_gets_hard_section_list')): ?>
                        <ul>
                            <?php $count = 1; ?>
                            <?php while(have_rows('why_jewellry_inventory_gets_hard_section_list')): the_row(); ?>
                                <li>
                                    <span><?php echo str_pad($count, 2, '0', STR_PAD_LEFT); ?></span>
                                    <?php echo get_sub_field('why_jewellry_inventory_gets_hard_section_list_item'); ?>
                                </li>
                                <?php $count++; ?>
                            <?php endwhile; ?>
                        </ul>
                    <?php endif; ?>

                    <?php 
                    $button = get_field('why_jewellry_inventory_gets_hard_section_button');
                    if($button): 
                    ?>
                        <a href="<?php echo $button['url']; ?>" class="primary animated-cta-btn" target="<?php echo $button['target'] ? $button['target'] : '_self'; ?>">
                            <?php echo $button['title']; ?>
                        </a>
                    <?php endif; ?>

                </div>
            </div>
        </div>
    </div>
</section>
<!-- Why Jewellry Inventory Gets Hard End -->


<!-- Jewellry Easier Smart Features Inventory Start -->
<section class="section why-jewelry-inventory-smart-features bg-white">
    <div class="container">

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

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

        <div class="row gy-4">
            <?php 
            $count = 1;

            if(have_rows('jewellry_esf_invent_section_cards')):
                while(have_rows('jewellry_esf_invent_section_cards')): the_row();

                    $card_title    = get_sub_field('jewellry_esf_invent_section__card_title');
                    $card_text     = get_sub_field('jewellry_esf_invent_section__card_text');
                    $card_image    = get_sub_field('jewellry_esf_invent_section__card_image');
                    $is_image_only = get_sub_field('is_image_only');
            ?>

                <?php if($is_image_only == 'yes'  && $card_image): ?>
                    <div class="col-lg-8">
                        <div class="img-cont">
                            <img src="<?php echo $card_image; ?>" alt="Card Image" class="img-fluid" loading="lazy">
                        </div>
                    </div>
                <?php else: ?>
                    <div class="col-lg-4">
                        <div class="card">
                            <h3>
                                <?php echo $card_title; ?>
                                <span><?php echo str_pad($count, 2, '0', STR_PAD_LEFT); ?></span>
                            </h3>
                            <p>
                                <?php echo $card_text; ?>
                            </p>
                        </div>
                    </div>
                    <?php $count++; ?>
                <?php endif; ?>

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

        <?php 
        $button = get_field('jewellry_esf_invent_section_button');
        if($button): 
        ?>
            <div class="demo-btn-wrapper text-center mt-5">
                <a href="<?php echo $button['url']; ?>" 
                   class="primary animated-cta-btn"
                   target="<?php echo $button['target'] ? $button['target'] : '_self'; ?>">
                    <?php echo $button['title']; ?>
                </a>
            </div>
        <?php endif; ?>

    </div>
</section>
<!-- Jewellry Easier Smart Features Inventory End -->


<section class="section comprehensive-features manufacturing-warehouse-features jewelry-inventory-management-needs pt-0">
    <div class="container">
        <div class="text-cont text-center">
            <h2 class="section-title mb-5">
                <?php echo get_field('cf_section_title'); ?>
            </h2>
            <p class="section-content">
                <?php echo get_field('cf_section_subtitle'); ?>
            </p>
        </div>

        <!-- Tabs Start Here -->
        <div class="responsive-tabs">
            <?php if (have_rows('cf_tabs')) : ?>
                <ul class="nav nav-tabs" role="tablist">
                    <?php
                    $i = 0;
                    while (have_rows('cf_tabs')) : the_row();
                        $tab_id = get_sub_field('cf_tab_id');
                        $tab_title = get_sub_field('cf_tab_title');
                        $active_class = $i == 0 ? 'active' : '';
                    ?>
                        <li class="nav-item">
                            <a id="tab-<?php echo esc_attr($tab_id); ?>"
                               href="#pos-<?php echo esc_attr($tab_id); ?>"
                               class="nav-link <?php echo esc_attr($active_class); ?>"
                               data-bs-toggle="tab" role="tab">
                                <?php echo $tab_title; ?>
                            </a>
                        </li>
                    <?php $i++; endwhile; ?>
                </ul>

                <div id="cf-tab-content" class="mt-5 tab-content" role="tablist">
                    <?php
                    $j = 0;
                    while (have_rows('cf_tabs')) : the_row();
                        $tab_id = get_sub_field('cf_tab_id');
                        $tab_title = get_sub_field('cf_tab_title');
                        $tab_image = get_sub_field('cf_tab_image');
                        $tab_heading = get_sub_field('cf_tab_heading');
                        $tab_description = get_sub_field('cf_tab_description');
                        $tab_button_text = get_sub_field('cf_tab_button_text');
                        $tab_button_link = get_sub_field('cf_tab_button_link');
                        $active_class = $j == 0 ? 'show active' : '';
                    ?>
                        <div id="pos-<?php echo esc_attr($tab_id); ?>" class="card tab-pane fade <?php echo esc_attr($active_class); ?>" role="tabpanel" aria-labelledby="tab-<?php echo esc_attr($tab_id); ?>">
                            <div class="card-header" role="tab" id="heading-<?php echo esc_attr($tab_id); ?>">
                                <h5 class="mb-0">
                                    <a data-bs-toggle="collapse" href="#pos-collapse-<?php echo esc_attr($tab_id); ?>" aria-expanded="<?php echo $j == 0 ? 'true' : 'false'; ?>" aria-controls="collapse-<?php echo esc_attr($tab_id); ?>">
                                        <?php echo esc_html($tab_title); ?>
                                    </a>
                                </h5>
                            </div>

                            <div id="pos-collapse-<?php echo esc_attr($tab_id); ?>" class="collapse <?php echo $j == 0 ? 'show' : ''; ?>" data-bs-parent="#cf-tab-content" role="tabpanel" aria-labelledby="heading-<?php echo esc_attr($tab_id); ?>">
                                <div class="card-body">
                                    <div class="row align-items-center">
                                        <div class="col-lg-6">
                                            <div class="img-cont">
                                                <?php if ($tab_image): ?>
                                                    <img src="<?php echo esc_url($tab_image); ?>" alt="<?php echo esc_attr($tab_title); ?>" class="img-fluid">
                                                <?php endif; ?>
                                            </div>
                                        </div>

                                        <div class="col-lg-6">
                                            <div class="text-cont">
                                                <h3><?php echo $tab_heading; ?></h3>
                                                <p><?php echo $tab_description; ?></p>

                                                <?php if (have_rows('cf_tab_list')): ?>
                                                    <ul>
                                                        <?php while (have_rows('cf_tab_list')) : the_row(); ?>
                                                            <li>
                                                                <?php
                                                                $list_svg = get_sub_field('cf_list_svg');
                                                                $list_text = get_sub_field('cf_list_text');
                                                                if ($list_svg) {
                                                                    echo '<span class="icon">' . $list_svg . '</span>';
                                                                }
                                                                echo $list_text;
                                                                ?>
                                                            </li>
                                                        <?php endwhile; ?>
                                                    </ul>
                                                <?php endif; ?>

                                                <?php if ($tab_button_text && $tab_button_link): ?>
                                                    <a href="<?php echo esc_url($tab_button_link); ?>" class="primary animated-cta-btn">
                                                        <?php echo $tab_button_text; ?>
                                                    </a>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    <?php $j++; endwhile; ?>
                </div>
            <?php endif; ?>
        </div>
        <!-- Tabs END Here -->
    </div>
</section>


<!-- CTA start -->
<?php $ctas = [
    'class' => 'jewelry-inventory-software-cta pb-0',
    'heading_class' => 'cta-title',
    'para_class' => 'cta-description',
	'col_left_class' => 'col-lg-6',
    'col_right_class' => 'col-lg-6',
    'button_class' => 'accent-btn',
]; 
get_template_part('templates-parts/pages/3pl-client-portal-cta',null,$ctas);?>
<!-- CTA end -->


<!-- WareGo vs Other Jewelry Inventory Software Start -->

<section class="section other-jewelry-inventory-software bg-white">
    <div class="container">

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

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

        <div class="comparison-wrapper mt-lg-5">
            <div class="row g-0">

                <?php 
                $card_count = 0;

                if(have_rows('warego_vs_other_jewelry_inventory_software_section_cards')):
                    while(have_rows('warego_vs_other_jewelry_inventory_software_section_cards')): the_row();

                        $card_count++;
                        $card_header = get_sub_field('warego_vs_other_jewelry_inventory_software_section_card_header');

                        $col_class   = ($card_count == 1) ? 'col-lg-5' : 'col-lg-7';
                        $panel_class = ($card_count == 1) ? 'comparison-panel comparison-panel-left h-100' : 'comparison-panel comparison-panel-right h-100';
                ?>
                
                    <div class="<?php echo $col_class; ?>">
                        <div class="<?php echo $panel_class; ?>">

                            <?php if($card_header): ?>
                                <div class="panel-header text-center">
                                    <?php echo $card_header; ?>
                                </div>
                            <?php endif; ?>

                            <?php if(have_rows('warego_vs_other_jewelry_inventory_software_section_card_lists')): ?>
                                <?php while(have_rows('warego_vs_other_jewelry_inventory_software_section_card_lists')): the_row(); ?>
                                    <div class="panel-item">
                                        <h4>
                                            <?php echo get_sub_field('warego_vs_other_jewelry_inventory_software_section_card_lists_list_title'); ?>
                                        </h4>
                                        <p>
                                            <?php echo get_sub_field('warego_vs_other_jewelry_inventory_software_section_card_lists_list_text'); ?>
                                        </p>
                                    </div>
                                <?php endwhile; ?>
                            <?php endif; ?>

                        </div>
                    </div>

                <?php 
                    endwhile;
                endif; 
                ?>

            </div>
        </div>

        <?php 
        $button = get_field('warego_vs_other_jewelry_inventory_software_section_button');
        if($button): 
        ?>
            <div class="demo-btn-wrapper text-center mt-4">
                <a href="<?php echo $button['url']; ?>"
                   class="primary animated-cta-btn"
                   target="<?php echo $button['target'] ? $button['target'] : '_self'; ?>">
                    <?php echo $button['title']; ?>
                </a>
            </div>
        <?php endif; ?>

    </div>
</section>

<!-- WareGo vs Other Jewelry Inventory Software 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 -->

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

<!-- pricing section end -->


<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'  => 'jewellery-inventory-software',
    ];
    get_template_part('templates-parts/pages/faqs-new', null, $args);
?>

<?php
    get_footer('new');
?>
<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
            }
        }
    });
</script>