// Scroll to Top
document.addEventListener('DOMContentLoaded', () => {
  const summer_fashion_store_btn = document.body.appendChild(document.createElement('button'));
  summer_fashion_store_btn.className = 'return-to-top-btn';
  summer_fashion_store_btn.innerHTML = '<span class="dashicons dashicons-arrow-up-alt"></span>';

  window.addEventListener('scroll', () =>
    summer_fashion_store_btn.classList.toggle('show', window.scrollY > 300)
  );

  summer_fashion_store_btn.onclick = () => window.scrollTo({ top: 0, behavior: 'smooth' });
});

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

  // Slider
  $('.slider.owl-carousel').owlCarousel({
      nav: true,
      autoplay: true,
      margin: 20,
      lazyLoad: true,
      autoplayTimeout: 2000,
      loop: true,
      dots: false,
      navText: ["<span class='dashicons dashicons-arrow-left-alt'></span>", "<span class='dashicons dashicons-arrow-right-alt'></span>"],
      responsive: {
        0: { items: 1 },
        768: { items: 1 },
        992: { items: 1 },
        1200: { items: 1 }
      },
      autoplayHoverPause: true,
      mouseDrag: true
  });

  // Category
  $('.category.owl-carousel').owlCarousel({
      nav: false,
      autoplay: true,
      margin: 20,
      lazyLoad: true,
      autoplayTimeout: 1500,
      loop: true,
      dots: false,
      responsive: {
        0: { items: 1 },
        768: { items: 3 },
        992: { items: 3.5 },
        1200: { items: 4.5 }
      },
      autoplayHoverPause: true,
      mouseDrag: true
  });


});