/* ============================================
   POL GROSIR — Design System v3 "Ledger POL"
   Fusi "Ledger Hitam" (MuatMax) × brand POL (magenta/Fraunces/krem).
   Dunia GELAP plum-hitam hangat buat nav/hero/footer (rasa buku besar
   grosir), kanvas KERTAS krem buat katalog biar foto produk kebaca.
   Magenta tetap satu-satunya warna brand; JetBrains Mono buat SKU,
   angka ledger, & kicker. Radius lebih tegas (12px) — B2B tool, bukan toy.
   ============================================ */

@font-face {
  font-family: 'Fraunces Fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 97%;
  ascent-override: 90%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Jakarta Fallback';
  src: local('Segoe UI'), local('Roboto'), local('Helvetica Neue'), local('Arial');
  size-adjust: 100%;
}

:root {
  /* Brand magenta — dari logo POL */
  --primary:        #C026D3;
  --primary-hover:  #A21CAF;
  --primary-deep:   #5B2D8E;
  --primary-soft:   #FAE8FF;
  --magenta:        #EC4899;
  --purple:         #9333EA;
  --primary-ondark: #E879F9;   /* magenta yang lolos kontras di atas ink */
  --accent:         #FBBF24;   /* HANYA bintang rating */
  --accent-soft:    #FCEFC4;

  /* Dunia gelap — plum-hitam HANGAT (ledger) */
  --ink:            #17111A;   /* teks di kertas + panel gelap */
  --ink0:           #100B12;   /* nav & footer, paling dalam */
  --ink-2:          #241B27;   /* permukaan gelap terangkat */
  --on-dark:        #F7F2EA;
  --on-dark-muted:  #A79DA6;
  --line-dark:      rgba(247,242,234,0.14);

  /* Kertas */
  --cream:          #FAF6EE;
  --cream-deep:     #F1EADB;
  --border:         #E7DECA;
  --border-soft:    #F0E9D9;
  --muted:          #6E6274;
  --white:          #FFFFFF;

  --success:        #16A34A;
  --warning:        #F59E0B;
  --danger:         #DC2626;
  --wa:             #25D366;
  --wa-deep:        #128C7E;

  --grad-brand: linear-gradient(135deg, #9333EA 0%, #C026D3 50%, #EC4899 100%);
  --grad-btn:   linear-gradient(135deg, #C026D3 0%, #EC4899 100%);

  --font-display: 'Fraunces', 'Fraunces Fallback', Georgia, 'Times New Roman', serif;
  --font-body:    'Plus Jakarta Sans', 'Jakarta Fallback', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Elevasi: netral & tenang — bayangan cuma buat yang melayang */
  --shadow-xs: 0 1px 2px rgba(23,17,26,0.05);
  --shadow-sm: 0 2px 10px rgba(23,17,26,0.07);
  --shadow:    0 12px 30px rgba(23,17,26,0.10);
  --shadow-lg: 0 24px 60px rgba(23,17,26,0.16);
  --shadow-cta: 0 6px 18px rgba(192,38,211,0.28);
  /* Warisan (masih ada yang refer) */
  --pop:       0 6px 16px rgba(192,38,211,0.26);
  --pop-sm:    0 4px 12px rgba(192,38,211,0.22);

  --ease-out: cubic-bezier(.22,1,.36,1);

  --container-pad: 1rem;
  --container-max: 1180px;
  --nav-h: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: rgba(192,38,211,0.20); }

input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
input:hover, select:hover, textarea:hover { border-color: #D8CCAE; }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(192,38,211,0.13);
}
select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23C026D3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 12px 12px;
  padding-right: 2.4rem;
}
.form-row:focus-within .form-row__label { color: var(--primary); }

h1,h2,h3,h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.015em;
}

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-pad); }

/* mono ledger util — SKU, order id, angka meta */
.mono { font-family: var(--font-mono); letter-spacing: 0; }

/* ============================================
   GLOBAL UX + A11Y
   ============================================ */
a, button, .product-card, .filter-pill, .nav__cart,
.cart-item__stepper button, .search-clear, .pmodal__close {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: scale(0.97); transition: transform .06s ease; }
.filter-pill:active { transform: scale(0.95); }
.product-card:active { transform: scale(0.985); transition: transform .08s ease; }
.cart-item__stepper button:active,
.pmodal__close:active,
.nav__cart:active { transform: scale(0.9); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.btn:focus-visible, .filter-pill:focus-visible, .nav__cart:focus-visible,
.nav__link:focus-visible, .product-card:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
.nav :focus-visible, .footer :focus-visible { outline-color: var(--primary-ondark); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .skeleton, .stat-card--skel { animation: none; background: var(--cream-deep); }
}

/* ============================================
   NAVBAR — ledger gelap, sticky
   ============================================ */
.nav {
  background: rgba(16,11,18,0.92);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line-dark);
  color: var(--on-dark);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
  padding-block: 0.5rem;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--on-dark);
  letter-spacing: -0.02em;
}
.nav__logo { height: 32px; width: auto; display: block; filter: brightness(0) invert(1); opacity: 0.96; }
.nav__brand-text {
  font-size: 1.24rem;
  font-style: italic;
  font-weight: 600;
  color: var(--primary-ondark);
  letter-spacing: -0.01em;
}
.nav__brand em { font-style: italic; color: var(--primary-ondark); font-weight: 500; }
.nav__links { display: flex; gap: 0.3rem; align-items: center; }
.nav__link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--on-dark-muted);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-full);
  transition: color .18s var(--ease-out), background .18s var(--ease-out);
}
.nav__link:hover { color: var(--on-dark); background: rgba(247,242,234,0.08); }
.nav__link.is-active { color: var(--on-dark); }
.nav__cart {
  position: relative;
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  display: grid; place-items: center;
  color: var(--on-dark);
  transition: background .18s var(--ease-out), color .18s var(--ease-out);
}
.nav__cart:hover { background: rgba(247,242,234,0.10); color: var(--primary-ondark); }
.nav__cart-badge {
  position: absolute;
  top: 1px; right: 1px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
  border: 2px solid var(--ink0);
}

/* Chip auth di nav (diisi src/auth.js lewat [data-auth-slot]) */
.nav__auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.9rem 0.42rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--on-dark);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out);
  white-space: nowrap;
}
.nav__auth-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.35); }
.nav__auth-btn svg { width: 17px; height: 17px; flex: none; }
.nav__auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-dark);
  color: var(--on-dark);
  font-size: 12.5px;
  font-weight: 600;
  max-width: 160px;
  transition: background .18s var(--ease-out), border-color .18s var(--ease-out);
}
.nav__auth-chip:hover { background: rgba(247,242,234,0.08); border-color: rgba(247,242,234,0.3); }
.nav__auth-chip img {
  width: 26px; height: 26px;
  border-radius: 50%;
  flex: none;
  border: 1.5px solid var(--primary-ondark);
}
.nav__auth-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__auth-fallbackava {
  width: 26px; height: 26px;
  border-radius: 50%;
  flex: none;
  display: grid; place-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 12px; font-weight: 800;
  border: 1.5px solid var(--primary-ondark);
}
@media (max-width: 560px) {
  .nav__auth-btn span { display: none; }                 /* ikon G aja di HP */
  .nav__auth-btn { padding: 0.42rem 0.55rem; }
  .nav__auth-chip span { display: none; }
  .nav__auth-chip { padding: 0.3rem; border: 0; max-width: none; }
}

/* ============================================
   HERO — halaman buku besar gelap. Garis ledger horizontal,
   cincin kuas magenta (gema logo), kicker mono, statistik grosir.
   ============================================ */
.hero-strip {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(52% 110% at 86% 24%, rgba(147,51,234,0.20) 0%, transparent 62%),
    radial-gradient(40% 80% at 4% 118%, rgba(236,72,153,0.10) 0%, transparent 65%),
    linear-gradient(180deg, var(--ink0) 0%, var(--ink) 100%);
  color: var(--on-dark);
  padding: 3rem 0 3.6rem;
}
/* garis-garis buku besar */
.hero-strip::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0, transparent 43px,
    rgba(247,242,234,0.045) 43px, rgba(247,242,234,0.045) 44px
  );
  pointer-events: none;
}
/* cincin kuas magenta — gema logo POL, glow di gelap */
.hero-strip::before {
  content: "";
  position: absolute;
  right: -90px; top: 46%;
  width: 400px; height: 400px;
  transform: translateY(-50%) rotate(-14deg);
  border-radius: 50%;
  background:
    conic-gradient(from 210deg, rgba(147,51,234,0.55), rgba(192,38,211,0.75), rgba(236,72,153,0.5), rgba(147,51,234,0.55)) border-box;
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 34px), #000 calc(100% - 31px));
          mask: radial-gradient(closest-side, transparent calc(100% - 34px), #000 calc(100% - 31px));
  filter: blur(0.5px) drop-shadow(0 0 34px rgba(192,38,211,0.45));
  opacity: 0.8;
  pointer-events: none;
  z-index: 1;
}
@media (max-width: 720px) { .hero-strip::before { right: -220px; opacity: .45; } }
.hero-strip .container { position: relative; z-index: 2; }
@media (min-width: 820px) {
  .hero-strip { padding: 3.9rem 0 4.2rem; }
  .hero-strip__sub { font-size: 15.5px; }
}
.hero-strip__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-ondark);
  border: 1px solid rgba(232,121,249,0.35);
  background: rgba(232,121,249,0.08);
  padding: 0.36rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.15rem;
}
.hero-strip__badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary-ondark);
  box-shadow: 0 0 10px rgba(232,121,249,0.9);
}
.hero-strip__title {
  font-size: clamp(2rem, 5.8vw, 3.35rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.7rem;
  color: var(--on-dark);
  max-width: 680px;
  text-wrap: balance;
}
.hero-strip__title em { font-style: italic; color: var(--primary-ondark); }
.hero-strip__sub {
  font-size: 14.5px;
  color: var(--on-dark-muted);
  line-height: 1.65;
  max-width: 520px;
}
/* statistik grosir — baris entri buku besar */
.hero-strip__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.6rem;
}
.hero-strip__trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--on-dark);
  border: 1px solid var(--line-dark);
  background: rgba(247,242,234,0.04);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
}
.hero-strip__trust span::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 1.5px;
  background: var(--primary-ondark);
  transform: rotate(45deg);
}
.hero-strip__trust strong { color: var(--primary-ondark); font-weight: 700; }

/* ============================================
   SEARCH — pill putih besar NUMPANG di jahitan gelap→kertas
   ============================================ */
.search-bar {
  background: var(--cream);
  padding: 0 0 0.4rem;
}
.search-input-wrap {
  position: relative;
  max-width: 660px;
  margin: -1.65rem auto 0;      /* naik nutup jahitan hero */
  z-index: 30;
}
.search-input-wrap input[type="search"] {
  width: 100%;
  padding: 1rem 3rem 1rem 2.9rem;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  background: var(--white);
  font-size: 15px;                /* hindari zoom fokus iOS/Android */
  box-shadow: var(--shadow-lg);
  -webkit-appearance: none;
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.search-input-wrap input[type="search"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(192,38,211,0.12), var(--shadow-lg);
}
.search-input-wrap .search-icon {
  position: absolute; left: 1.1rem; top: 50%;
  transform: translateY(-50%);
  color: var(--primary); opacity: 0.8; pointer-events: none;
}
.search-clear {
  position: absolute; right: 0.45rem; top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--muted);
  font-size: 13px;
  transition: background .15s var(--ease-out), color .15s var(--ease-out);
}
.search-clear:hover { background: var(--cream-deep); color: var(--ink); }

.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem 0.15rem;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.result-meta strong { color: var(--ink); font-weight: 700; font-family: var(--font-mono); font-size: 12px; }
.result-meta select {
  width: auto;
  padding: 0.42rem 1.7rem 0.42rem 0.9rem;
  font-size: 13px;
  border-radius: var(--radius-full);
  background-color: var(--white);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

/* ============================================
   FILTER BAR — pill putih hairline; aktif = INK solid (ledger).
   Magenta disimpan buat harga & CTA.
   ============================================ */
.filter-bar {
  background: rgba(250,246,238,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
  padding: 0.65rem 0;
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
}
.filter-bar__inner {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-bar__inner::-webkit-scrollbar { display: none; }
.filter-pill {
  flex-shrink: 0;
  padding: 0.48rem 1.05rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: background .18s var(--ease-out), color .18s var(--ease-out), border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
  white-space: nowrap;
}
.filter-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-dark);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(23,17,26,0.22);
}
.filter-pill:hover:not(.is-active) {
  border-color: rgba(23,17,26,0.35);
  color: var(--ink);
}

/* ============================================
   PRODUCT GRID + CARD — kartu kertas di atas krem
   ============================================ */
.section { padding: 0.7rem 0 4rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}
@media (min-width: 520px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 0.9rem; } }
@media (min-width: 820px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
@media (min-width: 1100px){ .product-grid { grid-template-columns: repeat(5, 1fr); gap: 1.05rem; } }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.product-card { animation: cardIn .38s var(--ease-out) both; }
.product-card:nth-child(1)  { animation-delay: .02s; }
.product-card:nth-child(2)  { animation-delay: .05s; }
.product-card:nth-child(3)  { animation-delay: .08s; }
.product-card:nth-child(4)  { animation-delay: .11s; }
.product-card:nth-child(5)  { animation-delay: .14s; }
.product-card:nth-child(6)  { animation-delay: .17s; }
.product-card:nth-child(7)  { animation-delay: .20s; }
.product-card:nth-child(8)  { animation-delay: .23s; }
.product-card:nth-child(9)  { animation-delay: .26s; }
.product-card:nth-child(10) { animation-delay: .29s; }
.product-card:nth-child(11) { animation-delay: .32s; }
.product-card:nth-child(12) { animation-delay: .35s; }

.product-card {
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s var(--ease-out);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(23,17,26,0.20);
  box-shadow: var(--shadow);
}
.product-card__img {
  aspect-ratio: 1 / 1;
  background: var(--cream-deep);
  overflow: hidden;
  position: relative;
}
.product-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease-out);
}
.product-card:hover .product-card__img img { transform: scale(1.05); }

/* Fallback tanpa foto: tile krem + watermark logo + inisial Fraunces */
.product-card__img-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.45rem;
  padding: 1rem 0.9rem;
  text-align: center;
  background: linear-gradient(160deg, #FDFAF3 0%, #F6EEDD 55%, #F3E3F4 130%);
}
.product-card__watermark {
  position: absolute;
  width: 130%;
  max-width: none;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.06;
  filter: saturate(1.2);
  pointer-events: none;
}
.product-card__mock-brand {
  position: absolute; top: 0.6rem; left: 0.65rem;
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-family: var(--font-body); font-size: 8.5px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary-deep); opacity: 0.55;
}
.product-card__mock-brand img { width: 13px; height: 13px; display: block; }
.product-card__mock-mono {
  display: grid; place-items: center;
  width: 3.2rem; height: 3.2rem; border-radius: 50%;
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; font-style: italic;
  color: var(--primary);
  background: var(--white);
  border: 1px solid rgba(192,38,211,0.18);
  box-shadow: var(--shadow-xs);
}
.product-card__mock-name {
  font-family: var(--font-body); font-size: 10.5px; font-weight: 700;
  line-height: 1.3; color: var(--primary-deep); opacity: 0.75;
  max-width: 92%;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
/* SKU = entri ledger mono */
.product-card__sku {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  background: rgba(16,11,18,0.78);
  color: rgba(247,242,234,0.92);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.product-card__body { padding: 0.85rem 0.9rem 0.95rem; flex: 1; display: flex; flex-direction: column; gap: 0.34rem; }
.product-card__name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.15em;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
}
.product-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #D97706;
}
.product-card__sold {
  color: var(--muted);
  font-weight: 500;
  position: relative;
  padding-left: 0.45rem;
}
.product-card__sold:not(:first-child)::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 1px; height: 10px; margin-top: -5px;
  background: rgba(23,17,26,0.14);
}
.product-card__price {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.product-card__unit { font-family: var(--font-body); font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.product-card__price-row {
  display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap;
  line-height: 1;
}
.product-card__price-row s { font-size: 11px; color: var(--muted); opacity: 0.75; }
.product-card__discount {
  font-size: 10.5px; font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2.5px 7px;
  border-radius: var(--radius-full);
}
.product-card__stock {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; color: #15803D;
  margin-top: 0.15rem;
}
.product-card__stock::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex: none; }
.product-card__stock--out { color: var(--danger); }
.product-card__stock--out::before { background: var(--danger); }
.product-card__cta { margin-top: 0.6rem; }

/* ============================================
   BUTTONS — tegas radius 12, magenta = aksi utama
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.005em;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s var(--ease-out), border-color .18s var(--ease-out), color .18s var(--ease-out);
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.btn--primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(192,38,211,0.36);
}
.btn--primary:active:not(:disabled) { transform: translateY(0); box-shadow: 0 3px 10px rgba(192,38,211,0.3); }
.btn--outline {
  background: var(--white);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn--outline:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.btn--outline:active:not(:disabled) { transform: translateY(0); }
.btn--dark {
  background: var(--ink);
  color: var(--on-dark);
  box-shadow: 0 6px 16px rgba(23,17,26,0.28);
}
.btn--dark:hover { background: var(--ink-2); transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn--ghost:hover { color: var(--primary); background: var(--primary-soft); }
.btn--wa {
  background: var(--wa);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(37,211,102,0.35);
}
.btn--wa:hover { background: #1FBF5B; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37,211,102,0.42); }
.btn--wa:active:not(:disabled) { transform: translateY(0); }
.btn--google {
  background: var(--white);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn--google:hover { border-color: rgba(23,17,26,0.4); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--google svg { width: 18px; height: 18px; flex: none; }
.btn--block { width: 100%; }
.btn--sm    { padding: 0.52rem 0.9rem; font-size: 13px; border-radius: 10px; }
.btn--lg    { padding: 0.95rem 1.7rem; font-size: 15.5px; border-radius: 14px; }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ============================================
   CART / CHECKOUT
   ============================================ */
.page-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.page-title em { font-style: italic; color: var(--primary); }

.card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.35rem;
  box-shadow: var(--shadow-xs);
}
.card > h2:first-child {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  padding-bottom: 0.7rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px dashed var(--border);
}
.card--pop {
  border-color: rgba(23,17,26,0.16);
  box-shadow: var(--shadow);
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item__img {
  width: 64px; height: 64px;
  border-radius: 10px;
  background: var(--cream-deep);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  display: grid; place-items: center;
}
.cart-item__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__mono {
  font-family: var(--font-display); font-weight: 600; font-style: italic;
  font-size: 1.15rem; color: var(--primary); opacity: 0.5;
}
.cart-item__name { font-size: 14px; font-weight: 600; line-height: 1.35; }
.cart-item__price { font-size: 13px; color: var(--muted); margin-top: 2px; font-family: var(--font-mono); font-size: 12px; }
.cart-item__stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  margin-top: 6px;
}
.cart-item__stepper button {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-size: 17px; color: var(--primary);
  transition: background .15s var(--ease-out);
}
.cart-item__stepper button:hover { background: var(--primary-soft); }
.cart-item__stepper input {
  width: 48px; height: 42px;
  text-align: center;
  border: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  background: transparent;
}
.cart-item__stepper input:focus { box-shadow: none; }
.cart-item__sub {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--primary);
  font-size: 14.5px;
  text-align: right;
}
.cart-item__remove {
  font-size: 12px;
  color: var(--danger);
  background: none;
  margin-top: 4px;
  display: block;
}
.cart-item__remove:hover { text-decoration: underline; }

.cart-summary {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
@media (max-width: 640px) {
  .cart-summary {
    position: sticky; bottom: 0;
    z-index: 901;
    background: var(--white);
    margin: 1.5rem -1.1rem -1.1rem;
    padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 30px rgba(23,17,26,0.10);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-top: 1px solid var(--border-soft);
  }
}
.cart-summary__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; font-size: 14px; color: var(--muted); }
.cart-summary__row span:last-child { color: var(--ink); font-weight: 600; font-family: var(--font-mono); font-size: 13.5px; }
.cart-summary__row--total {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  border-top: 1px dashed var(--border);
  padding-top: 0.8rem;
  margin-top: 0.8rem;
}
.cart-summary__row--total span:last-child {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cart-summary__row--diskon span:last-child { color: var(--primary); }

/* Minimum order grosir (30jt) — progress ledger */
.minorder { margin-bottom: 1rem; }
.minorder p { font-size: 12.5px; color: var(--muted); margin: 0.45rem 0 0; line-height: 1.45; }
.minorder strong { color: var(--ink); font-family: var(--font-mono); font-size: 12px; }
.minorder__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--cream-deep);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
.minorder__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple), var(--primary));
  transition: width 0.35s ease-out;
}
.minorder--met p, .minorder--met strong { color: var(--primary); }

.btn--disabled { opacity: 0.45; pointer-events: none; cursor: not-allowed; }

/* Estimasi Muatan Kontainer */
.container-card__label {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
  margin-top: 0.35rem;
}
.container-card__meta { font-size: 13px; color: var(--muted); margin-bottom: 0.75rem; }
.container-card__viz {
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 10px;
}
.cviz-canvas { display: block; width: 100%; height: auto; }
.container-card__legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 0.6rem 0 0.75rem; }
.cviz-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 2px 9px;
}
.cviz-chip i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
}
.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ============================================
   FORM
   ============================================ */
.form-grid { display: grid; gap: 1rem; }
.form-row { display: grid; gap: 0.35rem; }
.form-row__label { font-size: 13px; font-weight: 700; color: var(--ink); }
.form-row__hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
@media (min-width: 640px) {
  .form-grid--2col { grid-template-columns: 1fr 1fr; }
}

/* ---- Verifikasi OTP telepon ---- */
.otp-field { display: flex; gap: 0.5rem; align-items: stretch; }
.otp-field input { flex: 1; min-width: 0; }
.otp-field .btn { flex: 0 0 auto; align-self: stretch; }
.otp-verify { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.otp-verify input {
  flex: 1; min-width: 0;
  letter-spacing: 0.35em; font-weight: 700; text-align: center;
  font-family: var(--font-mono);
}
.otp-verify .btn { flex: 0 0 auto; }
#f-phone.is-verified {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.14);
}
.otp-status {
  margin-top: 0.45rem;
  font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.otp-status--idle    { color: var(--muted); }
.otp-status--pending { color: var(--primary); }
.otp-status--ok      { color: #15803D; }
.otp-status--error   { color: var(--danger); }
.otp-status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none; opacity: 0.85;
}
.otp-status--ok::before { display: none; }

/* ============================================
   AUTH (login Google) — kartu masuk & banner akun
   ============================================ */
.auth-card {
  background: linear-gradient(180deg, var(--ink0) 0%, var(--ink) 100%);
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(247,242,234,0.08);
}
.auth-card::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0, transparent 35px, rgba(247,242,234,0.05) 35px, rgba(247,242,234,0.05) 36px);
  pointer-events: none;
}
.auth-card > * { position: relative; z-index: 1; }
.auth-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
  color: var(--on-dark);
}
.auth-card h2 em { font-style: italic; color: var(--primary-ondark); }
.auth-card p { font-size: 13.5px; color: var(--on-dark-muted); line-height: 1.6; margin-bottom: 1.1rem; }
.auth-banner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 0.7rem 0.95rem;
  margin-bottom: 1rem;
  font-size: 13px;
}
.auth-banner img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--primary-soft); }
.auth-banner__ava {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 800;
}
.auth-banner__who { flex: 1; min-width: 0; }
.auth-banner__who strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-banner__who span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ============================================
   KONFIRMASI PESANAN / KARTU WA
   ============================================ */
.confirm-hero {
  text-align: center;
  padding: 2rem 1rem;
}
.confirm-hero__check {
  width: 80px; height: 80px;
  margin: 0 auto 1rem;
  border-radius: var(--radius-full);
  background: var(--success);
  display: grid; place-items: center;
  color: var(--white);
  font-size: 2.5rem;
  box-shadow: 0 12px 32px rgba(22,163,74,0.30);
}
.confirm-hero h1 {
  font-size: clamp(1.4rem, 4vw, 1.85rem);
  margin-bottom: 0.5rem;
}
.confirm-hero p { color: var(--muted); }
.confirm-hero--pending .confirm-hero__check {
  background: var(--warning);
  box-shadow: 0 12px 32px rgba(245,158,11,0.30);
}
.confirm-id {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.wa-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #25D366 0%, #12A86A 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.3rem;
  margin: 1.25rem 0;
  box-shadow: 0 14px 36px rgba(18,168,106,0.35);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.wa-card:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(18,168,106,0.42); }
.wa-card:active { transform: translateY(0); }
.confirm-hero--pending ~ .wa-card { animation: waNudge 1.8s ease-in-out 2; }
@keyframes waNudge {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(37,211,102,0.5); }
}
.wa-card__icon {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  display: grid; place-items: center;
}
.wa-card__icon svg { width: 26px; height: 26px; fill: currentColor; }
.wa-card__title { font-size: 16px; font-weight: 700; line-height: 1.2; }
.wa-card__sub   { font-size: 13px; opacity: 0.92; margin-top: 2px; }

/* ============================================
   FOOTER — buku besar ditutup
   ============================================ */
.footer {
  background: var(--ink0);
  color: var(--on-dark-muted);
  padding: 2.6rem 0 2rem;
  margin-top: 4rem;
  font-size: 13px;
  border-top: 1px solid var(--line-dark);
  position: relative;
  overflow: hidden;
}
.footer::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0, transparent 39px, rgba(247,242,234,0.035) 39px, rgba(247,242,234,0.035) 40px);
  pointer-events: none;
}
.footer .container { position: relative; z-index: 1; }
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}
.footer__logo {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.footer__brand-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 500;
  color: var(--primary-ondark);
}
.footer__brand em { color: var(--primary-ondark); font-style: italic; }
.footer p { margin-bottom: 0.4rem; }
.footer a { color: var(--primary-ondark); }
.footer a:hover { text-decoration: underline; }

/* ============================================
   ADMIN (dipertahankan — kena refresh token otomatis)
   ============================================ */
.admin-shell {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}
@media (min-width: 768px) {
  .admin-shell {
    grid-template-columns: 220px 1fr;
    grid-template-rows: 1fr;
  }
}
.admin-side {
  background: var(--ink0);
  color: rgba(247,242,234,0.78);
  padding: 0.75rem 0.75rem;
}
@media (min-width: 768px) {
  .admin-side { padding: 1rem 0.75rem; }
}
.admin-side__brand {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.4rem 0.75rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .admin-side__brand { padding: 0.4rem 0.75rem 1.25rem; }
}
.admin-side__nav {
  display: flex;
  flex-direction: row;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.admin-side__nav::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .admin-side__nav {
    flex-direction: column;
    gap: 2px;
    overflow: visible;
  }
}
.admin-side__link {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 13px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
@media (min-width: 768px) {
  .admin-side__link {
    padding: 0.55rem 0.75rem;
    font-size: 14px;
  }
}
.admin-side__link:hover, .admin-side__link.is-active {
  background: rgba(255,255,255,0.10);
  color: var(--white);
}
.admin-main { padding: 1.5rem 1rem; background: var(--cream); }
@media (min-width: 768px) { .admin-main { padding: 2rem; } }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--primary);
  opacity: 0.6;
}
.stat-card--warn::before { background: var(--warning); }
.stat-card--skel { height: 92px; background: linear-gradient(90deg, var(--cream-deep), var(--border), var(--cream-deep)); background-size: 200% 100%; animation: skeleton 1.2s ease-in-out infinite; border-color: transparent; }
.stat-card__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 0.4rem; }
.stat-card__value { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 600; line-height: 1; color: var(--ink); }
.stat-card__sub   { font-size: 12.5px; color: var(--muted); margin-top: 0.35rem; }

.low-stock-alert {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 13px;
  color: #92400E;
  line-height: 1.7;
}
.low-stock-tag {
  display: inline-block;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(245,158,11,0.4);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  margin: 2px;
  font-size: 12px;
  color: #92400E;
  transition: background .2s;
}
.low-stock-tag:hover { background: rgba(255,255,255,0.95); }
.low-stock-tag strong { color: #B45309; }

.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  background: var(--primary-soft);
  border: 1px solid rgba(192,38,211,0.18);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  margin-bottom: 0.9rem;
  font-size: 14px;
  color: var(--primary-deep);
  flex-wrap: wrap;
}
.bulk-bar strong { color: var(--primary-deep); }

.status-timeline {
  display: flex;
  gap: 4px;
  margin: 0.75rem 0 1rem;
}
.status-timeline__step {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  position: relative;
}
.status-timeline__step.is-done { background: var(--primary); }
.status-timeline__step.is-current { background: var(--magenta); }
.status-timeline__step.is-cancelled { background: var(--danger); }
.status-timeline__labels {
  display: flex;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.status-timeline__labels span { flex: 1; text-align: center; }
.status-timeline__labels span.is-current { color: var(--ink); font-weight: 600; }

.table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); border: 1px solid var(--border-soft); box-shadow: var(--shadow-xs); }
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.t th, table.t td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
table.t th {
  background: var(--cream);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
table.t tbody tr:hover { background: var(--cream); }
.pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill--pending   { background: #FFF3CD; color: #A86600; }
.pill--confirmed { background: #DBF5DD; color: #166534; }
.pill--processing{ background: #DCE9FF; color: #1E429F; }
.pill--shipped   { background: #E7D9FB; color: #5B21B6; }
.pill--completed { background: #DBF5DD; color: #166534; }
.pill--cancelled { background: #FEE2E2; color: #991B1B; }
.pill--wa-yes { background: #DBF5DD; color: #15803D; }
.pill--wa-no  { background: #FFF3CD; color: #A86600; }
.pill--wa-na  { background: var(--cream-deep); color: var(--muted); }

.pill--st-new   { background: var(--primary-soft, #FAE8FF); color: var(--primary); }
.pill--st-masuk { background: #DBF5DD; color: #166534; }
.pill--st-cuci  { background: #FFF3CD; color: #A86600; }
.pill--st-sisa  { background: var(--cream-deep); color: var(--muted); }
.pill--st-habis { background: #FEE2E2; color: #991B1B; }

.wa-filter-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.7rem;
  background: var(--primary-soft);
  border: 1px solid rgba(192,38,211,0.16);
  border-radius: var(--radius);
}
.wa-filter-bar__label { font-size: 12px; font-weight: 700; color: var(--ink); margin-right: 0.15rem; }
.row--unconfirmed td { background: rgba(245,158,11,0.06); }

.wa-banner {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 0.85rem;
  border: 1.5px solid transparent;
}
.wa-banner--yes { background: #DBF5DD; color: #15803D; border-color: rgba(21,128,61,0.25); }
.wa-banner--no  { background: #FFF3CD; color: #8A5200; border-color: rgba(168,102,0,0.28); }

/* ============================================
   UTILITIES
   ============================================ */
.row { display: flex; align-items: center; gap: 0.5rem; }
.row--between { justify-content: space-between; }
.flex-1 { flex: 1; }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }

.skeleton {
  background: linear-gradient(90deg, var(--cream-deep) 0%, #EBE1CB 50%, var(--cream-deep) 100%);
  background-size: 200% 100%;
  animation: skeleton 1.2s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   MODAL DETAIL PRODUK
   ============================================ */
.pmodal {
  position: fixed;
  inset: 0;
  background: rgba(16,11,18,0.6);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.pmodal.hidden { display: none; }
.pmodal__card {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: pmodalIn 0.24s var(--ease-out);
}
@keyframes pmodalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.pmodal__close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  font-size: 14px;
  z-index: 2;
  box-shadow: var(--shadow-sm);
  transition: background .15s var(--ease-out);
}
.pmodal__close:hover { background: var(--cream-deep); }
.pmodal__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--cream-deep);
}
.pmodal__img--fallback {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.4;
}
.pmodal__info { padding: 1.25rem 1.4rem 1.5rem; }
.pmodal__name {
  font-size: 1.3rem;
  margin: 0.35rem 0 0.5rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}
.pmodal__kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pmodal__price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.01em;
}
.pmodal__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12.5px;
  font-weight: 600;
  margin: 0 0 0.55rem;
}
.pmodal__rating { color: #D97706; }
.pmodal__sold {
  color: var(--muted);
  font-weight: 500;
  position: relative;
  padding-left: 0.55rem;
}
.pmodal__sold::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 1px; height: 11px; margin-top: -5.5px;
  background: rgba(23,17,26,0.12);
}
.pmodal__variants { margin: 0.15rem 0 0.7rem; }
.pmodal__variants-label {
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.pmodal__variants-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-height: 190px;
  overflow-y: auto;
  padding: 2px;
}
.variant-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  text-align: left;
  transition: background .15s var(--ease-out), border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.variant-pill:hover:not(.is-active) {
  border-color: rgba(23,17,26,0.4);
}
.variant-pill.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-dark);
  font-weight: 700;
}
.variant-pill.is-out { opacity: 0.55; }
.variant-pill__price {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
}
.variant-pill.is-active .variant-pill__price { color: var(--primary-ondark); }
.variant-pill__out {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #B91C1C;
}
.variant-pill.is-active .variant-pill__out { color: #FCA5A5; }

.product-card__variants {
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pmodal__retail {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pmodal__retail s { opacity: 0.75; }
.pmodal__hemat {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.pmodal__desc {
  margin-top: 0.85rem;
  padding: 0.8rem 0.95rem;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.pmodal__qty-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(16,11,18,0.96);
  color: var(--on-dark);
  padding: 0.75rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-dark);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 14px 40px rgba(16,11,18,0.4);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease-out), transform .22s var(--ease-out);
  z-index: 1000;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================
   TOMBOL WHATSAPP MELAYANG
   ============================================ */
.wa-fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 1.1rem 0.62rem 0.62rem;
  background: var(--ink0);
  color: var(--on-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-full);
  box-shadow: 0 12px 32px rgba(16,11,18,0.35);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
body.has-wa-fab { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.wa-fab:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(16,11,18,0.45); }
.wa-fab:active { transform: translateY(0); }
.wa-fab__icon {
  width: 38px; height: 38px; flex: none;
  padding: 7px;
  border-radius: var(--radius-full);
  background: var(--wa);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(37,211,102,0.4);
}
.wa-fab__label { line-height: 1; white-space: nowrap; }
.wa-fab__pulse {
  position: absolute;
  left: 10px; top: 50%;
  width: 38px; height: 38px;
  margin-top: -19px;
  border-radius: var(--radius-full);
  border: 2px solid var(--wa);
  opacity: 0; pointer-events: none;
  animation: waFabRipple 3s ease-out infinite;
}
@keyframes waFabRipple {
  0%   { opacity: .45; transform: scale(1); }
  100% { opacity: 0;  transform: scale(1.55); }
}
@media (max-width: 768px) {
  .wa-fab__label { display: none; }
  .wa-fab { padding: 0.5rem; }
  .wa-fab__pulse { left: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-fab__pulse { display: none; }
}

/* ============================================
   STICKY FOOTER — halaman pendek tidak menyisakan
   spasi krem di bawah footer gelap.
   ============================================ */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.footer {
  margin-top: auto;
}