/* ═══════════════════════════════════════════════════════════════════════════
   ARNOREX e-MARKET — BASE CSS
   Design tokens · Reset · Typography · Layout · Header · Search ·
   Categories · Grid · Dock · Footer · Buttons · Forms · Utilities
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   The single source of truth for every colour, size, spacing, and
   motion value in the entire platform. Change here, change everywhere.
───────────────────────────────────────────────────────────────────────────── */
:root {

  /* Brand colours */
  --amber:        #f0a500;
  --amber-d:      #c98a00;
  --amber-dd:     #a06e00;
  --amber-l:      #ffd166;
  --amber-ll:     #ffe9a0;
  --amber-pale:   #fff8e8;
  --amber-glow:   rgba(240, 165, 0, 0.18);

  /* Ink scale — from deepest black to near-invisible */
  --ink:          #0c0c10;
  --ink-90:       #141419;
  --ink-80:       #1a1a22;
  --ink-70:       #26263a;
  --ink-60:       #38384a;
  --ink-50:       #52526a;
  --ink-40:       #68687e;
  --ink-30:       #8888a0;
  --ink-20:       #a4a4ba;
  --ink-10:       #e4e4ef;
  --ink-05:       #f4f4f9;

  /* Surface scale */
  --white:        #ffffff;
  --surface:      #ffffff;
  --surface-2:    #f6f6fb;
  --surface-3:    #eeeef6;
  --surface-4:    #e5e5f0;

  /* Semantic colours */
  --green:        #16a34a;
  --green-pale:   #dcfce7;
  --red:          #dc2626;
  --red-pale:     #fee2e2;
  --blue:         #2563eb;
  --blue-pale:    #dbeafe;
  --orange:       #ea580c;
  --orange-pale:  #ffedd5;
  --heart:        #ef4444;
  --verified:     #1a7f4b;
  --trending:     #7c3aed;
  --trending-pale:#ede9fe;

  /* Typography */
  --font-d:       'Sora', sans-serif;          /* Display — headings, prices, brand */
  --font-b:       'Plus Jakarta Sans', sans-serif; /* Body — everything else */

  /* Font sizes — fluid scale */
  --text-xs:      11px;
  --text-sm:      12.5px;
  --text-base:    14px;
  --text-md:      15px;
  --text-lg:      17px;
  --text-xl:      20px;
  --text-2xl:     24px;
  --text-3xl:     30px;

  /* Font weights */
  --fw-normal:    400;
  --fw-medium:    500;
  --fw-semi:      600;
  --fw-bold:      700;
  --fw-black:     800;

  /* Layout heights */
  --hh:           56px;    /* Header height */
  --sh:           50px;    /* Search zone height */
  --ch:           46px;    /* Categories bar height */
  --dh:           62px;    /* Dock height */
  --top-offset:   calc(var(--hh) + var(--sh) + var(--ch)); /* total fixed top */

  /* Border radii */
  --r-xs:         4px;
  --r-sm:         8px;
  --r:            14px;
  --r-lg:         20px;
  --r-xl:         28px;
  --r-pill:       999px;

  /* Spacing scale */
  --s1:           4px;
  --s2:           8px;
  --s3:           12px;
  --s4:           16px;
  --s5:           20px;
  --s6:           24px;
  --s7:           28px;
  --s8:           32px;
  --s10:          40px;
  --s12:          48px;

  /* Shadows — layered for depth */
  --sh1:          0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --sh2:          0 3px 12px rgba(0,0,0,.09), 0 1px 3px rgba(0,0,0,.06);
  --sh3:          0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  --sh4:          0 20px 60px rgba(0,0,0,.16), 0 4px 16px rgba(0,0,0,.08);
  --sh-amber:     0 4px 20px rgba(240,165,0,.35);
  --sh-amber-lg:  0 8px 40px rgba(240,165,0,.5);
  --sh-inset:     inset 0 1px 3px rgba(0,0,0,.08);

  /* Motion — easing curves */
  --ease-spring:  cubic-bezier(.22,.68,0,1.2);
  --ease-out:     cubic-bezier(.0,0,.2,1);
  --ease-in-out:  cubic-bezier(.4,0,.2,1);
  --ease-bounce:  cubic-bezier(.34,1.56,.64,1);

  /* Motion — durations */
  --dur-fast:     120ms;
  --dur-base:     200ms;
  --dur-slow:     350ms;
  --dur-slower:   500ms;

  /* Z-index scale */
  --z-base:       1;
  --z-card:       10;
  --z-sticky:     100;
  --z-header:     900;
  --z-modal:      1000;
  --z-toast:      1100;
  --z-top:        9999;

  /* Max content width */
  --max-w:        960px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   2. RESET & GLOBAL
───────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Prevent layout shift from scrollbar */
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-b);
  font-size: var(--text-base);
  font-weight: var(--fw-normal);
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Space for fixed header + search + cats + dock */
  padding-top: var(--top-offset);
  padding-bottom: calc(var(--dh) + env(safe-area-inset-bottom, 0px) + 8px);
  overflow-x: hidden;
}

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

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

button, input, select, textarea {
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
}

button { cursor: pointer; }

ul, ol { list-style: none; }

[hidden] { display: none !important; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-10); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-20); }

/* Selection */
::selection { background: var(--amber-glow); color: var(--ink); }

/* Focus visible — accessibility */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   3. TYPOGRAPHY
───────────────────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-d);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -.015em;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { line-height: 1.65; }

small { font-size: var(--text-xs); }

strong { font-weight: var(--fw-bold); }

/* ─────────────────────────────────────────────────────────────────────────────
   4. HEADER
───────────────────────────────────────────────────────────────────────────── */
.hdr {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--hh);
  background: var(--white);
  border-bottom: 1px solid var(--ink-10);
  z-index: var(--z-header);
  box-shadow: var(--sh1);
  transition: box-shadow var(--dur-base) var(--ease-in-out),
              background var(--dur-base);
  /* Smooth blur on scroll — hardware accelerated */
  will-change: box-shadow;
}

.hdr.scrolled {
  box-shadow: var(--sh2);
}

.hdr.scrolled-far {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hdr-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--s4);
  max-width: var(--max-w);
  margin: 0 auto;
  gap: var(--s2);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-d);
  font-weight: var(--fw-black);
  font-size: 18px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  letter-spacing: -.5px;
  box-shadow: var(--sh-amber);
  transition: transform var(--dur-base) var(--ease-spring),
              box-shadow var(--dur-base);
}

.brand:active .brand-logo {
  transform: scale(.94);
  box-shadow: none;
}

.brand-name {
  font-family: var(--font-d);
  font-size: var(--text-md);
  font-weight: var(--fw-black);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ink);
}

.brand-sub {
  display: block;
  font-size: 9px;
  color: var(--amber-d);
  font-weight: var(--fw-black);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Header actions */
.hdr-acts {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

/* Icon button — used throughout header and modals */
.ico-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--ink-60);
  border-radius: var(--r-sm);
  position: relative;
  transition: color var(--dur-fast),
              background var(--dur-fast),
              transform var(--dur-base) var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}

.ico-btn:hover { background: var(--surface-3); color: var(--ink); }
.ico-btn:active { transform: scale(.90); background: var(--ink-10); }

/* Language toggle */
.lang-btn {
  height: 28px;
  padding: 0 10px;
  border: 1.5px solid var(--ink-10);
  border-radius: var(--r-pill);
  font-size: var(--text-xs);
  font-weight: var(--fw-black);
  color: var(--ink-60);
  letter-spacing: .06em;
  transition: border-color var(--dur-fast),
              color var(--dur-fast),
              background var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}

.lang-btn:hover {
  border-color: var(--amber);
  color: var(--amber-d);
  background: var(--amber-pale);
}

.lang-btn:active { transform: scale(.94); }

/* Badge — cart count, dock count */
.badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 17px;
  height: 17px;
  background: var(--amber);
  color: var(--ink);
  font-size: 10px;
  font-weight: var(--fw-black);
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  padding: 0 4px;
  line-height: 1;
  border: 1.5px solid var(--white);
  transition: transform var(--dur-base) var(--ease-bounce);
}

.badge.bump { transform: scale(1.4); }

/* Auth avatar */
#authAvatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--amber);
  display: block;
}

/* ─────────────────────────────────────────────────────────────────────────────
   5. SEARCH ZONE
───────────────────────────────────────────────────────────────────────────── */
.srch-zone {
  position: fixed;
  top: var(--hh);
  left: 0; right: 0;
  height: var(--sh);
  background: var(--white);
  z-index: calc(var(--z-header) - 10);
  padding: 7px var(--s4);
  border-bottom: 1px solid var(--ink-10);
}

.srch-wrap {
  display: flex;
  align-items: center;
  gap: var(--s2);
  height: 100%;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  padding: 0 var(--s3);
  border: 1.5px solid transparent;
  transition: border-color var(--dur-base),
              box-shadow var(--dur-base),
              background var(--dur-base);
  max-width: var(--max-w);
  margin: 0 auto;
}

.srch-wrap:focus-within {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-glow);
  background: var(--white);
}

.srch-ico {
  color: var(--ink-30);
  flex-shrink: 0;
  transition: color var(--dur-base);
}

.srch-wrap:focus-within .srch-ico { color: var(--amber-d); }

.srch-inp {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--ink);
  background: transparent;
  min-width: 0;
  caret-color: var(--amber);
}

.srch-inp::placeholder { color: var(--ink-20); }
.srch-inp::-webkit-search-cancel-button { display: none; }

.srch-clr {
  color: var(--ink-30);
  padding: 4px;
  border-radius: var(--r-pill);
  transition: color var(--dur-fast),
              background var(--dur-fast);
  flex-shrink: 0;
}

.srch-clr:hover { color: var(--ink); background: var(--surface-3); }

/* Search dropdown */
.srch-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: var(--s4); right: var(--s4);
  max-width: calc(var(--max-w) - 32px);
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--sh4);
  border: 1px solid var(--ink-10);
  overflow: hidden;
  z-index: var(--z-modal);
  max-height: 300px;
  overflow-y: auto;
  animation: dropIn var(--dur-slow) var(--ease-spring);
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.srch-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 10px var(--s4);
  cursor: pointer;
  transition: background var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}

.srch-item:hover { background: var(--surface-2); }
.srch-item + .srch-item { border-top: 1px solid var(--ink-05); }

.srch-item-img {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-3);
  flex-shrink: 0;
}

.srch-item-name {
  font-size: var(--text-sm);
  font-weight: var(--fw-semi);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.srch-item-price {
  font-size: var(--text-xs);
  color: var(--amber-d);
  font-weight: var(--fw-bold);
  margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   6. CATEGORIES BAR
───────────────────────────────────────────────────────────────────────────── */
.cats {
  position: fixed;
  top: calc(var(--hh) + var(--sh));
  left: 0; right: 0;
  height: var(--ch);
  background: var(--white);
  z-index: calc(var(--z-header) - 20);
  border-bottom: 1px solid var(--ink-10);
  box-shadow: var(--sh1);
}

.cats-in {
  display: flex;
  align-items: center;
  gap: var(--s2);
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 var(--s4);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.cats-in::-webkit-scrollbar { display: none; }

/* Category chip */
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: var(--r-pill);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: var(--ink-50);
  white-space: nowrap;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  transition: all var(--dur-base) var(--ease-in-out);
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent;
}

.cat-chip svg {
  width: 13px; height: 13px;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-spring);
}

.cat-chip:hover {
  border-color: var(--amber);
  color: var(--amber-d);
  background: var(--amber-pale);
}

.cat-chip.on {
  background: var(--amber);
  color: var(--ink);
  border-color: transparent;
  box-shadow: var(--sh-amber);
}

.cat-chip.on svg { transform: scale(1.1); }
.cat-chip:active { transform: scale(.94); }

/* ─────────────────────────────────────────────────────────────────────────────
   7. FILTERS BAR
───────────────────────────────────────────────────────────────────────────── */
.filters {
  background: var(--white);
  padding: 10px var(--s4);
  border-bottom: 1px solid var(--ink-10);
}

.filters-in {
  display: flex;
  align-items: flex-end;
  gap: var(--s3);
  flex-wrap: wrap;
  max-width: var(--max-w);
  margin: 0 auto;
}

.f-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 80px;
}

.f-label {
  font-size: 10px;
  font-weight: var(--fw-black);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-30);
}

.price-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.f-input {
  flex: 1;
  height: 32px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 0 var(--s2);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--ink);
  min-width: 0;
  border: 1.5px solid transparent;
  transition: border-color var(--dur-base),
              background var(--dur-base);
}

.f-input:focus {
  border-color: var(--amber);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.f-sep {
  font-size: var(--text-xs);
  color: var(--ink-30);
  flex-shrink: 0;
}

.f-select {
  height: 32px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 0 28px 0 var(--s2);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--ink);
  cursor: pointer;
  width: 100%;
  border: 1.5px solid transparent;
  transition: border-color var(--dur-base), background var(--dur-base);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%2368687e' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-color: var(--surface-2);
}

.f-select:focus {
  border-color: var(--amber);
  background-color: var(--white);
  box-shadow: 0 0 0 3px var(--amber-glow);
  outline: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   8. SECTION HEADER
───────────────────────────────────────────────────────────────────────────── */
.sec-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s4) var(--s4) var(--s3);
  max-width: var(--max-w);
  margin: 0 auto;
}

.sec-title {
  font-family: var(--font-d);
  font-size: var(--text-lg);
  font-weight: var(--fw-black);
  color: var(--ink);
  letter-spacing: -.02em;
}

.prod-count {
  font-size: var(--text-xs);
  color: var(--ink-30);
  font-weight: var(--fw-medium);
  background: var(--surface-3);
  padding: 3px 9px;
  border-radius: var(--r-pill);
}

/* ─────────────────────────────────────────────────────────────────────────────
   9. PRODUCT GRID
───────────────────────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 10px var(--s5);
  max-width: var(--max-w);
  margin: 0 auto;
}

@media (min-width: 480px) {
  .grid { gap: var(--s4); padding: 0 var(--s4) var(--s5); }
}

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* Empty state */
.empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  padding: var(--s12) var(--s4);
  color: var(--ink-20);
}

.empty svg { opacity: .5; }
.empty p { font-size: var(--text-base); font-weight: var(--fw-medium); }

/* Load more sentinel */
.load-sent { height: 1px; }

.load-spin {
  display: flex;
  justify-content: center;
  padding: var(--s6);
}

.spin {
  width: 28px; height: 28px;
  border: 3px solid var(--ink-10);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────────────────────────────────────────────────────────────────────────
   10. FOOTER
───────────────────────────────────────────────────────────────────────────── */
.footer {
  background: var(--ink-80);
  color: rgba(255,255,255,.6);
  padding: var(--s8) var(--s4) var(--s6);
  margin-top: var(--s4);
}

.footer-in {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-top {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s6);
}

.footer-brand-name {
  color: var(--white);
  font-family: var(--font-d);
  font-weight: var(--fw-bold);
  font-size: var(--text-base);
}

.footer-brand-sub {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.4);
  margin-top: 2px;
}

.footer-cols {
  display: flex;
  gap: var(--s8);
  flex-wrap: wrap;
  margin-bottom: var(--s6);
}

.footer-col h4 {
  font-size: 10px;
  font-weight: var(--fw-black);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  margin-bottom: var(--s3);
  font-family: var(--font-b);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col li { font-size: var(--text-sm); }

.footer-col a {
  color: rgba(255,255,255,.5);
  transition: color var(--dur-fast);
}

.footer-col a:hover { color: var(--amber); }

.footer-copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.22);
  padding-top: var(--s4);
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ─────────────────────────────────────────────────────────────────────────────
   11. BOTTOM DOCK
───────────────────────────────────────────────────────────────────────────── */
.dock {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--dh) + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  border-top: 1px solid var(--ink-10);
  display: flex;
  align-items: flex-start;
  padding-top: 7px;
  z-index: var(--z-header);
  box-shadow: 0 -4px 24px rgba(0,0,0,.07);
}

.dock-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  font-weight: var(--fw-semi);
  color: var(--ink-20);
  transition: color var(--dur-fast);
  position: relative;
  padding: 0 3px;
  letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent;
}

.dock-btn svg {
  transition: transform var(--dur-base) var(--ease-spring);
}

.dock-btn.on { color: var(--amber-d); }
.dock-btn.on svg { transform: scale(1.1); }
.dock-btn:active svg { transform: scale(.88); }

.dock-badge {
  position: absolute;
  top: -4px;
  right: calc(50% - 22px);
}

/* Active indicator dot */
.dock-btn.on::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--amber);
  border-radius: 50%;
}

@media (min-width: 600px) {
  .dock {
    max-width: 520px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--r) var(--r) 0 0;
    border-left: 1px solid var(--ink-10);
    border-right: 1px solid var(--ink-10);
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   12. BUTTONS
───────────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: 48px;
  padding: 0 var(--s5);
  border-radius: var(--r-pill);
  font-family: var(--font-b);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  cursor: pointer;
  border: none;
  transition: background var(--dur-fast),
              opacity var(--dur-fast),
              transform var(--dur-base) var(--ease-spring),
              box-shadow var(--dur-base);
  letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; pointer-events: none; }

/* Amber — primary CTA */
.btn-amber {
  background: var(--amber);
  color: var(--ink);
  box-shadow: var(--sh-amber);
}
.btn-amber:hover { background: var(--amber-l); box-shadow: var(--sh-amber-lg); }
.btn-amber:active { background: var(--amber-d); box-shadow: none; }

/* WhatsApp */
.btn-wa {
  background: #25D366;
  color: var(--white);
  box-shadow: 0 4px 16px rgba(37,211,102,.35);
}
.btn-wa:hover { background: #20bd5a; }
.btn-wa:active { background: #1da851; box-shadow: none; }

/* Ghost */
.btn-ghost {
  background: var(--surface-2);
  color: var(--ink-60);
  border: 1.5px solid var(--ink-10);
}
.btn-ghost:hover { background: var(--surface-3); border-color: var(--ink-20); }
.btn-ghost:active { background: var(--ink-10); }

/* Red / danger */
.btn-red {
  background: var(--red);
  color: var(--white);
}
.btn-red:hover { background: #b91c1c; }

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--amber-d);
  border: 1.5px solid var(--amber);
}
.btn-outline:hover { background: var(--amber-pale); }

/* Sizes */
.btn-sm { height: 36px; padding: 0 var(--s4); font-size: var(--text-xs); }
.btn-lg { height: 54px; padding: 0 var(--s8); font-size: var(--text-md); }

/* Full width */
.btn-full { width: 100%; }

/* ─────────────────────────────────────────────────────────────────────────────
   13. FORM ELEMENTS
───────────────────────────────────────────────────────────────────────────── */
.oform {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.ofield {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.olabel {
  font-size: var(--text-xs);
  font-weight: var(--fw-black);
  color: var(--ink-50);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.oinput, .otextarea {
  background: var(--surface-2);
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  padding: 12px var(--s3);
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  color: var(--ink);
  width: 100%;
  transition: border-color var(--dur-base),
              background var(--dur-base),
              box-shadow var(--dur-base);
  font-family: var(--font-b);
}

.oinput:focus, .otextarea:focus {
  border-color: var(--amber);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--amber-glow);
}

.oinput::placeholder, .otextarea::placeholder { color: var(--ink-20); }

.otextarea { resize: vertical; min-height: 80px; }

/* ─────────────────────────────────────────────────────────────────────────────
   14. BADGES & LABELS
───────────────────────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  letter-spacing: .03em;
}

.chip-amber   { background: var(--amber); color: var(--ink); }
.chip-green   { background: var(--green-pale); color: var(--green); }
.chip-red     { background: var(--red-pale); color: var(--red); }
.chip-blue    { background: var(--blue-pale); color: var(--blue); }
.chip-purple  { background: var(--trending-pale); color: var(--trending); }
.chip-ink     { background: var(--ink); color: var(--white); }

/* Trending glow badge */
.chip-trending {
  background: linear-gradient(135deg, var(--trending), #9333ea);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(124,58,237,.4);
  animation: trendPulse 2s ease-in-out infinite;
}

@keyframes trendPulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(124,58,237,.4); }
  50%       { box-shadow: 0 2px 20px rgba(124,58,237,.7); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   15. TOAST NOTIFICATION
───────────────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--dh) + env(safe-area-inset-bottom, 0px) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-80);
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: var(--fw-semi);
  padding: 11px var(--s5);
  border-radius: var(--r-pill);
  z-index: var(--z-toast);
  white-space: nowrap;
  box-shadow: var(--sh3);
  pointer-events: none;
  animation: toastIn var(--dur-slow) var(--ease-spring);
}

.toast[hidden] { display: none !important; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(.9); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   16. FLOATING WHATSAPP
───────────────────────────────────────────────────────────────────────────── */
.wa-float {
  position: fixed;
  right: var(--s4);
  bottom: calc(var(--dh) + env(safe-area-inset-bottom, 0px) + 14px);
  width: 54px; height: 54px;
  background: #25D366;
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: calc(var(--z-header) - 1);
  box-shadow: 0 4px 20px rgba(37,211,102,.5);
  transition: transform var(--dur-base) var(--ease-spring);
  animation: waPulse 3s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}

.wa-float:hover { transform: scale(1.08); }
.wa-float:active { transform: scale(.92); }

@keyframes waPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,.5); }
  50%       { box-shadow: 0 4px 36px rgba(37,211,102,.8); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   17. SKELETON LOADERS
───────────────────────────────────────────────────────────────────────────── */
.skel {
  background: var(--white);
  border-radius: var(--r);
  overflow: hidden;
}

.skel-img {
  aspect-ratio: 1/1;
  background: linear-gradient(
    90deg,
    var(--surface-3) 25%,
    var(--surface-2) 50%,
    var(--surface-3) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skel-body { padding: 10px var(--s3) var(--s3); }

.skel-line {
  height: 11px;
  border-radius: 6px;
  margin-bottom: 8px;
  background: linear-gradient(
    90deg,
    var(--surface-3) 25%,
    var(--surface-2) 50%,
    var(--surface-3) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skel-line.s { width: 55%; }
.skel-line.xs { width: 35%; }

@keyframes shimmer { to { background-position: -200% 0; } }

/* ─────────────────────────────────────────────────────────────────────────────
   18. UTILITY CLASSES
───────────────────────────────────────────────────────────────────────────── */

/* Display */
.d-flex    { display: flex; }
.d-grid    { display: grid; }
.d-none    { display: none; }
.d-block   { display: block; }

/* Flex helpers */
.flex-col  { flex-direction: column; }
.flex-1    { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1     { gap: var(--s1); }
.gap-2     { gap: var(--s2); }
.gap-3     { gap: var(--s3); }
.gap-4     { gap: var(--s4); }

/* Spacing */
.mt-2 { margin-top: var(--s2); }
.mt-3 { margin-top: var(--s3); }
.mt-4 { margin-top: var(--s4); }
.mb-2 { margin-bottom: var(--s2); }
.mb-3 { margin-bottom: var(--s3); }
.mb-4 { margin-bottom: var(--s4); }

/* Text */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-xs     { font-size: var(--text-xs); }
.text-sm     { font-size: var(--text-sm); }
.text-md     { font-size: var(--text-md); }
.text-amber  { color: var(--amber-d); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--ink-40); }
.fw-bold     { font-weight: var(--fw-bold); }
.fw-semi     { font-weight: var(--fw-semi); }
.font-d      { font-family: var(--font-d); }

/* Truncate */
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Visually hidden (accessible) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   19. RESPONSIVE BREAKPOINTS
───────────────────────────────────────────────────────────────────────────── */
@media (min-width: 600px) {
  :root {
    --hh: 60px;
    --sh: 54px;
    --ch: 48px;
    --dh: 66px;
  }
}

@media (min-width: 960px) {
  :root { --hh: 64px; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   20. REDUCED MOTION — Accessibility
───────────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
    }
