/* =========================
   PRODUCTS PAGE – FINAL
   ========================= */

.products-page {
  padding-bottom: 48px;
}

/* =========================
   HEADER
   ========================= */

.products-header {
  margin-bottom: 24px;
}

.products-header h1 {
  margin-bottom: 6px;
}

.products-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 520px;
}

/* =========================
   CATEGORY NAV (SECTION NAV)
   ========================= */

.product-category-nav {
  display: flex;
  gap: 20px;
  margin: 20px 0 28px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.product-category-nav a {
  font-size: 14px;
  font-weight: 600;
  color: #888;
  text-decoration: none;
  position: relative;
  padding-bottom: 6px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.product-category-nav a:hover {
  color: #2b2b2b;
}

/* ACTIVE STATE (optional – kalau pakai scroll spy) */
.product-category-nav a.is-active {
  color: #2b2b2b;
}

.product-category-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -9px;
  width: 100%;
  height: 2px;
  background: var(--accent-main);
}

/* STICKY STATE */
.product-category-nav.is-sticky {
  position: sticky;
  top: 56px; /* tinggi header */
  background: #fff;
  z-index: 40;
  padding-top: 12px;
}

/* =========================
   PRODUCT SECTION
   ========================= */

.product-section {
  margin-bottom: 56px;

  /* ⬇️ KUNCI: klik kategori pas di bawah tab */
  scroll-margin-top: 120px;
}

.product-section h2 {
  margin-bottom: 16px;
  font-size: 1.2rem;
}

/* =========================
   PRODUCT GRID
   ========================= */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* =========================
   PRODUCT CARD
   ========================= */

.product-card {
  background: #fff;
  padding: 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.1);
}

.product-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
  transition: transform 0.25s ease;
}

.product-card:hover .product-thumb {
  transform: scale(1.03);
}

.product-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.product-card .price {
  color: var(--accent-secondary);
  font-weight: 600;
  margin-bottom: 12px;
}

/* =========================
   BUTTON
   ========================= */

.btn-detail {
  display: inline-block;
  padding: 8px 14px;
  background: #f5f5f5;
  border-radius: 10px;
  font-size: 14px;
  text-decoration: none;
  color: #333;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    color 0.2s ease;
}

.product-card:hover .btn-detail {
  background: var(--accent-main);
  color: #fff;
  transform: translateY(-1px);
}
.product-desc ul {
  margin: 8px 0 12px 18px;
  padding-left: 18px;
}

.product-desc li {
  list-style: disc;
  margin-bottom: 6px;
  line-height: 1.6;
}

.product-desc p {
  margin-bottom: 10px;
  line-height: 1.7;
}

/* =========================
   MOBILE OPTIMIZATION
   ========================= */

@media (max-width: 768px) {
  /* kategori di bawah deskripsi, bisa geser */
  .product-category-nav {
    gap: 16px;
    margin-top: 16px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .product-category-nav::-webkit-scrollbar {
    display: none;
  }

  /* grid mobile */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .product-card {
    padding: 12px;
    border-radius: 12px;
  }

  .product-card h3 {
    font-size: 0.95rem;
  }

  .product-card .price {
    font-size: 0.9rem;
  }

  .btn-detail {
    font-size: 13px;
    padding: 7px 12px;
  }
}
