/* ============================================================
   SHOP — MOBILE-FIRST BASE
   Save to: public/css/shop.css
   Berdiri sendiri, tidak bergantung ke home.css.
   Load SEBELUM shop-desktop.css
   ============================================================ */

:root {
  --shop-forest: #1b4332;
  --shop-forest-dark: #163a2b;
  --shop-sage: #52796f;
  --shop-gold: #b98f4f;
  --shop-cream: #faf8f4;
  --shop-border: #ebe6dc;
  --shop-muted: #999;
}

/* ── SHOP HERO — editorial bold: tipografi sans-serif besar &
   tebal, background gradient forest + gradient mesh (blob blur
   lembut warna gold/sage) + tekstur grain halus buat kedalaman.
   Gak pakai foto/ikon literal (mis. daun) — biar kesannya modern,
   bukan klise "herbal generik". Breadcrumb sengaja dihilangkan
   biar fokus penuh ke judul & subjudul. ── */
.shop-hero {
  position: relative;
  background: linear-gradient(
    160deg,
    var(--shop-forest) 0%,
    var(--shop-forest-dark) 60%,
    #0d2419 100%
  );
  padding: 3.25rem 1.5rem 2.75rem;
  overflow: hidden;
}

/* Gradient mesh blobs — bentuk organik blur, warna gold & sage brand. */
.shop-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.shop-hero-blob-1 {
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(
    circle,
    rgba(212, 175, 106, 0.35) 0%,
    rgba(212, 175, 106, 0) 70%
  );
}
.shop-hero-blob-2 {
  bottom: -140px;
  right: 15%;
  width: 260px;
  height: 260px;
  background: radial-gradient(
    circle,
    rgba(140, 190, 160, 0.22) 0%,
    rgba(140, 190, 160, 0) 70%
  );
}

/* Grain halus — tekstur noise tipis biar background gak flat,
   kesan lebih editorial/print. SVG turbulence, opacity rendah. */
.shop-hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.shop-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.shop-hero-eyebrow {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--shop-gold);
  margin-bottom: 0.9rem;
}
.shop-hero-title {
  font-family: "Inter", sans-serif;
  font-size: clamp(2.1rem, 8vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.08;
  margin: 0 0 1rem;
}
.shop-hero-title span {
  color: var(--shop-gold);
}
.shop-hero-sub {
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  max-width: 30em;
  margin: 0 0 1.4rem;
}
.shop-hero-count {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--shop-gold);
}
.shop-hero-count::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--shop-gold);
}

/* ── Section wrapper & divider heading (masih dipakai di home.php) ── */
.katalog-section {
  padding: 1.5rem 0 3rem;
  background: var(--shop-cream);
}
.section-divider {
  text-align: center;
  padding: 0 1.25rem;
  position: relative;
}
.section-divider::before {
  content: "";
  display: block;
  width: 40px;
  height: 1.5px;
  background: var(--shop-gold);
  margin: 0 auto 1.25rem;
}
.section-divider-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.15;
  margin: 0;
}
.section-divider-title em {
  font-style: italic;
  color: var(--shop-sage);
}
.section-divider-sub {
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.6rem;
}

/* ── Kategori quick-pills (mobile: scroll horizontal) ── */
.cat-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 1rem 1rem;
  margin: 1.5rem -1rem 1rem;
  scrollbar-width: none;
}
.cat-pills::-webkit-scrollbar {
  display: none;
}
.cat-pill {
  flex: none;
  padding: 8px 16px;
  border: 1px solid var(--shop-border);
  border-radius: 999px;
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  color: #8a8577;
  background: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.cat-pill.active {
  background: var(--shop-forest);
  border-color: var(--shop-forest);
  color: #fff;
  font-weight: 600;
}

/* ── Mobile filter trigger (pengganti filter-bar yang dulu disembunyikan) ── */
.filter-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: calc(100% - 2rem);
  margin: 0 1rem 1.25rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #4a4a4a;
  cursor: pointer;
}
.filter-trigger .badge-count {
  background: var(--shop-gold);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

/* ── Filter panel: bottom sheet di mobile, jadi bar biasa di desktop (lihat shop-desktop.css) ── */
.filter-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 40;
}
.filter-panel-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.filter-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 1.25rem 1.25rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 41;
  max-height: 80vh;
  overflow-y: auto;
}
.filter-panel.is-open {
  transform: translateY(0);
}
.filter-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.filter-panel-head h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--shop-forest);
  margin: 0;
}
.filter-panel-close {
  border: none;
  background: none;
  font-size: 1.4rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
}

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.fb-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fb-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  color: #4a4a4a;
  cursor: pointer;
}
.fb-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--shop-forest);
  cursor: pointer;
}
.filter-bar .fb-label {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  color: #999;
  margin-bottom: 0.3rem;
}
.filter-bar .fb-group {
  display: block;
}
.filter-bar .fb-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  padding: 0 0.85rem;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  color: #1a1a1a;
  background: #fff;
  box-sizing: border-box;
}
.filter-bar .fb-input::placeholder {
  color: #b0a99f;
}
.filter-bar select.fb-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-color: #f5f2ee;
  padding-right: 2rem;
  cursor: pointer;
}
.filter-bar .fb-btn {
  height: 44px;
  border-radius: 8px;
  background: var(--shop-forest);
  color: #fff;
  border: none;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.filter-bar .fb-btn::before {
  content: "";
  display: block;
  width: 13px;
  height: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
.filter-bar .fb-btn:hover {
  background: var(--shop-forest-dark);
}

/* ── Search box — DIBIKIN BEDA dari input filter lain, biar kontras
   & gak keliatan "polos". Border tebal warna forest, ikon kaca
   pembesar, shadow lembut, focus state jelas. ── */
.fb-search-wrap {
  position: relative;
  margin-bottom: 1rem;
}
.fb-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--shop-gold);
  pointer-events: none;
}
.fb-search-input {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--shop-forest);
  border-radius: 10px;
  padding: 0 0.9rem 0 2.5rem;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  color: #1a1a1a;
  background: #fff;
  box-shadow: 0 2px 10px rgba(27, 67, 50, 0.08);
  box-sizing: border-box;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.fb-search-input::placeholder {
  color: #b0a99f;
}
.fb-search-input:focus {
  outline: none;
  border-color: var(--shop-gold);
  box-shadow: 0 0 0 3px rgba(185, 143, 79, 0.18);
}

.filter-reset {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  color: #bbb;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.filter-reset:hover {
  color: #555;
}

/* ── Toolbar ringkas di atas grid: jumlah produk + quick-sort
   compact ala "Urutkan : Terbaru ⌄". Shortcut cepat, terpisah
   dari filter panel penuh yang masih ada di sidebar/bottom-sheet. ── */
.prod-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1rem 0.9rem;
  flex-wrap: wrap;
}
.prod-toolbar-count {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  color: #999;
}
.prod-sort-compact {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  color: #4a4a4a;
  padding-right: 0.9rem;
}
.prod-sort-compact > span {
  font-weight: 700;
  color: #1a1a1a;
}
.prod-sort-compact select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: none;
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  color: var(--shop-forest);
  font-weight: 600;
  cursor: pointer;
}
.prod-sort-compact::after {
  content: "";
  position: absolute;
  right: 0;
  top: 45%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--shop-forest);
  border-bottom: 1.5px solid var(--shop-forest);
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

/* ── Product grid: mobile default 2 kolom, ukuran kartu konsisten ── */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 0 1rem;
}
.prod-card {
  background: #fff;
  border: 1px solid var(--shop-border);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.prod-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--shop-cream);
  overflow: hidden;
}
.prod-img-wrap img.img-main,
.prod-img-wrap img.img-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease;
}
.prod-img-wrap img.img-hover {
  opacity: 0;
}
.prod-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ede8e0;
  color: #ccc;
  font-size: 0.7rem;
  font-family: "Inter", sans-serif;
}
.prod-badge-diskon {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
  background: #e53935;
  color: #fff;
  font-family: "Inter", sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 6px;
  border-radius: 4px;
}
.prod-badge-terlaris {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  z-index: 2;
}
.prod-body {
  padding: 0.65rem 0.7rem 0.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.prod-cat {
  display: none;
} /* disembunyikan di mobile, muncul lagi di desktop */
.prod-name {
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #16321f;
  line-height: 1.25;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.1em;
}
/* ═══════════════════════════════════════════════════
   RATING DI CARD PRODUK — tambahkan ke shop.css / home.css
   (taruh dekat rule .prod-name / .prod-price-wrap yang sudah ada)
   ═══════════════════════════════════════════════════ */
.prod-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 2px 0 4px;
}
.prod-rating-stars {
  display: flex;
  gap: 1px;
  color: #f59e0b;
}
.prod-rating-num {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--clr-ink, #1a1a1a);
  font-family: var(--font-body);
}
.prod-rating-count {
  font-size: 0.7rem;
  color: var(--clr-muted, #6b7280);
  font-family: var(--font-body);
}
.prod-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: auto;
}
.prod-price {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #163a2b;
}
.prod-price-coret {
  font-family: "Inter", sans-serif;
  font-size: 0.62rem;
  color: #bbb;
  text-decoration: line-through;
}

/* ── Wishlist & cart button (mobile) ── */
.btn-wishlist {
  position: absolute;
  top: 8px;
  right: 44px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--shop-forest);
  z-index: 2;
}
.btn-wishlist .icon-heart-fill {
  display: none;
}
.btn-wishlist.active .icon-heart {
  display: none;
}
.btn-wishlist.active .icon-heart-fill {
  display: flex;
}
.btn-wishlist .icon-heart,
.btn-wishlist .icon-heart-fill {
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.btn-wishlist .bi-icon {
  width: 13px;
  height: 13px;
}
.btn-wishlist.active {
  color: #ef4444;
}
.btn-wishlist.active .icon-heart-fill {
  animation: shopHeartPop 0.25s ease;
}
@keyframes shopHeartPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.35);
  }
  100% {
    transform: scale(1);
  }
}

.btn-cart-mobile {
  display: flex;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--shop-forest);
  z-index: 2;
}
.btn-cart-mobile:active {
  background: var(--shop-forest);
  color: #fff;
}

.prod-actions {
  display: none;
} /* hover actions cuma relevan di desktop */

/* ── Empty state ── */
.shop-empty {
  text-align: center;
  padding: 4rem 1rem;
}
.shop-empty p {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  color: #ccc;
  font-style: italic;
  margin-bottom: 1.25rem;
}
.shop-empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--shop-forest);
  border: 1.5px solid var(--shop-forest);
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  text-decoration: none;
}
.shop-empty-cta:hover {
  background: var(--shop-forest);
  color: #fff;
}

/* ── Pagination ── */
.pager {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 2rem;
}
.pager a,
.pager span {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  background: #ede8e0;
  color: var(--shop-forest);
}
.pager a:hover,
.pager .active {
  background: var(--shop-forest);
  color: #fff;
}
.pager .disabled {
  background: #f5f0e8;
  color: #ccc;
  pointer-events: none;
}
