// Scroll to Top
window.onscroll = function() {
  const vet_care_center_button = document.querySelector('.scroll-top-box');
  if (vet_care_center_button) {
    if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
      vet_care_center_button.style.display = "block";
    } else {
      vet_care_center_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' });
  };
}

jQuery(document).ready(function() {
  jQuery('.product-sec .owl-carousel').owlCarousel({
    loop: true,
    margin: 20,
    nav: false,
    dots: false,
    rtl: false,
    responsive: {
    0: { 
      items: 1 
    },
    600: { 
      items: 2
    },
    1000: { 
      items: 3
    },
    1200: { 
      items: 4
    }
  },
    autoplay: false,
  });
});

jQuery(document).ready(function() {
  jQuery('.blog-sec .owl-carousel').owlCarousel({
    loop: true,
    margin: 20,
    nav: false,
    dots: false,
    rtl: false,
    responsive: {
    0: { 
      items: 1 
    },
    600: { 
      items: 2
    },
    1000: { 
      items: 3
    },
    1200: { 
      items: 3
    }
  },
    autoplay: false,
  });
});