/* ===========================================================================
   DESIGN SYSTEM
   Built with system fonts only — no web-font download, so the first paint is
   instant even on a weak 3G signal.
   =========================================================================== */

/* ---------- Theme presets ---------- */
:root,
[data-theme="ink"] {
  --accent:        #1A1A1A;
  --accent-soft:   #F4F4F2;
  --accent-ink:    #FFFFFF;
  --bg:            #FFFFFF;
  --bg-sunken:     #FAFAF8;
  --bg-raised:     #FFFFFF;
  --text:          #16160F;
  --text-muted:    #6B6B63;
  --text-faint:    #9A9A92;
  --line:          #E7E7E2;
  --line-strong:   #D2D2CB;
  --success:       #0F7A3D;
  --success-soft:  #E8F5EC;
  --warning:       #9A6400;
  --warning-soft:  #FDF3E0;
  --danger:        #B4231B;
  --danger-soft:   #FCEDEC;
  --sale:          #B4231B;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --shadow-sm:     0 1px 2px rgba(22,22,15,.06), 0 1px 3px rgba(22,22,15,.04);
  --shadow:        0 4px 12px rgba(22,22,15,.07), 0 2px 4px rgba(22,22,15,.04);
  --shadow-lg:     0 18px 40px rgba(22,22,15,.12), 0 4px 12px rgba(22,22,15,.06);
  --header-h:      64px;
}

[data-theme="blestonex"] {
  --accent:        #0F7A3D;
  --accent-soft:   #E8F5EC;
  --accent-ink:    #FFFFFF;
  --bg:            #FFFFFF;
  --bg-sunken:     #F7FBF8;
  --text:          #11201A;
  --text-muted:    #5B6F66;
  --line:          #DDEBE2;
  --line-strong:   #C3DACB;
  --radius:        10px;
}

[data-theme="midnight"] {
  --accent:        #6C8CFF;
  --accent-soft:   #1B2238;
  --accent-ink:    #0A0E1A;
  --bg:            #0B0F1A;
  --bg-sunken:     #080C15;
  --bg-raised:     #121829;
  --text:          #EEF1F8;
  --text-muted:    #98A3BE;
  --text-faint:    #6B7694;
  --line:          #1F2740;
  --line-strong:   #2C3654;
  --success-soft:  #11291C;
  --warning-soft:  #2A2010;
  --danger-soft:   #2B1413;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.4);
  --shadow:        0 4px 14px rgba(0,0,0,.45);
  --shadow-lg:     0 20px 44px rgba(0,0,0,.55);
}

[data-theme="clay"] {
  --accent:        #A8532B;
  --accent-soft:   #FBF0EA;
  --bg:            #FFFDFB;
  --bg-sunken:     #FBF6F2;
  --text:          #2A1B12;
  --text-muted:    #7A6456;
  --line:          #EEE2D9;
  --line-strong:   #DCC9BB;
  --radius:        16px;
}

[data-theme="rose"] {
  --accent:        #B02E55;
  --accent-soft:   #FCEDF1;
  --bg:            #FFFCFD;
  --bg-sunken:     #FDF5F7;
  --text:          #261017;
  --text-muted:    #7E5C66;
  --line:          #F2E0E6;
  --line-strong:   #E3C4CE;
  --radius:        18px;
}

/* Dark mode applied on top of any light preset */
[data-mode="dark"] {
  --bg:            #0E0F0D;
  --bg-sunken:     #090A08;
  --bg-raised:     #171815;
  --text:          #F2F2EC;
  --text-muted:    #A3A39A;
  --text-faint:    #74746C;
  --line:          #262722;
  --line-strong:   #363730;
  --accent-soft:   #1E1F1B;
  --success-soft:  #11241A;
  --warning-soft:  #241D0E;
  --danger-soft:   #26130F;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.5);
  --shadow:        0 4px 14px rgba(0,0,0,.55);
  --shadow-lg:     0 20px 44px rgba(0,0,0,.65);
}
[data-mode="dark"][data-theme="ink"] { --accent: #F2F2EC; --accent-ink: #0E0F0D; }

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration:.01ms !important; transition-duration:.01ms !important; }
}
body {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* ---------- Typography ---------- */
h1,h2,h3,h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }
h1 { font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem); }
.eyebrow {
  font-size: .72rem; font-weight: 650; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-muted);
}
.lede { font-size: clamp(1rem, .95rem + .4vw, 1.18rem); color: var(--text-muted); }
.muted { color: var(--text-muted); }
.small { font-size: .85rem; }
.tnum  { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 900px) { .wrap { padding-inline: 32px; } }
.section { padding-block: clamp(40px, 5vw, 76px); }
.section--tight { padding-block: clamp(28px, 3vw, 44px); }
.sunken { background: var(--bg-sunken); }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.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;
}

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--accent); --btn-fg: var(--accent-ink); --btn-bd: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; min-height: 46px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd); border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; letter-spacing: -.01em;
  text-align: center; white-space: nowrap;
  transition: transform .12s ease, box-shadow .18s ease, opacity .18s ease, background .18s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn--ghost   { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--line-strong); }
.btn--ghost:hover:not(:disabled) { --btn-bd: var(--text); }
.btn--soft    { --btn-bg: var(--accent-soft); --btn-fg: var(--accent); --btn-bd: transparent; }
.btn--quiet   { --btn-bg: transparent; --btn-fg: var(--text-muted); --btn-bd: transparent; min-height: 36px; padding: 6px 10px; }
.btn--quiet:hover { --btn-fg: var(--text); box-shadow: none; transform: none; }
.btn--wa      { --btn-bg: #25D366; --btn-fg: #06331A; --btn-bd: #25D366; }
.btn--danger  { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn--lg      { padding: 15px 28px; min-height: 54px; font-size: 1rem; }
.btn--sm      { padding: 8px 14px; min-height: 38px; font-size: .86rem; }
.btn--block   { display: flex; width: 100%; }
.btn--icon    { padding: 10px; min-height: 42px; min-width: 42px; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .7; }
.btn[aria-busy="true"] .btn__label::after {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 8px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite; vertical-align: -1px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Form controls ---------- */
.field { display: block; }
.field > .label {
  display: block; font-size: .85rem; font-weight: 600;
  margin-bottom: 6px; color: var(--text);
}
.field .hint { display: block; font-size: .8rem; color: var(--text-muted); margin-top: 5px; }
.field .err  { display: block; font-size: .8rem; color: var(--danger); margin-top: 5px; font-weight: 500; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; min-height: 46px;
  background: var(--bg-raised); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
  border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft);
}
.textarea { min-height: 96px; resize: vertical; }
.select {
  appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236B6B63' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Badges & pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 650; letter-spacing: .02em;
  background: var(--accent-soft); color: var(--accent);
}
.badge--sale    { background: var(--danger-soft); color: var(--sale); }
.badge--ok      { background: var(--success-soft); color: var(--success); }
.badge--warn    { background: var(--warning-soft); color: var(--warning); }
.badge--out     { background: var(--line); color: var(--text-muted); }
.badge--new     { background: var(--text); color: var(--bg); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg-raised);
  font-size: .87rem; font-weight: 550; white-space: nowrap;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"], .chip.is-active {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.chip:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.chiprow {
  display: flex; gap: 9px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.chiprow::-webkit-scrollbar { display: none; }

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--text); color: var(--bg);
  font-size: .82rem; text-align: center; padding: 8px 20px; font-weight: 500;
}

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__bar {
  display: flex; align-items: center; gap: 12px;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.22rem; letter-spacing: -.03em; }
.logo img { height: 32px; width: auto; }
.logo__mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: .95rem; font-weight: 800;
}
.nav { display: none; gap: 4px; margin-left: 14px; }
@media (min-width: 900px) { .nav { display: flex; } }
.nav a {
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: .92rem; font-weight: 550; color: var(--text-muted);
  transition: all .15s ease;
}
.nav a:hover { color: var(--text); background: var(--accent-soft); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 650; }

.search {
  position: relative; flex: 1 1 auto; max-width: 440px; display: none;
}
@media (min-width: 760px) { .search { display: block; } }
.search .input { padding-left: 40px; min-height: 42px; background: var(--bg-sunken); }
.search__icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); pointer-events: none;
}
.search__results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 70;
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 60vh; overflow-y: auto; padding: 6px;
}
.search__results:empty { display: none; }
.sresult { display: flex; gap: 11px; padding: 9px; border-radius: var(--radius-sm); align-items: center; }
.sresult:hover, .sresult:focus-visible { background: var(--bg-sunken); }
.sresult img { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; flex: none; background: var(--bg-sunken); }

.iconbtn {
  position: relative; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  color: var(--text); transition: background .15s ease;
}
.iconbtn:hover { background: var(--accent-soft); }
.iconbtn__count {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 999px;
  background: var(--sale); color: #fff;
  font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center;
  border: 2px solid var(--bg);
}
.iconbtn__count[data-count="0"] { display: none; }

/* ---------- Mobile bottom nav ---------- */
.botnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 55;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 900px) { .botnav { display: none; } }
.botnav a {
  display: grid; place-items: center; gap: 2px; padding: 9px 4px;
  font-size: .68rem; font-weight: 600; color: var(--text-muted); position: relative;
}
.botnav a[aria-current="page"] { color: var(--accent); }
[data-theme="ink"] .botnav a[aria-current="page"] { color: var(--text); }
.botnav .iconbtn__count { top: 2px; right: 50%; margin-right: -22px; }
body.has-botnav { padding-bottom: 72px; }
@media (min-width: 900px) { body.has-botnav { padding-bottom: 0; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg-sunken); }
.hero__inner {
  display: grid; gap: 28px; align-items: center;
  padding-block: clamp(36px, 5vw, 72px);
}
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1.05fr .95fr; gap: 48px; } }
.hero h1 { margin-bottom: 14px; }
.hero__art {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); background: var(--bg-raised);
  aspect-ratio: 4/3;
}
.hero__art img, .hero__art svg { width: 100%; height: 100%; object-fit: cover; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ---------- Trust badges ---------- */
.trust {
  display: grid; gap: 1px; background: var(--line);
  border-block: 1px solid var(--line);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 860px) { .trust { grid-template-columns: repeat(4, 1fr); } }
.trust__item {
  background: var(--bg); padding: 18px 20px;
  display: flex; gap: 12px; align-items: flex-start;
}
.trust__item svg { color: var(--accent); flex: none; margin-top: 2px; }
[data-theme="ink"] .trust__item svg { color: var(--text); }
.trust__item strong { display: block; font-size: .92rem; font-weight: 650; }
.trust__item span { font-size: .8rem; color: var(--text-muted); }

/* ---------- Product grid & card ---------- */
.pgrid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 680px)  { .pgrid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; } }
@media (min-width: 1040px) { .pgrid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px; } }

.pcard { position: relative; display: flex; flex-direction: column; }
.pcard__media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--bg-sunken); aspect-ratio: 3/4;
}
[data-ratio="square"]    .pcard__media { aspect-ratio: 1/1; }
[data-ratio="landscape"] .pcard__media { aspect-ratio: 4/3; }
.pcard__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s cubic-bezier(.2,.7,.3,1), opacity .3s ease;
}
.pcard:hover .pcard__media img { transform: scale(1.045); }
.pcard__media img.is-loading { opacity: 0; }
.pcard__flags { position: absolute; top: 9px; left: 9px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.pcard__fav {
  position: absolute; top: 7px; right: 7px; z-index: 2;
  width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(6px); color: var(--text-muted);
  transition: all .15s ease;
}
.pcard__fav:hover { color: var(--sale); transform: scale(1.08); }
.pcard__fav[aria-pressed="true"] { color: var(--sale); }
.pcard__fav[aria-pressed="true"] svg { fill: currentColor; }
.pcard__quick {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  opacity: 0; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
@media (hover: hover) and (min-width: 900px) {
  .pcard:hover .pcard__quick, .pcard:focus-within .pcard__quick { opacity: 1; transform: none; }
}
@media (hover: none), (max-width: 899px) {
  .pcard__quick { position: static; opacity: 1; transform: none; margin-top: 8px; }
}
.pcard__body { padding-top: 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pcard__cat { font-size: .72rem; color: var(--text-faint); letter-spacing: .03em; text-transform: uppercase; font-weight: 600; }
.pcard__name {
  font-size: .95rem; font-weight: 580; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard__price { display: flex; align-items: baseline; gap: 7px; margin-top: 3px; }
.pcard__price b { font-size: 1rem; font-weight: 680; font-variant-numeric: tabular-nums; }
.pcard__price s { font-size: .82rem; color: var(--text-faint); }
.pcard__rate { display: flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--text-muted); }
.stars { display: inline-flex; gap: 1px; color: #E8A33D; }

/* ---------- Skeletons ---------- */
.skel { background: var(--line); border-radius: var(--radius-sm); position: relative; overflow: hidden; }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bg) 60%, transparent), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skel--media { aspect-ratio: 3/4; border-radius: var(--radius); }
.skel--line { height: 12px; margin-top: 9px; }
.skel--line.short { width: 55%; }

/* ---------- Product detail ---------- */
.pdp { display: grid; gap: 28px; }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: start; } }
.gallery__main {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-sunken); aspect-ratio: 1/1;
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 9px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumbs button {
  width: 64px; height: 64px; flex: none; border-radius: var(--radius-sm);
  overflow: hidden; border: 2px solid transparent; background: var(--bg-sunken);
}
.gallery__thumbs button[aria-current="true"] { border-color: var(--accent); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .pdp__buy { position: sticky; top: calc(var(--header-h) + 20px); } }
.price-now { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.price-was { font-size: 1rem; color: var(--text-faint); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.qty button { width: 42px; height: 46px; display: grid; place-items: center; font-size: 1.2rem; color: var(--text-muted); }
.qty button:hover:not(:disabled) { background: var(--accent-soft); color: var(--text); }
.qty button:disabled { opacity: .3; cursor: not-allowed; }
.qty input {
  width: 48px; height: 46px; text-align: center; border: 0;
  background: transparent; font-weight: 650; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.accordion { border-top: 1px solid var(--line); }
.accordion summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 15px 0; font-weight: 600; cursor: pointer; list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; width: 9px; height: 9px; flex: none;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg); transition: transform .2s ease; margin-right: 4px;
}
.accordion details[open] summary::after { transform: rotate(-135deg); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion .acc__body { padding-bottom: 18px; color: var(--text-muted); font-size: .94rem; }

/* ---------- Cart ---------- */
.citem { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.citem__img { width: 76px; height: 92px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-sunken); }
.citem__name { font-weight: 580; font-size: .95rem; line-height: 1.35; }
.citem__meta { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.citem__right { text-align: right; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; gap: 8px; }

.panel {
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.panel--sunk { background: var(--bg-sunken); }
.totals { font-variant-numeric: tabular-nums; }
.totals .line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .93rem; }
.totals .line--grand {
  border-top: 1px solid var(--line-strong); margin-top: 8px; padding-top: 14px;
  font-size: 1.15rem; font-weight: 700;
}
.totals .line--save { color: var(--success); font-weight: 600; }

.checkout-grid { display: grid; gap: 26px; }
@media (min-width: 940px) { .checkout-grid { grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: start; } }
@media (min-width: 940px) { .checkout-grid__side { position: sticky; top: calc(var(--header-h) + 20px); } }

/* ---------- Payment method picker ---------- */
.paylist { display: grid; gap: 10px; }
.payopt {
  display: flex; gap: 13px; align-items: flex-start; padding: 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg-raised); cursor: pointer; transition: all .15s ease;
}
.payopt:hover { border-color: var(--text-faint); }
.payopt:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}
.payopt input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.payopt strong { display: block; font-size: .95rem; font-weight: 620; }
.payopt span { font-size: .82rem; color: var(--text-muted); }
.payopt.is-disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Steps ---------- */
.steps { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--text-faint); }
.steps li::after { content: ""; width: 20px; height: 1px; background: var(--line-strong); }
.steps li:last-child::after { display: none; }
.steps li[aria-current="step"] { color: var(--text); }
.steps li.is-done { color: var(--success); }

/* ---------- Toast ---------- */
.toasts {
  position: fixed; z-index: 100; left: 16px; right: 16px; bottom: 84px;
  display: flex; flex-direction: column; gap: 9px; align-items: center; pointer-events: none;
}
@media (min-width: 900px) { .toasts { left: auto; right: 24px; bottom: 24px; align-items: flex-end; } }
.toast {
  pointer-events: auto; max-width: 420px; width: 100%;
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 15px; border-radius: var(--radius);
  background: var(--text); color: var(--bg);
  box-shadow: var(--shadow-lg); font-size: .9rem; font-weight: 500;
  animation: toastin .26s cubic-bezier(.2,.9,.3,1);
}
@keyframes toastin { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.toast.is-out { animation: toastout .2s ease forwards; }
@keyframes toastout { to { opacity: 0; transform: translateY(8px) scale(.98); } }
.toast--ok   { background: var(--success); color: #fff; }
.toast--err  { background: var(--danger); color: #fff; }
.toast svg { flex: none; margin-top: 1px; }

/* ---------- Drawer (cart) ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
  backdrop-filter: blur(2px);
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(420px, 100%); background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.3,.8,.3,1);
  box-shadow: var(--shadow-lg);
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer__body { flex: 1; overflow-y: auto; padding: 4px 18px 18px; }
.drawer__foot { border-top: 1px solid var(--line); padding: 16px 18px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); background: var(--bg-raised); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 56px 20px; }
.empty svg { color: var(--text-faint); margin: 0 auto 16px; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--text-muted); margin-bottom: 20px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-sunken); margin-top: 40px; }
.footer__grid { display: grid; gap: 30px; padding-block: 44px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; } }
.footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); margin-bottom: 13px; font-weight: 650; }
.footer li + li { margin-top: 9px; }
.footer a { font-size: .91rem; color: var(--text-muted); }
.footer a:hover { color: var(--text); }
.footer__bottom {
  border-top: 1px solid var(--line); padding-block: 18px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .82rem; color: var(--text-muted);
}
.paymarks { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.paymark {
  height: 24px; padding: 0 9px; border-radius: 5px;
  border: 1px solid var(--line-strong); background: var(--bg-raised);
  font-size: .64rem; font-weight: 700; letter-spacing: .04em;
  display: grid; place-items: center; color: var(--text-muted);
}

/* ---------- WhatsApp float ---------- */
.wafloat {
  position: fixed; right: 16px; bottom: 84px; z-index: 50;
  width: 52px; height: 52px; border-radius: 999px;
  background: #25D366; color: #06331A;
  display: grid; place-items: center;
  box-shadow: var(--shadow-lg); transition: transform .18s ease;
}
.wafloat:hover { transform: scale(1.07); }
@media (min-width: 900px) { .wafloat { bottom: 24px; right: 24px; } }

/* ---------- Offline banner ---------- */
.offline-bar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 200;
  background: var(--warning); color: #fff; text-align: center;
  padding: 7px 16px; font-size: .84rem; font-weight: 600;
  transform: translateY(-100%); transition: transform .25s ease;
}
.offline-bar.is-on { transform: none; }

/* ---------- Admin ---------- */
.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 1fr; }
@media (min-width: 900px) { .admin-shell { grid-template-columns: 236px 1fr; } }
.aside {
  background: var(--bg-sunken); border-right: 1px solid var(--line);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 4px;
}
.aside__nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); font-size: .92rem; font-weight: 550; color: var(--text-muted);
}
.aside__nav a:hover { background: var(--bg-raised); color: var(--text); }
.aside__nav a.is-active { background: var(--accent); color: var(--accent-ink); font-weight: 620; }
.amain { padding: 22px 18px 60px; min-width: 0; }
@media (min-width: 900px) { .amain { padding: 28px 32px 60px; } }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .k { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 650; }
.stat .v { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.8rem); font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 5px; }
.stat .d { font-size: .8rem; color: var(--text-muted); }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); }
.table { min-width: 680px; }
.table th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); font-weight: 650; padding: 12px 14px;
  border-bottom: 1px solid var(--line); background: var(--bg-sunken); white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-sunken); }
.table img { width: 40px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--bg-sunken); }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 110; background: rgba(0,0,0,.5);
  display: grid; place-items: center; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg); border-radius: var(--radius-lg);
  width: min(620px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); transform: scale(.97); transition: transform .2s ease;
}
.modal-backdrop.is-open .modal { transform: none; }
.modal__head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal__body { padding: 20px; overflow-y: auto; }
.modal__foot { padding: 16px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--bg-sunken); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ---------- Order status pills ---------- */
.ostat { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 650; }
.ostat::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.ostat--pending   { background: var(--warning-soft); color: var(--warning); }
.ostat--paid      { background: var(--success-soft); color: var(--success); }
.ostat--packed    { background: var(--accent-soft);  color: var(--accent); }
.ostat--shipped   { background: var(--accent-soft);  color: var(--accent); }
.ostat--delivered { background: var(--success-soft); color: var(--success); }
.ostat--cancelled { background: var(--danger-soft);  color: var(--danger); }
[data-theme="ink"] .ostat--packed, [data-theme="ink"] .ostat--shipped { background: var(--line); color: var(--text); }

/* ---------- Order tracking timeline ---------- */
.timeline { padding-left: 26px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-bottom: 20px; }
.timeline li::before {
  content: ""; position: absolute; left: -26px; top: 5px;
  width: 16px; height: 16px; border-radius: 999px;
  background: var(--bg); border: 2px solid var(--line-strong);
}
.timeline li.is-done::before { background: var(--success); border-color: var(--success); }
.timeline li.is-current::before { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline strong { display: block; font-size: .94rem; }
.timeline span { font-size: .82rem; color: var(--text-muted); }

/* ---------- Utility ---------- */
.divider { height: 1px; background: var(--line); border: 0; }
.copybox {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; background: var(--bg-sunken);
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
}
.copybox code { font-size: 1.02rem; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.print-only { display: none; }

@media print {
  .header, .footer, .botnav, .wafloat, .toasts, .no-print { display: none !important; }
  body { padding: 0; }
  .print-only { display: block; }
  .panel { border: 1px solid #ccc; box-shadow: none; }
}
