:root {
  --font-main: 'Inter', sans-serif;
  --bg-light: #f0f0f0;
  --text-dark: #1e293b;
  --text-muted: #777;
  --btn-blue: #1a5adf;
  --btn-blue-hover: #154dc0;
  --border-gray: #e0e0e0;
}

* { 
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  line-height: 1.5;
  color: var(--text-muted);
}

h2 { 
  font-family: var(--font-main);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 28px;
  text-align: center;
}

/* Untuk tampilan desktop: 4 kolom */
@media (min-width: 768px) {
  .kategori-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Produk Populer */
.produk-populer-section {
  background-color: #f9fafb;
  padding: 60px 30px;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.produk-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (min-width: 768px) {
  .produk-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .produk-populer-section .container {
    max-width:75% !important;
    margin: auto !important;
  }

  .gambar-produk {
    height: 80% !important;
    object-fit: cover !important;
  }
}

.card-product {
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 20px; /* Tambahkan ini */
  }
.card-product:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.gambar-produk {
  width: 100%;
   height: 70%;
  
  object-fit: cover;
  background-color: #fff;
  display: block;
  border-radius: 0;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dark);
}

.card-judul {
  font-size: 10px;
  font-weight: 600;
  color: #4b5563;
  margin: 4px 0;
  text-transform: capitalize;
}

.card-text {
  font-size: 0.9rem;
  color: #555;
  margin-top: 6px;
}

.price-wrapper {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.price-discount {
  font-size: 13px;
  color: #9ca3af;
  text-decoration: line-through;
}

.price-final,
.price {
  font-size: 15px;
  font-weight: bold;
  color: #e91e63;
}

.badge-discount {
  background-color: #e11d48;
  color: white;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 6px;
}

.btn-view {
  background-color: var(--btn-blue);
  color: white;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn-view:hover {
  background-color: var(--btn-blue-hover);
}

.btn-detail {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background-color: #ffc107; /* warna kuning */
  color: #000;
  text-align: center;
  cursor: pointer;
}

.btn-detail-mewah:hover {
  background: linear-gradient(135deg, #ffcc00, #e6b800);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5);
  transform: scale(1.05);
}

/* Banner Flash Sale */
.flash-sale-banner {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 80px 20px;
  position: relative;
  color: #fff;
  text-align: center;
}

.flash-sale-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.flash-sale-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.flash-sale-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
}

.flash-sale-text {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 24px;
}

.btn-flash {
  display: inline-block;
  padding: 12px 28px;
  border: 2px solid #fff;
  border-radius: 999px;
  background-color: transparent;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s ease;
}

.btn-flash:hover {
  background-color: #fff;
  color: #000;
}

/* Thumbnail Horizontal */
.thumbnail-wrapper {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 0;
  scrollbar-width: none;
}

.thumbnail-wrapper::-webkit-scrollbar {
  display: none;
}

.thumbnail-img,
.video-thumb {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #ccc;
  cursor: pointer;
  transition: border 0.3s;
}

.thumbnail-img:hover,
.video-thumb:hover {
  border-color: #2563eb;
}

/* Responsif HP */
@media (max-width: 767.98px) {
  .produk-populer-section {
    padding: 16px 8px !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
  }

  .produk-populer-section .container {
    max-width: 100% !important;
    padding: 0 10px !important;
  }

  .produk-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

 const swiper = new Swiper('.trendingSwiper', {
  slidesPerView: 1.1,  // sedikit lebih dari 1 agar terlihat menggeser
  spaceBetween: 12,
  loop: true,
  centeredSlides: false,
  autoplay: {
    delay: 3000,
    disableOnInteraction: false,
  },
  pagination: {
    el: '.swiper-pagination',
    clickable: true,
  },
  navigation: {
    nextEl: '.swiper-button-next',
    prevEl: '.swiper-button-prev',
  },
  breakpoints: {
    576: {
      slidesPerView: 2.2,
    },
    768: {
      slidesPerView: 3,
    },
    992: {
      slidesPerView: 4,
    }
  }
});

