/* Pesan Oleh-Oleh — HIG design system: Daluang & Sogan heritage palette,
   Cormorant Garamond headings, soft elevation, glassmorphism cards.
   Tokens adapted from the HIG globals.css + tailwind.config.js. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* HIG Color Palette — Light Mode (Daluang & Sogan) */
  --color-daluang: #FAF7F2;
  --color-daluang-card: rgba(255, 255, 255, 0.75);

  --color-sogan-50: #FCF8F6;
  --color-sogan-100: #F7EEE9;
  --color-sogan-200: #EFDDD4;
  --color-sogan-500: #8C594A;
  --color-sogan-700: #6E473B;
  --color-sogan-900: #3D261E;

  --color-prada: #D4AF37;
  --color-prada-hover: #C59B27;
  --color-wilis: #1E2F38;

  /* UI States */
  --text-primary: #3D261E;
  --text-secondary: #6E473B;
  --text-muted: #8C594A;
  --border-subtle: rgba(110, 71, 59, 0.12);

  /* HIG Geometry & Elevation */
  --radius-hig-sm: 10px;
  --radius-hig-md: 16px;
  --radius-hig-lg: 24px;
  --shadow-hig-ambient: 0 10px 30px -10px rgba(110, 71, 59, 0.08);
  --shadow-hig-active: 0 20px 40px -15px rgba(110, 71, 59, 0.15);

  /* Subtle Kawung Watermark Pattern Overlay */
  --pattern-kawung: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%236E473B' fill-opacity='0.03' fill-rule='evenodd'%3E%3Cpath d='M30 30c0-11.046-8.954-20-20-20S-10 18.954-10 30s8.954 20 20 20 20-8.954 20-20zm0 0c0 11.046 8.954 20 20 20s20-8.954 20-20-8.954-20-20-20-20 8.954-20 20z'/%3E%3C/g%3E%3C/svg%3E");

  /* Legacy aliases remapped to HIG tokens */
  --color-bg: #ffffff;
  --color-cream: var(--color-daluang);
  --color-bg-cream: var(--color-daluang);
  --color-maroon: var(--color-sogan-700);
  --color-gold: var(--color-prada);
  --color-ink: var(--text-primary);
  --color-muted: var(--text-muted);
  --color-border: var(--border-subtle);
  --color-accent: var(--color-prada);
  --color-accent-ink: var(--color-sogan-900);
  --color-stone-bg: var(--color-sogan-100);

  --color-green: #1f8a4c;
  --color-green-bg: #e3f6e9;
  --color-blue: #1c5fd6;
  --color-blue-bg: #e4edfd;
  --color-amber: #93650a;
  --color-amber-bg: #fdf0d2;
  --color-red: #c4283c;
  --color-red-bg: #fbe3e6;

  --radius: var(--radius-hig-sm);
  --radius-sm: 8px;
  --shadow-offset: 2px;
  --shadow: var(--shadow-hig-ambient);
  --shadow-sm: 0 4px 14px -6px rgba(110, 71, 59, 0.1);

  --max-width: 1080px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* HIG Dark Mode — Kayu Jati (follows the OS preference) */
@media (prefers-color-scheme: dark) {
  :root {
    --color-daluang: #181311;
    --color-daluang-card: rgba(32, 25, 23, 0.8);

    --text-primary: #FAF7F2;
    --text-secondary: #EFDDD4;
    --text-muted: #8C594A;
    --border-subtle: rgba(212, 175, 55, 0.15);

    --shadow-hig-ambient: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-hig-active: 0 20px 40px -15px rgba(0, 0, 0, 0.7);

    --color-bg: #201917;
    --color-cream: var(--color-daluang);
    --color-bg-cream: var(--color-daluang);
    --color-maroon: var(--color-sogan-500);
    --color-ink: var(--text-primary);
    --color-muted: var(--text-muted);
    --color-border: var(--border-subtle);
    --color-stone-bg: #2A211E;

    --color-green: #4ade80;
    --color-green-bg: #16301f;
    --color-blue: #7ba7ff;
    --color-blue-bg: #16243d;
    --color-amber: #e5b73b;
    --color-amber-bg: #33280d;
    --color-red: #ff7b89;
    --color-red-bg: #3a141b;

    --shadow-sm: 0 4px 14px -6px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

/* The native [hidden] (display:none from the UA stylesheet) is overridden by
   any author rule that sets display (e.g. .product-card{display:flex}). Force
   it here so toggling the `hidden` attribute/property from JS actually hides
   elements — search filtering, the add-to-cart/stepper toggle, and the
   checkout empty-state all rely on this. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--color-daluang);
  background-image: var(--pattern-kawung);
  background-repeat: repeat;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.font-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

button {
  font-family: inherit;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
  }
}

/* HIG Translucency & Glassmorphism Utilities */
.hig-glass {
  background: var(--color-daluang-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-subtle);
}

.hig-card {
  border-radius: var(--radius-hig-md);
  box-shadow: var(--shadow-hig-ambient);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hig-card:hover {
  box-shadow: var(--shadow-hig-active);
  transform: translateY(-2px);
}

.bg-kawung-pattern {
  background-image: var(--pattern-kawung);
  background-repeat: repeat;
}

/* Layout */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.main {
  min-height: 60vh;
  padding: 32px 0 64px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--color-daluang-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-maroon);
}

.site-header__logo-mark {
  display: block;
  width: 34px;
  height: 34px;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.site-header__greeting {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--color-bg);
  box-shadow: var(--shadow-sm);
}

/* Header icons (Material/Google icons, inlined as SVG). */
.site-header .icon {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* The logout <button class="btn-link nav-link"> shares the link look but is a
   form button — align its icon + label like the anchor nav links. */
.site-header__nav .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Desktop keeps the original header design: icons only on Keranjang and
   Pesanan saya, text-only for the rest, full-length labels. Everything
   below exists solely for the mobile bottom bar. */
.nav-link--bar-only,
.site-header__logout-top,
.icon--bar-only,
.nav-link__label--short {
  display: none;
}

/* Mobile: the nav becomes a native-app-style bottom tab bar — icons with a
   small label underneath, fixed to the bottom edge. The top header keeps only
   the logo + brand name, so it no longer crowds the top of the page.
   Sizing follows common bottom-nav guidance: 24px icons, ~11px labels,
   ≥44px tap targets, max 5 tabs (logout moves to the top corner). */
@media (max-width: 600px) {
  .site-header__greeting {
    display: none;
  }

  /* Home gets its own tab; logout leaves the bar for the top-right corner
     (a permanent logout tab wastes space and would push admins past 5). */
  .nav-link--bar-only {
    display: inline-flex;
  }

  .site-header__nav .site-header__logout-nav {
    display: none;
  }

  .site-header__logout-top {
    display: block;
  }

  .site-header__logout-top .icon-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-header__logout-top .icon {
    width: 22px;
    height: 22px;
  }

  /* Reserve room so page content and the footer never hide behind the bar. */
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  .site-header__nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30; /* above the sticky header (20) and chip bar (15) */
    background: var(--color-daluang-card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--border-subtle);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: stretch;
    gap: 0;
    flex-wrap: nowrap;
  }

  /* Every item — links, the cart pill, and the "Daftar" button — flattens
     into a uniform icon-over-label column with a thumb-sized (≥44px) target. */
  .site-header__nav .cart-link,
  .site-header__nav .nav-link,
  .site-header__nav .btn {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1 1 0;
    min-width: 44px;
    max-width: 96px;
    min-height: 48px;
    height: auto;
    padding: 4px 2px;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--color-ink);
    text-decoration: none;
    font-weight: 600;
  }

  .site-header__nav .cart-link:hover,
  .site-header__nav .btn:hover,
  .site-header__nav .btn:active {
    transform: none;
    box-shadow: none;
  }

  /* 24px icons: recognizable without dominating the bar. Bar-only icons
     (hidden on desktop) and short labels come back on here. */
  .site-header__nav .icon {
    width: 24px;
    height: 24px;
  }

  .site-header__nav .icon--bar-only {
    display: block;
  }

  /* Doubled class specificity so the generic .nav-link__label display rule
     later in this block can't override the full/short swap. */
  .nav-link__label.nav-link__label--full {
    display: none;
  }

  .nav-link__label.nav-link__label--short {
    display: block;
  }

  /* Menu titles: ~11px below the icon — small, but above the legibility floor. */
  .cart-link__label,
  .nav-link__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
  }

  /* Inactive vs active: inactive tabs are desaturated with muted labels;
     the active tab keeps full icon color, a bolder ink label, AND a gold
     indicator bar under the bar's top border — three cues, not one. */
  .site-header__nav .icon {
    filter: grayscale(1) opacity(0.55);
  }

  .cart-link__label,
  .nav-link__label {
    color: var(--color-muted);
  }

  .site-header__nav [aria-current="page"] .icon {
    filter: none;
  }

  .site-header__nav [aria-current="page"] .cart-link__label,
  .site-header__nav [aria-current="page"] .nav-link__label,
  .site-header__nav [aria-current="page"].cart-link .cart-link__label {
    color: var(--color-ink);
    font-weight: 800;
  }

  .site-header__nav [aria-current="page"]::before {
    content: "";
    position: absolute;
    top: -6px; /* sits just under the bar's 2px ink border */
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    border-radius: 999px;
    background: var(--color-gold);
  }

  /* Cart count stays a corner badge on the icon (full color even inactive —
     it's a status signal, not chrome). */
  .cart-link__count {
    position: absolute;
    top: 0;
    right: 50%;
    margin-right: -20px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    font-size: 0.65rem;
  }
}

.cart-link__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-accent);
  border: 1px solid var(--color-border);
  font-size: 0.75rem;
  font-weight: 800;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--color-sogan-900);
  color: var(--color-daluang);
  padding: 40px 0;
  margin-top: 48px;
}

.site-footer h3 {
  color: var(--color-daluang);
}

.site-footer__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.2fr 1fr 1fr;
}

.site-footer h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.site-footer p,
.site-footer a {
  font-size: 0.9rem;
  color: rgba(250, 247, 242, 0.8);
}

.site-footer a:hover {
  color: var(--color-daluang);
  text-decoration: underline;
}

.site-footer__bottom {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(250, 247, 242, 0.2);
  font-size: 0.8rem;
  color: rgba(250, 247, 242, 0.7);
}

@media (max-width: 720px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-hig-sm);
  background: var(--color-bg);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-hig-ambient);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hig-active);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-hig-ambient);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: var(--shadow-hig-ambient);
}

.btn-primary {
  background: var(--color-prada);
  color: var(--color-sogan-900);
  border-color: transparent;
}

.btn-primary:hover {
  background: var(--color-prada-hover);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.btn-sm:hover {
  box-shadow: var(--shadow-hig-active);
}

.btn-danger {
  background: var(--color-red-bg);
}

.btn-link {
  border: none;
  box-shadow: none;
  height: auto;
  padding: 0;
  background: none;
  font-weight: 600;
  text-decoration: underline;
}

.btn-link:hover,
.btn-link:active {
  transform: none;
  box-shadow: none;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  box-shadow: var(--shadow-sm);
}

.icon-btn:active {
  background: var(--color-stone-bg);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--color-bg);
}

/* Full-width quantity stepper used on product cards: a bordered control bar
   with the count centered and − / + on the ends. */
.qty-stepper--full {
  width: 100%;
  justify-content: space-between;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px;
  box-shadow: var(--shadow-sm);
}

.qty-stepper--full .icon-btn {
  border-width: 0;
  box-shadow: none;
}

.qty-stepper--full .qty-stepper__value {
  flex: 1;
}

/* Cards */

.card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-hig-md);
  background: var(--color-daluang-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--shadow-hig-ambient);
  padding: 20px;
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  box-shadow: var(--shadow-hig-active);
  transform: translateY(-2px);
}

.card + .card {
  margin-top: 20px;
}

/* Forms */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 700;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="password"],
.field input[type="file"],
.field select,
.field textarea {
  height: 46px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--text-primary);
}

.field textarea {
  height: auto;
  padding: 10px 14px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: var(--shadow-hig-ambient);
}

.field-error {
  font-size: 0.8rem;
  color: var(--color-red);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.form-error {
  border: 2px solid var(--color-red);
  background: var(--color-red-bg);
  color: var(--color-red);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
}

.form-note {
  border: 1px solid var(--border-subtle);
  background: var(--color-bg-cream);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
}

/* Badges */

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 800;
}

.badge--amber {
  background: var(--color-amber-bg);
  color: var(--color-amber);
}
.badge--blue {
  background: var(--color-blue-bg);
  color: var(--color-blue);
}
.badge--red {
  background: var(--color-red-bg);
  color: var(--color-red);
}
.badge--green {
  background: var(--color-green-bg);
  color: var(--color-green);
}
.badge--stone {
  background: var(--color-stone-bg);
  color: var(--color-muted);
}

/* Hero / welcome banner — warm HIG treatment: daluang/sogan gradient with a
   kawung watermark. The BIF 2026 atmosphere art now lives in the .bif-strip
   band below (see Catalog section). */
.hero {
  position: relative;
  border-radius: var(--radius-hig-lg);
  background-color: var(--color-sogan-200);
  background-image: linear-gradient(
      120deg,
      var(--color-sogan-100) 0%,
      var(--color-daluang) 45%,
      var(--color-sogan-200) 100%
    );
  box-shadow: var(--shadow-hig-ambient);
  padding: 56px 28px;
  margin-bottom: 24px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--pattern-kawung);
  background-repeat: repeat;
  opacity: 0.7;
  pointer-events: none;
}

.hero h1,
.hero p {
  position: relative;
}

.hero h1 {
  font-size: 1.8rem;
  max-width: 32ch;
  color: var(--color-sogan-900);
}

.hero p {
  margin-top: 10px;
  max-width: 48ch;
  color: var(--color-sogan-700);
}

/* Dark mode: the warm light-mode hero tints (sogan-100/200) would glow too
   brightly against the Kayu Jati page, so swap to deep tonal grads. */
@media (prefers-color-scheme: dark) {
  .hero {
    background-color: #241C18;
    background-image: linear-gradient(
        120deg,
        #2A211E 0%,
        var(--color-daluang) 45%,
        #241C18 100%
      );
  }

  .hero h1 {
    color: var(--color-daluang);
  }

  .hero p {
    color: var(--text-secondary);
  }
}

/* Catalog */

.catalog-toolbar {
  margin-bottom: 20px;
}

.catalog-toolbar input[type="search"] {
  width: 100%;
  max-width: 360px;
  height: 46px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0 18px;
  font-size: 0.95rem;
  background: var(--color-bg);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.catalog-toolbar input[type="search"]:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: var(--shadow-hig-ambient);
}

/* Category (brand) filter chips */
.category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

/* Homepage only: keep the category chips reachable while scrolling the
   catalog. Sticks just below the sticky site header (68px = 16px padding ×2
   + 34px logo + 2px border); opaque page background so cards slide under it. */
.category-bar--sticky {
  position: sticky;
  top: 68px;
  z-index: 15; /* below .site-header (20), above the product cards */
  background: var(--color-cream);
  padding: 10px 4px;
  margin: 0 -4px 12px;
}

/* Mobile: one swipeable row instead of a tall wrapped block — a stuck
   multi-row bar would cover half the viewport. */
@media (max-width: 600px) {
  .category-bar--sticky {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Butt flush under the sticky navbar with no cream gap: a white background
       + shared bottom border make the chip row read as one toolbar with the
       header. Full-bleed to the screen edges (container padding = 12px). */
    top: 68px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px 12px;
    margin: 0 -12px 12px;
  }

  .category-bar--sticky::-webkit-scrollbar {
    display: none;
  }

  .category-bar--sticky .category-chip {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* When a chip is tapped, catalog.js scrolls the grid back to the top —
   offset it below the sticky header + sticky chip bar. */
#product-grid {
  scroll-margin-top: 132px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--color-bg);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.category-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hig-active);
}

.category-chip[aria-pressed="true"] {
  background: var(--color-prada);
  border-color: transparent;
  color: var(--color-sogan-900);
}

/* Catalog: normal responsive grid on desktop and tablet … */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  /* Grid's default (stretch) forces every card in a row to match the tallest
     one. Cards size to their own content instead — a short card doesn't grow
     just because its row neighbor has a long description. */
  align-items: start;
}

/* Desktop add-to-cart shows only its text label; the basket-plus icon is the
   mobile (two-column) replacement below. */
.add-btn__icon {
  display: none;
}

/* Variant picker modal (opened by clicking a variant product's card). */
.product-card--variants {
  cursor: pointer;
}

.product-card__incart {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-green);
}

.variant-modal {
  position: fixed;
  inset: 0;
  z-index: 60; /* above the mobile bottom nav (30) */
}

.variant-modal[hidden] {
  display: none;
}

.variant-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 20, 16, 0.55);
}

.variant-modal__sheet {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100% - 32px));
  max-height: 80vh;
  overflow-y: auto;
  background: var(--color-daluang-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-hig-lg);
  box-shadow: var(--shadow-hig-active);
  padding: 18px;
}

.variant-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 4px;
}

.variant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.variant-row:last-child {
  border-bottom: none;
}

.variant-row__lead {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.variant-row__thumb {
  width: 46px;
  height: 46px;
  flex: none;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

/* ---------- Lightbox (click-to-zoom product images) ---------- */
img.is-zoomable {
  cursor: zoom-in;
}

/* Hover hint on the catalog card image so it reads as clickable. */
.product-card__image {
  position: relative;
}

.product-card__image img.is-zoomable {
  transition: transform 0.2s ease;
}

.product-card__image:hover img.is-zoomable {
  transform: scale(1.03);
}

.product-card__image:has(img.is-zoomable)::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 26px;
  height: 26px;
  background-color: rgba(24, 19, 17, 0.55);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FAF7F2' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l4.5 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.product-card__image:hover::after {
  opacity: 0.95;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100; /* above the variant modal (60) — zoom can open from inside it */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 20, 16, 0.82);
  cursor: zoom-out;
}

.lightbox__figure {
  position: relative;
  margin: 0;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-hig-md);
  background: var(--color-bg);
  box-shadow: var(--shadow-hig-active);
}

.lightbox__caption {
  color: var(--color-daluang);
  font-size: 0.9rem;
  text-align: center;
  max-width: 90%;
}

.lightbox__caption[hidden] {
  display: none;
}

.lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-sogan-900);
  background: var(--color-daluang);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-hig-ambient);
}

.lightbox__close:hover {
  background: var(--color-prada);
  color: var(--color-sogan-900);
}

/* Freeze background scroll while the lightbox is open. */
body.lb-open {
  overflow: hidden;
}

.variant-row__name {
  font-weight: 700;
  font-size: 0.9rem;
}

.variant-row__price {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 2px;
}

.variant-row__actions .qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.vm-open {
  overflow: hidden;
}

/* Mobile: the picker slides up as a bottom sheet above the tab bar. */
@media (max-width: 600px) {
  .variant-modal__sheet {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    transform: none;
    width: 100%;
    max-height: 72vh;
    border-radius: var(--radius-hig-lg) var(--radius-hig-lg) 0 0;
    border-bottom: none;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

/* … and a two-column feed on phones, sized to match the Tokopedia mobile
   layout (720px screenshot ÷ 2 → CSS px): 12px page gutter, 8px grid gap,
   ~162px cards on a 360px screen, square images, and its type scale —
   name 14px, price 16px, meta 12px. Same hierarchy as desktop (price > name
   > merchant/desc), only the sizes change. */
@media (max-width: 600px) {
  .container {
    padding: 0 12px; /* = the banner's side margins in the reference */
  }

  .main {
    padding-top: 16px;
  }

  /* Banner: compact strip like the reference, 16px below before content. */
  .hero {
    padding: 22px 16px;
    margin-bottom: 16px;
  }

  .hero h1 {
    font-size: 1.25rem;
  }

  .hero p {
    font-size: 0.85rem;
    margin-top: 6px;
  }

  /* Single column on phones: one product per row, full width. */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* 4:3 media keeps the full-width single-column cards from getting too tall. */
  .product-card__image {
    aspect-ratio: 4 / 3;
  }

  .product-card__body {
    padding: 10px;
    gap: 6px;
  }

  .product-card__merchant {
    font-size: 0.75rem; /* 12px */
  }

  .product-card__name {
    font-size: 0.875rem; /* 14px */
  }

  .product-card__desc {
    font-size: 0.75rem; /* 12px, clamped so narrow cards stay tidy */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-card__price {
    font-size: 1rem; /* 16px */
  }

  .product-card .pill {
    font-size: 0.72rem;
    padding: 3px 8px;
  }

  /* Full-width single-column cards have room for the real label again, so the
     button shows "Tambah ke keranjang" (not the icon-only fallback). */
  .product-card .btn {
    height: 44px;
    font-size: 0.9rem;
  }

  .product-card .add-btn__label {
    display: inline;
  }

  .product-card .add-btn__icon {
    display: none;
  }
}

.product-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-hig-md);
  background: var(--color-daluang-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--shadow-hig-ambient);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover {
  box-shadow: var(--shadow-hig-active);
  transform: translateY(-2px);
}

.product-card__image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-stone-bg);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

/* Letter placeholder sits behind the image. If the <img> 404s it removes
   itself (onerror), revealing this fallback instead of a broken-image icon. */
.product-card__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-muted);
}

.product-card__image img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-card__name {
  font-weight: 800;
  font-size: 1rem;
}

.product-card__merchant {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.product-card__desc {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.product-card__price {
  font-weight: 800;
  font-size: 1.05rem;
  margin-top: auto;
}

.stock-warning {
  color: var(--color-red);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.stock-warning--sm {
  font-size: 0.7rem;
  margin-top: 2px;
}

.product-card__variants {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--color-bg);
  cursor: pointer;
}

.pill[aria-pressed="true"] {
  background: var(--color-prada);
  border-color: transparent;
  color: var(--color-sogan-900);
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-stepper__value {
  min-width: 20px;
  text-align: center;
  font-weight: 800;
}

.empty-state {
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-hig-md);
  padding: 40px 20px;
  text-align: center;
  color: var(--color-muted);
}

/* Checkout */

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.checkout-summary {
  position: sticky;
  top: 92px;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--color-muted);
  padding: 6px 0;
}

.summary-line--total {
  border-top: 1px solid var(--border-subtle);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.cart-item__name {
  font-weight: 700;
  font-size: 0.9rem;
}

.cart-item__meta {
  font-size: 0.8rem;
  color: var(--color-muted);
}

@media (max-width: 860px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
  .checkout-summary {
    position: static;
  }
}

/* Order detail / payment instructions */

.order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.order-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.payment-box {
  text-align: center;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-hig-md);
  padding: 20px;
  background: var(--color-bg-cream);
}

.payment-box__amount {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 6px 0;
}

.payment-box img {
  margin: 0 auto;
  max-width: 220px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.qris-placeholder {
  margin: 0 auto;
  width: 220px;
  height: 220px;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-muted);
  padding: 16px;
}

.bank-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.notice {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-hig-md);
  padding: 16px;
  font-size: 0.9rem;
}

.notice--amber {
  background: var(--color-amber-bg);
}
.notice--blue {
  background: var(--color-blue-bg);
}
.notice--green {
  background: var(--color-green-bg);
}
.notice--stone {
  background: var(--color-stone-bg);
}
.notice--red {
  background: var(--color-red-bg);
}

/* Admin */

.admin-order-card__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  font-size: 0.9rem;
  margin: 14px 0;
}

.admin-order-card__meta dt {
  color: var(--color-muted);
  font-size: 0.78rem;
}

.admin-order-card__meta dd {
  margin: 0;
  font-weight: 700;
}

.admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* Admin orders dashboard — clickable order rows */
.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.admin-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hig-active);
}

.admin-row__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-row__id {
  font-weight: 800;
}

.admin-row__meta {
  font-size: 0.88rem;
  margin-top: 4px;
}

.admin-row__total {
  font-size: 1.05rem;
  white-space: nowrap;
}

/* Admin quick-action icon cards */
.admin-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-hig-md);
  background: var(--color-bg);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-hig-ambient);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-quick-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hig-active);
}

.admin-quick-card .icon {
  width: 36px;
  height: 36px;
}

.admin-quick-card__label {
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

/* Auth pages */

.auth-shell {
  max-width: 420px;
  margin: 40px auto;
}

.auth-shell h1 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.auth-shell__subtitle {
  color: var(--color-muted);
  margin-bottom: 22px;
}

.auth-switch {
  margin-top: 18px;
  font-size: 0.9rem;
  text-align: center;
  color: var(--color-muted);
}

/* Legal pages */

.legal-page h1 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.legal-page__updated {
  color: var(--color-muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.legal-section {
  margin-bottom: 24px;
}

.legal-section h2 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.legal-section p,
.legal-section li {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.legal-section ul {
  list-style: disc;
  padding-left: 22px;
  margin-top: 8px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.back-link:hover {
  color: var(--color-ink);
}

.text-muted {
  color: var(--color-muted);
}

.text-center {
  text-align: center;
}

.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}

/* Packing slip (printable) */
.packing-slip {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 20px;
  background: #fff;
}

.packing-slip__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.packing-slip__head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.packing-slip__id {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.packing-slip__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  margin: 0 0 16px;
}

.packing-slip__meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.packing-slip__meta dd {
  margin: 2px 0 0;
  font-weight: 600;
}

.packing-slip__items {
  width: 100%;
  border-collapse: collapse;
}

.packing-slip__items th,
.packing-slip__items td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--color-border);
}

.packing-slip__items th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.packing-slip__qty {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}

/* Print: strip site chrome and interactive controls, keep only the slip(s).
   Each --page slip starts on a fresh sheet for batch printing / PDF export. */
@media print {
  .site-header,
  .site-footer,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .main.container {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .packing-slip {
    border: none;
    padding: 0;
    margin: 0;
  }

  .packing-slip--page {
    break-after: page;
    page-break-after: always;
  }

  .packing-slip--page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  /* Brand search table: keep borders visible in print */
  .brand-search-table,
  .brand-search-table th,
  .brand-search-table td {
    border: 1px solid #000 !important;
  }

  .brand-print-area {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .admin-quick-menu {
    display: none !important;
  }
}

/* ---------- Blog ---------- */
.blog-header {
  margin-top: 20px;
}

.blog-header h1 {
  margin-bottom: 6px;
}

.blog-card {
  padding: 20px;
}

.blog-card__title {
  margin: 0;
  font-size: 1.25rem;
}

.blog-card__link {
  text-decoration: none;
  color: inherit;
}

.blog-card__link:hover .blog-card__title {
  color: var(--color-maroon);
}

.blog-card__meta {
  font-size: 0.8rem;
  margin: 6px 0 10px;
}

.blog-card__excerpt {
  margin: 0 0 12px;
  color: var(--color-ink);
}

.blog-card__more {
  font-weight: 700;
  color: var(--color-maroon);
  text-decoration: none;
}

.blog-post__header h1 {
  margin: 12px 0 6px;
}

.blog-post__meta {
  font-size: 0.85rem;
}

.blog-post__cover {
  width: 100%;
  height: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-hig-md);
  margin: 16px 0;
  box-shadow: var(--shadow-hig-ambient);
}

/* Rendered-markdown prose. */
.blog-content {
  line-height: 1.7;
  color: var(--color-ink);
}

.blog-content h2 {
  margin: 28px 0 10px;
  font-size: 1.35rem;
}

.blog-content h3 {
  margin: 22px 0 8px;
  font-size: 1.1rem;
}

.blog-content p {
  margin: 0 0 16px;
}

.blog-content ul,
.blog-content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.blog-content li {
  margin-bottom: 6px;
}

.blog-content a {
  color: var(--color-maroon);
  font-weight: 600;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.blog-content blockquote {
  margin: 0 0 16px;
  padding: 4px 16px;
  border-left: 4px solid var(--color-gold);
  color: var(--color-muted);
}

.blog-post__cta {
  padding: 20px;
  text-align: center;
}

.blog-post__cta p {
  margin: 0 0 12px;
}
