// Scroll to Top
window.onscroll = function() {
  const organic_online_shop_button = document.querySelector('.scroll-top-box');
  if (organic_online_shop_button) {
    if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
      organic_online_shop_button.style.display = "block";
    } else {
      organic_online_shop_button.style.display = "none";
    }
  }
};

const scrollTopLink = document.querySelector('.scroll-top-box a');
if (scrollTopLink) {
  scrollTopLink.onclick = function(event) {
    event.preventDefault();
    window.scrollTo({ top: 0, behavior: 'smooth' });
  };
}

// banner js
jQuery(document).ready(function ($) {

    $('.product-sec .owl-carousel').owlCarousel({
        loop: true,
        margin: 20,
        nav: false,
        dots: false,
        autoplay: false,
        responsive:{
            0:{
                items:1
            },
            768:{
                items:3
            },
            992:{
                items:3
            },
            1200:{
                items:4
            }
        }
    });

});

jQuery(document).ready(function ($) {

    $('.banner-img-box-columns').owlCarousel({
        loop: true,
        margin: 8,
        nav: false,
        dots: true,
        autoplay: true,
        autoplayTimeout: 3000,
        smartSpeed: 600,

        responsive: {
            0: {
                items: 1
            },
            768: {
                items: 2
            },
            1200: {
                items: 3
            }
        }
    });

});