// Função para inicializar todos os carrosséis Swiper
function initSwipers() {
  // Swiper para o banner
  const swiperBanner = new Swiper(".swiper-banner", {
    speed: 800,
    centerInsufficientSlides: true,
    slidesPerView: 1,
    navigation: {
      nextEl: ".banner-next",
      prevEl: ".banner-prev"
    },
    pagination: {
      el: ".banner-pagination",
      clickable: true,
    },
  });

  // Swiper para Energy Drink
  const swiperEnergyDrink = new Swiper(".swiper-energy-drink", {
    speed: 800,
    centerInsufficientSlides: true,
    slidesPerView: 2,
    navigation: {
      nextEl: ".energy-drink-next",
      prevEl: ".energy-drink-prev"
    },
    breakpoints: {
      992: {
        slidesPerView: 3,
      }
    }
  });

  // Swiper para Focus
  const swiperFocus = new Swiper(".swiper-focus", {
    speed: 800,
    centerInsufficientSlides: true,
    slidesPerView: 2,
    navigation: {
      nextEl: ".focus-next",
      prevEl: ".focus-prev"
    },
  });

  // Swiper para Energy Juice
  const swiperEnergyJuice = new Swiper(".swiper-energy-juice", {
    speed: 800,
    centerInsufficientSlides: true,
    slidesPerView: 2,
    navigation: {
      nextEl: ".juice-next",
      prevEl: ".juice-prev"
    },
    breakpoints: {
      768: {
        slidesPerView: 3,
      },
      992: {
        slidesPerView: 4,
      }
    }
  });

  // Swiper da Seção Sports Drinks
  const swiperSports = new Swiper(".swiper-sports", {
    slidesPerView: 2,
    speed: 600,
    centerInsufficientSlides: true,
    spaceBetween: 15,
    breakpoints: {
      768: {
        slidesPerView: 4,
      }
    }
  });
}

// Inicializar todos os carrosséis Swiper quando o DOM estiver pronto
jQuery(document).ready(function() {
  initSwipers();
});