/* ================= HERO ================= */
.hero-carousel {
  padding: 20px 0;
  position: relative;
  overflow: hidden;
}

.hero-shell {
  position: relative;
  overflow: visible;
}

.hero-banners {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  touch-action: pan-y;
  width: 100%;
  aspect-ratio: 3 / 1;
  max-width: 1260px;
  margin: 0 auto;
  z-index: 1;
}

.hero-banners:active {
  cursor: grabbing;
}

/* ================= BANNER ================= */
.banner-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 28px;
  will-change: transform;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  z-index: 0;
  transition:
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.9s ease,
    height 0.9s ease,
    filter 0.7s ease,
    opacity 0.4s ease;
}

.banner-wrap.hide {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  pointer-events: none;
  z-index: 0;
}

.banner-wrap.no-anim {
  transition: none !important;
}

.banner {
  width: 100%;
  height: 100%;
  position: relative;
  background: transparent; /* jangan hitam */
}

.banner a {
  display: block;
  width: 100%;
  height: 100%;
}

.banner a,
.banner-link {
  -webkit-tap-highlight-color: transparent;
  outline: none;
  text-decoration: none;
  color: inherit;
}

/* 🔥 MATIIN SEMUA STATE MOBILE */
.banner a:focus,
.banner a:active,
.banner-link:focus,
.banner-link:active {
  outline: none;
  background: transparent;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* banner lokal utuh */
  object-position: center center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

.banner-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
}

.banner-btn.prev {
  left: -48px; /* desktop luar */
}

.banner-btn.next {
  right: -48px;
}

.banner-wrap.main {
  width: 100%;
  height: 100%;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  z-index: 5;
}

/* ===== LEFT ===== */
.banner-wrap.left {
  width: 100%; /* 🔥 SAMA SEMUA */
  height: 100%;
  pointer-events: none;
  transform: translate(calc(-50% - 60%), -50%) scale(0.85);
  z-index: 2;
}

/* ===== RIGHT ===== */
.banner-wrap.right {
  width: 100%; /* 🔥 SAMA SEMUA */
  height: 100%;
  pointer-events: none;
  transform: translate(calc(-50% + 60%), -50%) scale(0.85);
  z-index: 2;
}

/* ===== EFFECT ===== */
.banner-wrap.left img,
.banner-wrap.right img {
  filter: blur(4px) grayscale(50%) brightness(0.8);
  transform: scale(1.02);
}

.banner,
.banner img,
.banner-overlay {
  border-radius: 28px;
}

/* overlay dimatiin dulu biar banner promo ga gelap */
.banner-overlay {
  display: none;
}

/* content */
.banner-content {
  position: absolute;
  bottom: 40px;
  left: 40px;
  color: #fff;
  max-width: 500px;
  z-index: 2;
}

.banner-content h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 8px;
}

.banner-content p {
  font-size: 14px;
  margin: 0;
}

/* ================= FILTER ================= */
.filter-bar {
  padding: 20px 0;
}

.categories {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cat-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  color: #334155;
}

.cat-btn.active {
  background: #0060ad;
  color: #fff;
}

/* ================= PRODUCT ================= */
.product-catalog {
  padding: 48px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 260px);
  gap: 22px;
}

.product-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%; 
}

.product-card {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6eef4;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
  transition: 0.2s;
}

.product-card:hover {
  transform: translateY(-6px);
}

.image-wrapper {
  aspect-ratio: 1/1;
  overflow: hidden;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-info {
  padding: 16px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.category-tag {
  font-size: 12px;
  font-weight: 700;
  color: #72a0c1;
}

.rating {
  font-size: 12px;
  color: #f59e0b;
}

.product-info h3 {
  margin: 6px 0;
  font-size: 18px;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price {
  white-space: nowrap; /* tetap 1 baris */
  font-weight: 800;
  color: #0e66b3;
}

/* ================= MOBILE MODE (GLOBAL) ================= */

.hero-banners.mobile-mode {
  overflow: hidden;
}

.banner-track {
  height: 100%;
  will-change: transform;
}

.banner-track.no-anim {
  transition: none !important;
}

.hero-banners.mobile-mode .banner-track.no-anim {
  transition: none !important;
}

.hero-banners.mobile-mode .banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
  will-change: transform;
}

.hero-banners.mobile-mode .banner-wrap {
  position: relative;
  top: auto;
  left: auto;
  min-width: 100%;
  height: 100%;
  flex: 0 0 100%;
  border-radius: 28px;
  overflow: hidden;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto;
  z-index: auto;
}

.hero-banners.mobile-mode .banner {
  width: 100%;
  height: 100%;
}

.hero-banners.mobile-mode .banner-wrap.hide,
.hero-banners.mobile-mode .banner-wrap.left,
.hero-banners.mobile-mode .banner-wrap.right,
.hero-banners.mobile-mode .banner-wrap.main {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

/* ================= RESPONSIVE ================= */

/* ===== TABLET BESAR (≤1280px) ===== */
@media (max-width: 1280px) {
  /* ==== BANNER (KEEP, JANGAN UBAH LOGIC) ==== */
  .banner-wrap.main {
    width: 100%;
  }

  .hero-banners {
    aspect-ratio: 3 / 1;
  }

  .banner-btn {
    z-index: 5;
  }

  .banner-btn.prev {
    left: 12px;
  }

  .banner-btn.next {
    right: 12px;
  }

  /* ==== PRODUCT GRID ==== */
  .product-catalog {
    padding: 36px 20px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, 240px);
    justify-content: start; /* 🔥 FIX: MEpet kiri */
    gap: 20px;
  }

  .product-card-link {
    width: 240px;
  }

  .product-card {
    border-radius: 18px;
  }

  .product-info {
    padding: 14px;
  }

  .product-info h3 {
    font-size: 15.5px;
  }

  .price {
    font-size: 14.5px;
  }

  .category-tag {
    font-size: 11px;
  }
}

/* ===== TABLET KECIL (≤1024px) ===== */
@media (max-width: 1024px) {
  .product-catalog {
    padding: 30px 10px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, 220px);
    justify-content: start;
    gap: 18px;
  }

  .product-card-link {
    width: 220px;
  }

  .product-info {
    padding: 13px;
  }

  .product-info h3 {
    font-size: 14.5px;
  }

  .price {
    font-size: 13.5px;
  }

  .category-tag {
    font-size: 11px;
  }
}

/* ===== MOBILE BESAR (≤768px) ===== */
@media (max-width: 768px) {
  /* ==== BANNER ==== */
  .hero-banners {
    aspect-ratio: 3 / 1;
  }

  .banner-content {
    left: 20px;
    bottom: 20px;
    max-width: 75%;
  }

  .banner-content h2 {
    font-size: 18px;
  }

  .banner-content p {
    font-size: 12px;
  }

  /* ==== PRODUCT ==== */
  .product-catalog {
    padding: 24px 14px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr); /* 🔥 selalu 2 kolom */
    gap: 14px;
  }

  .product-card-link {
    width: 160px;
  }

  .product-info {
    padding: 11px;
  }

  .product-info h3 {
    font-size: 13.5px;
    font-weight: 700;
  }

  .price {
    font-size: 13px;
  }

  .category-tag {
    font-size: 10px;
  }
}

/* ===== MOBILE KECIL (≤480px) ===== */
@media (max-width: 480px) {
  .product-catalog {
    padding: 20px 12px;
  }

.grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

  .product-card-link {
    width: 100%;
  }

  .product-info {
    padding: 10px;
  }

  .product-info h3 {
    font-size: 13px;
  }

  .price {
    font-size: 12px;
  }

  .category-tag {
    font-size: 10px;
  }
}

/* ===== MOBILE KECIL BANGET (≤360px) ===== */
@media (max-width: 360px) {
  .grid {
    gap: 10px;
    justify-content: start;
  }

  .product-info h3 {
    font-size: 12px;
  }

  .price {
    font-size: 11px;
  }
}
