/* ─────────────────────────────────────────────────────────
   Elul Distribution · B2B prototype
   3 design directions, switched at runtime via [data-dir]
   ───────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html, body, button, input, textarea, select, table, th, td {
  font-family: "Noto Sans Hebrew", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; font-family: "Noto Sans Hebrew", sans-serif; }
input, textarea, select { font: inherit; color: inherit; font-family: "Noto Sans Hebrew", sans-serif; }
a { color: inherit; }

/* ─────────── Direction A · Linen (warm light gray) ─────────── */
[data-dir="atelier"] {
  --font-display: "Noto Sans Hebrew", system-ui, sans-serif;
  --font-body:    "Noto Sans Hebrew", system-ui, sans-serif;
  --font-mono:    "Noto Sans Hebrew", system-ui, sans-serif;

  --bg:       #f4f3f1;
  --bg-2:     #e7e5e2;
  --surface:  #fbfaf8;
  --ink:      #181715;
  --ink-2:    #4a4843;
  --ink-3:    #8a8780;
  --rule:     #c5d1e0;
  --rule-2:   #dde4ee;
  --accent:   #1f3a6b;     /* deep navy */
  --accent-ink: #fbfaf8;
  --accent-soft: #d8dde7;
  --accent-2: #5478a8;    /* lighter steel blue */
  --positive: #2c4a73;    /* dark slate-blue (replaces green) */
  --warn:     #6b5a33;
  --danger:   #6c3a35;

  --radius:   5px;
  --radius-lg: 5px;
  --pad:      28px;
  --shadow:   0 1px 0 rgba(0,0,0,.04);
  --shadow-2: 0 18px 40px -28px rgba(0,0,0,.35);
}

/* ─────────── Direction B · Slate (cool gray, soft rounded) ─────────── */
[data-dir="souk"] {
  --font-display: "Noto Sans Hebrew", system-ui, sans-serif;
  --font-body:    "Noto Sans Hebrew", system-ui, sans-serif;
  --font-mono:    "Noto Sans Hebrew", system-ui, sans-serif;

  --bg:       #eef0f2;
  --bg-2:     #dde0e4;
  --surface:  #ffffff;
  --ink:      #0f1216;
  --ink-2:    #3d424a;
  --ink-3:    #80858f;
  --rule:     #c5d1e0;
  --rule-2:   #dde4ee;
  --accent:   #1f3a6b;     /* deep navy */
  --accent-ink: #ffffff;
  --accent-soft: #d8dde8;
  --accent-2: #5478a8;
  --positive: #2c4a73;
  --warn:     #6b5a2d;
  --danger:   #6c3a32;

  --radius:   5px;
  --radius-lg: 5px;
  --pad:      20px;
  --shadow:   0 1px 0 rgba(0,0,0,.04);
  --shadow-2: 0 14px 30px -20px rgba(0,0,0,.32);
}

/* ─────────── Direction C · Carbon (high-contrast neutral) ─────────── */
[data-dir="apothecary"] {
  --font-display: "Noto Sans Hebrew", system-ui, sans-serif;
  --font-body:    "Noto Sans Hebrew", system-ui, sans-serif;
  --font-mono:    "Noto Sans Hebrew", system-ui, sans-serif;

  --bg:       #ededed;
  --bg-2:     #dddddd;
  --surface:  #fafafa;
  --ink:      #0a0a0a;
  --ink-2:    #3a3a3a;
  --ink-3:    #858585;
  --rule:     #c5d1e0;
  --rule-2:   #dde4ee;
  --accent:   #1f3a6b;     /* deep navy */
  --accent-ink: #ffffff;
  --accent-soft: #d8dde8;
  --accent-2: #5478a8;
  --positive: #2c4a73;
  --warn:     #6b5a2d;
  --danger:   #6e3a32;

  --radius:   5px;
  --radius-lg: 5px;
  --pad:      22px;
  --shadow:   0 1px 0 rgba(0,0,0,.04);
  --shadow-2: 0 14px 28px -20px rgba(0,0,0,.25);
}

/* ─────────────────────────────────────────────────────────
   Layout shell
   ───────────────────────────────────────────────────────── */

.app {
  min-height: 100vh;
  background: var(--bg);
}

.shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.topbar-wrap {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.utilitybar {
  font-size: 11px;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule-2);
  letter-spacing: 0;
}
.utilitybar .inner {
  max-width: 1400px; margin: 0 auto;
  padding: 7px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.utilitybar .links { display: flex; gap: 18px; }
.utilitybar a { text-decoration: none; }
.utilitybar a:hover { color: var(--ink); }

.topbar {
  max-width: 1400px; margin: 0 auto;
  padding: 16px 28px;
  display: flex; align-items: center; gap: 22px;
}
.topbar .logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  display: flex; flex-direction: column; gap: 2px;
}
.topbar .logo small {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-3);
  text-transform: uppercase;
}
[data-dir="atelier"] .topbar .logo { font-size: 26px; font-weight: 500; }
[data-dir="souk"]    .topbar .logo { font-weight: 600; letter-spacing: 0; }

.topbar .search {
  flex: 1; max-width: 560px;
  position: relative;
}
.topbar .search input {
  width: 100%;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 0 38px 0 14px;
  outline: none;
  font-size: 13px;
}
.topbar .search input:focus { border-color: var(--ink-2); }
.topbar .search .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.topbar .search .lang { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); display: flex; gap: 2px; }
.topbar .search .lang button {
  border: 0; background: transparent; padding: 4px 6px; font-size: 10.5px;
  letter-spacing: 0; color: var(--ink-3); cursor: pointer; border-radius: 5px;
}
.topbar .search .lang button.on { color: var(--ink); background: var(--bg-2); }

.topbar .nav-actions {
  display: flex; gap: 6px; align-items: center;
}
.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-lg);
  cursor: pointer; color: var(--ink-2);
  font-size: 12px;
}
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.icon-btn .badge {
  position: absolute; top: 4px; left: 4px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 9.5px; font-weight: 600;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
}

/* secondary nav under topbar */
.subnav {
  border-top: 1px solid var(--rule-2);
}
.subnav .inner {
  max-width: 1400px; margin: 0 auto;
  padding: 10px 28px;
  display: flex; align-items: center; gap: 24px;
  font-size: 13px;
}
.subnav a {
  text-decoration: none;
  color: var(--ink-2);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  cursor: pointer;
}
.subnav a:hover, .subnav a.active { color: var(--ink); border-bottom-color: var(--ink); }
.subnav .spacer { flex: 1; }

/* main content frame */
.page {
  max-width: 1400px; margin: 0 auto;
  padding: 28px;
}

/* ─────────────────────────────────────────────────────────
   Primitives
   ───────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  background: var(--ink); color: var(--bg);
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  cursor: pointer; font-weight: 500; font-size: 13px;
  letter-spacing: 0;
  transition: transform .08s ease, background .12s ease, color .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { background: var(--surface); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 14px; }
.btn.block { width: 100%; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0;
  background: var(--bg-2);
  color: var(--ink-2);
  border-radius: 999px;
  white-space: nowrap;
}
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag.positive { background: color-mix(in srgb, var(--positive) 18%, var(--bg)); color: var(--positive); }
.tag.warn { background: color-mix(in srgb, var(--warn) 22%, var(--bg)); color: var(--warn); }
.tag.danger { background: color-mix(in srgb, var(--danger) 18%, var(--bg)); color: var(--danger); }
.tag.outline { background: transparent; border: 1px solid var(--rule); color: var(--ink-2); }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.serif { font-family: var(--font-display); }

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--pad);
}

.divider { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ─────────────────────────────────────────────────────────
   Auth screens
   ───────────────────────────────────────────────────────── */

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.auth .panel-art {
  background: var(--bg-2);
  position: relative; overflow: hidden;
  padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  border-left: 1px solid var(--rule);
}
.auth .panel-art .mark {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
}
.auth .panel-art .mark small {
  display: block; font-family: var(--font-body);
  font-size: 10px; letter-spacing: 0; text-transform: uppercase;
  color: var(--ink-3); margin-top: 4px;
}
.auth .panel-art .pitch {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: 0;
  max-width: 18ch;
}
[data-dir="apothecary"] .auth .panel-art .pitch { font-weight: 500; }

.auth .panel-art .meta {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px 32px; max-width: 460px;
  font-size: 12px; color: var(--ink-2);
}
.auth .panel-art .meta b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

.auth .form {
  padding: 56px clamp(28px, 6vw, 96px);
  display: flex; flex-direction: column; justify-content: center;
  background: var(--bg);
}
.auth .form h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0 0 6px;
}
.auth .form .sub { color: var(--ink-2); font-size: 13px; margin-bottom: 28px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: uppercase; color: var(--ink-3); }
.field input, .field textarea, .field select {
  height: 42px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  outline: none;
}
.field textarea { height: auto; padding: 10px 12px; min-height: 90px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink-2); }
.field .hint { font-size: 11px; color: var(--ink-3); }

.fieldgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.tabs {
  display: inline-flex; padding: 3px;
  background: var(--bg-2); border-radius: var(--radius-lg);
  margin-bottom: 22px;
}
.tabs button {
  border: 0; background: transparent;
  padding: 8px 18px; border-radius: calc(var(--radius-lg) - 2px);
  font-size: 13px; font-weight: 500;
  color: var(--ink-2); cursor: pointer;
}
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Pending */
.pending {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 40px 24px;
  background: var(--bg);
}
.pending .stack {
  max-width: 520px; text-align: center;
}
.pending h2 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: 0;
  margin: 24px 0 10px;
}
.pending p { color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.pending .dotline {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 36px 0;
  color: var(--ink-3); font-size: 11px;
  letter-spacing: 0; text-transform: uppercase;
}
.pending .dotline .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--rule);
}
.pending .dotline .dot.done { background: var(--positive); }
.pending .dotline .dot.active { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.pending .seal {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 38px; font-weight: 700;
  margin: 0 auto;
}

/* ─────────────────────────────────────────────────────────
   Catalog
   ───────────────────────────────────────────────────────── */

.catalog-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
}

.filters h3 {
  font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: uppercase;
  color: var(--ink-3); margin: 0 0 10px;
}
.filters .filter-block { padding: 14px 0; border-bottom: 1px solid var(--rule-2); }
.filters .filter-block:first-child { padding-top: 0; }
.filters .filter-block label {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0; font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.filters .filter-block label .count { margin-right: auto; color: var(--ink-3); font-size: 11px; }
.filters input[type="checkbox"] { accent-color: var(--accent); }
.filters .range {
  display: flex; gap: 8px; align-items: center;
}
.filters .range input {
  width: 100%; height: 32px; padding: 0 8px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
}

.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--ink-3);
  letter-spacing: 0;
  margin-bottom: 14px;
}
.crumbs span.sep { color: var(--ink-3); opacity: .5; }

.catalog-header {
  display: flex; align-items: end; gap: 16px; justify-content: space-between;
  margin-bottom: 18px;
}
.catalog-header h1 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
  line-height: 1;
}
[data-dir="apothecary"] .catalog-header h1 { font-weight: 500; font-size: 30px; letter-spacing: 0; }
.catalog-header .meta { color: var(--ink-3); font-size: 12px; }
.catalog-header .ctrl {
  display: flex; gap: 8px; align-items: center;
}
.catalog-header select {
  height: 36px; padding: 0 28px 0 10px;
  border: 1px solid var(--rule); background: var(--surface);
  border-radius: var(--radius); font-size: 12px;
}

.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 18px 14px;
}
@media (max-width: 1100px) {
  .products { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

.product {
  background: var(--surface);
  border: 1px solid var(--rule-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  transition: transform .14s ease, border-color .14s ease;
  cursor: pointer;
}
.product:hover { border-color: var(--rule); transform: translateY(-2px); }

.product .ph {
  aspect-ratio: 1/1;
  position: relative;
  background: repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 14%, var(--bg-2)) 0 8px,
    color-mix(in srgb, var(--accent) 7%, var(--bg-2)) 8px 16px);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
}
.product .ph .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  padding: 4px 8px;
  border-radius: 5px;
}
.product .ph .stamps {
  position: absolute; top: 10px; right: 10px;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-end;
}
.product .ph .quick {
  position: absolute; bottom: 10px; left: 10px;
  display: none;
}
.product:hover .ph .quick { display: flex; gap: 6px; }
.product .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.product .brand {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0; text-transform: uppercase;
  color: var(--ink-3);
}
.product .name {
  font-size: 14px; font-weight: 500; color: var(--ink);
  line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.5em;
}
[data-dir="atelier"] .product .name { font-family: var(--font-display); font-size: 16px; font-weight: 500; }
.product .row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px;
}
.product .price {
  font-size: 16px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.product .price .vat { font-size: 9.5px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; margin-right: 4px; }
.product .price .old {
  font-size: 11px; color: var(--ink-3); text-decoration: line-through;
  margin-left: 6px; font-weight: 400;
}
.product .stock {
  font-size: 11px; color: var(--ink-2);
  font-family: var(--font-mono);
  display: inline-flex; align-items: center; gap: 6px;
}
.product .stock .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--positive); }
.product .stock.low .pip { background: var(--warn); }
.product .stock.out .pip { background: var(--danger); }
.product .add {
  margin-top: 8px;
  height: 36px; border-radius: var(--radius);
  background: var(--ink); color: var(--bg);
  border: 0; cursor: pointer; font-size: 12px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.product .add:hover { background: var(--accent); }
.product .add[disabled] { background: var(--bg-2); color: var(--ink-3); cursor: not-allowed; }

/* hero banner */
.hero {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 22px;
  background: var(--bg-2);
  min-height: 240px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.hero .copy { padding: 36px 40px; align-self: center; }
.hero .copy .kicker { font-size: 11px; letter-spacing: 0; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.hero .copy h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05; letter-spacing: 0;
  margin: 8px 0 12px;
  font-weight: 500;
}
.hero .copy p { color: var(--ink-2); margin: 0 0 18px; max-width: 36ch; font-size: 13.5px; }
.hero .copy .row { display: flex; gap: 10px; align-items: center; }
.hero .art {
  position: relative;
  background: repeating-linear-gradient(45deg,
    color-mix(in srgb, var(--accent) 22%, var(--bg-2)) 0 14px,
    color-mix(in srgb, var(--accent) 12%, var(--bg-2)) 14px 28px);
  display: flex; align-items: center; justify-content: center;
}
.hero .art .badge {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0; text-transform: uppercase;
  padding: 5px 10px; color: var(--ink-2); border-radius: 5px;
}

/* category strip */
.catstrip {
  display: grid; grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 10px; margin-bottom: 22px;
}
.catstrip .c {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 16px 14px;
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer; transition: border-color .12s ease;
}
.catstrip .c:hover { border-color: var(--ink); }
.catstrip .c .nm { font-size: 13px; font-weight: 500; }
.catstrip .c .ct { font-size: 11px; color: var(--ink-3); font-family: var(--font-mono); }

/* quick orders panel on homepage */
.quickrows {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px;
}
.quickrow {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 22px;
  display: flex; flex-direction: column;
}
.quickrow .ttl {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500; letter-spacing: 0;
  margin: 4px 0 4px;
}
.quickrow .sub { font-size: 12px; color: var(--ink-2); margin-bottom: 16px; }
.quickrow .icon-stamp {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 13px;
}
.quickrow ul { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.quickrow ul li { display: flex; align-items: center; gap: 8px; }
.quickrow ul li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.quickrow .act { margin-top: auto; }

/* sticky cart preview */
.minicart-bar {
  position: sticky; bottom: 12px;
  margin: 16px auto 0; max-width: 800px;
  background: var(--surface); border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 10px 12px 10px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-2);
  z-index: 30;
}
.minicart-bar .meta { font-size: 12px; color: var(--ink-2); }
.minicart-bar .meta b { color: var(--ink); font-weight: 600; }
.minicart-bar .grow { flex: 1; }
.minicart-bar .progress {
  flex: 1; max-width: 280px;
  height: 4px; background: var(--bg-2); border-radius: 999px; overflow: hidden;
}
.minicart-bar .progress > div { height: 100%; background: var(--accent); }

/* ─────────────────────────────────────────────────────────
   Cart & checkout
   ───────────────────────────────────────────────────────── */

.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; }

.cart-reservation {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--rule));
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}
.cart-reservation .icon {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-reservation .t { font-size: 13px; }
.cart-reservation .t b { color: var(--accent); }
.cart-reservation .time {
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 500; letter-spacing: 0;
  color: var(--ink);
}

.cart-table {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cart-row {
  display: grid;
  grid-template-columns: 88px 1fr 130px 110px 110px 32px;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule-2);
}
.cart-row:last-child { border-bottom: 0; }
.cart-row .thumb {
  aspect-ratio: 1/1; width: 100%; border-radius: var(--radius);
  background: repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 16%, var(--bg-2)) 0 6px,
    color-mix(in srgb, var(--accent) 8%, var(--bg-2)) 6px 12px);
}
.cart-row .info .b { font-size: 10.5px; letter-spacing: 0; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.cart-row .info .n { font-size: 14px; font-weight: 500; }
.cart-row .info .meta { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; font-family: var(--font-mono); }

.qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--bg);
}
.qty button {
  width: 32px; height: 36px; background: transparent; border: 0;
  cursor: pointer; color: var(--ink-2);
}
.qty button:hover { color: var(--ink); }
.qty input {
  width: 44px; height: 36px; border: 0; background: transparent;
  text-align: center; font: inherit; outline: none;
  font-variant-numeric: tabular-nums;
}

.cart-summary {
  position: sticky; top: 130px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 22px;
  align-self: start;
}
.cart-summary h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500; letter-spacing: 0;
  margin: 0 0 14px;
}
.cart-summary .line {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; font-size: 13px;
}
.cart-summary .line span:last-child { font-family: var(--font-mono); }
.cart-summary .total {
  border-top: 1px solid var(--rule); margin-top: 8px; padding-top: 14px;
  font-weight: 600;
}
.cart-summary .total span:last-child { font-size: 22px; font-family: var(--font-mono); }
.cart-summary .ship-note {
  background: var(--bg-2); border-radius: var(--radius);
  padding: 10px 12px; font-size: 11.5px; color: var(--ink-2);
  margin: 12px 0;
}
.cart-summary .progress {
  height: 4px; background: var(--bg-2); border-radius: 999px; margin-top: 8px; overflow: hidden;
}
.cart-summary .progress > div { height: 100%; background: var(--accent); }

/* checkout stepper */
.stepper {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.stepper .step {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--ink-3);
}
.stepper .step .n {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
}
.stepper .step.on .n { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stepper .step.done .n { background: var(--positive); color: white; border-color: var(--positive); }
.stepper .step.on { color: var(--ink); font-weight: 600; }
.stepper .bar { flex: 1; height: 1px; background: var(--rule); }

/* ─────────────────────────────────────────────────────────
   Account / dashboard
   ───────────────────────────────────────────────────────── */

.acct-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }

.acct-side {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  position: sticky; top: 130px;
}
.acct-side .who {
  display: flex; gap: 12px; align-items: center;
  padding: 4px 6px 14px; margin-bottom: 8px;
  border-bottom: 1px solid var(--rule-2);
}
.acct-side .who .av {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600;
}
.acct-side .who .n { font-size: 13px; font-weight: 600; }
.acct-side .who .g { font-size: 11px; color: var(--ink-3); }
.acct-side nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px;
  border-radius: var(--radius);
  text-decoration: none; color: var(--ink-2); font-size: 13px;
  cursor: pointer;
}
.acct-side nav a:hover { background: var(--bg-2); color: var(--ink); }
.acct-side nav a.on { background: var(--bg-2); color: var(--ink); font-weight: 600; }
.acct-side nav a .cnt {
  margin-right: auto; font-size: 10.5px; color: var(--ink-3); font-family: var(--font-mono);
}

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 22px;
}
.stat {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: 18px;
}
.stat .l { font-size: 11px; letter-spacing: 0; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.stat .v {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 500; letter-spacing: 0; margin-top: 4px;
}
.stat .d { font-size: 11px; color: var(--ink-3); margin-top: 4px; font-family: var(--font-mono); }
.stat .d.up { color: var(--positive); }

.table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); overflow: hidden;
}
.table th, .table td {
  padding: 12px 16px; text-align: right; vertical-align: middle;
  border-bottom: 1px solid var(--rule-2);
  font-size: 13px;
}
.table th {
  font-size: 10.5px; letter-spacing: 0; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  background: var(--bg);
}
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }

.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 500; letter-spacing: 0;
  margin: 0;
}

/* Need list */
.needlist-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.needlist-table th, .needlist-table td {
  padding: 10px 12px; font-size: 13px;
  border-bottom: 1px solid var(--rule-2);
}
.needlist-table th {
  font-size: 10.5px; letter-spacing: 0; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  background: var(--bg);
  text-align: right;
}
.needlist-table input {
  width: 100%; height: 36px; padding: 0 10px;
  background: var(--bg); border: 1px solid transparent;
  border-radius: var(--radius); outline: none;
}
.needlist-table input:focus { border-color: var(--rule); background: var(--surface); }
.needlist-table tr:last-child td { border-bottom: 0; }

.dropzone {
  border: 1px dashed var(--rule);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg));
  border-radius: var(--radius-lg);
  padding: 24px; text-align: center;
}
.dropzone .ttl { font-family: var(--font-display); font-size: 18px; font-weight: 500; }
.dropzone .sub { font-size: 12px; color: var(--ink-3); margin: 4px 0 12px; }

/* Lists */
.list-card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.list-card .ttl { font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.list-card .sub { font-size: 11.5px; color: var(--ink-3); font-family: var(--font-mono); }
.list-card .preview { display: flex; gap: 6px; }
.list-card .preview .pv {
  width: 38px; height: 38px; border-radius: var(--radius);
  background: repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 18%, var(--bg-2)) 0 5px,
    color-mix(in srgb, var(--accent) 9%, var(--bg-2)) 5px 10px);
}

/* WhatsApp FAB */
.wa-fab {
  position: fixed; left: 18px; bottom: 18px;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25D366; color: white;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer;
  box-shadow: 0 8px 24px -8px rgba(37,211,102,.6);
  z-index: 40;
}

/* product detail */
.pd { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; }
.pd .gallery { display: grid; grid-template-columns: 64px 1fr; gap: 12px; }
.pd .gallery .thumbs { display: flex; flex-direction: column; gap: 8px; }
.pd .gallery .thumbs .t {
  aspect-ratio: 1/1; border: 1px solid var(--rule-2); border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--bg-2)) 0 5px, color-mix(in srgb, var(--accent) 8%, var(--bg-2)) 5px 10px);
  cursor: pointer;
}
.pd .gallery .thumbs .t.on { border-color: var(--ink); }
.pd .gallery .main {
  aspect-ratio: 1/1;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--bg-2)) 0 12px, color-mix(in srgb, var(--accent) 8%, var(--bg-2)) 12px 24px);
  border-radius: var(--radius-lg);
}
.pd .info .brand { font-size: 11px; letter-spacing: 0; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.pd .info h1 { font-family: var(--font-display); font-size: 38px; font-weight: 500; letter-spacing: 0; margin: 8px 0 4px; line-height: 1.05; }
.pd .info .sub { color: var(--ink-2); margin-bottom: 18px; font-size: 13px; }
.pd .pricerow { display: flex; align-items: end; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
.pd .pricerow .price { font-family: var(--font-mono); font-size: 36px; font-weight: 500; letter-spacing: 0; line-height: 1; }
.pd .pricerow .vat { font-size: 11px; color: var(--ink-3); }
.pd .speclist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; margin: 18px 0; }
.pd .speclist .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--rule-2); font-size: 12.5px; }
.pd .speclist .row span:first-child { color: var(--ink-3); }
.pd .speclist .row span:last-child { font-family: var(--font-mono); }

/* documents */
.docs-list {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); overflow: hidden;
}
.doc-row {
  display: grid; grid-template-columns: 48px 1fr 130px 130px 100px;
  align-items: center; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--rule-2);
}
.doc-row:last-child { border-bottom: 0; }
.doc-row .icon-doc {
  width: 36px; height: 44px; border-radius: 5px;
  background: var(--bg-2); border: 1px solid var(--rule);
  position: relative;
}
.doc-row .icon-doc::after {
  content: "PDF"; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0;
  color: var(--accent); font-weight: 700;
}

/* helpers */
.row-gap { display: flex; gap: 10px; align-items: center; }
.muted { color: var(--ink-3); }
.right { text-align: left; } /* in RTL, "left" visually */
.spacer { flex: 1; }

/* ─────────────────────────────────────────────────────────
   Wholesale catalog table (single big table — Lindo-style)
   ───────────────────────────────────────────────────────── */

.page-head {
  text-align: center;
  margin: 4px 0 24px;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
  line-height: 1;
}
[data-dir="apothecary"] .page-head h1 { font-weight: 500; }
.page-head .stamp {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
  color: var(--ink-3);
  margin-top: 8px;
}

.filterbar {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.filterbar .row {
  display: grid;
  grid-template-columns: 200px 200px 1fr repeat(4, minmax(110px, auto)) auto;
  gap: 14px;
  align-items: end;
}
.filterbar .fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filterbar .fld label {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0; text-transform: uppercase;
  color: var(--ink-3);
}
.filterbar .fld input, .filterbar .fld select {
  height: 36px; padding: 0 10px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  outline: none;
  font-size: 13px;
}
.filterbar .fld input:focus, .filterbar .fld select:focus { border-color: var(--ink-2); background: var(--surface); }

.toggle {
  display: flex; flex-direction: column; gap: 6px; align-items: stretch;
}
.toggle .lab {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0; text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  text-align: center;
}
.tswitch {
  --tw-h: 22px;
  width: 40px; height: var(--tw-h);
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  position: relative; cursor: pointer;
  padding: 0;
  margin: 0 auto;
  transition: background .15s ease, border-color .15s ease;
}
.tswitch::after {
  content: "";
  position: absolute; top: 1px; right: 1px;
  width: calc(var(--tw-h) - 4px); height: calc(var(--tw-h) - 4px);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  transition: transform .18s cubic-bezier(.5,.1,.3,1.2);
}
.tswitch.on { background: var(--accent); border-color: var(--accent); }
.tswitch.on::after { transform: translateX(-18px); background: white; }

.tbl-wrap {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.tbl-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
}
.tbl-meta .count { color: var(--ink-3); font-family: var(--font-mono); }
.tbl-meta .total {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--font-mono);
  font-size: 16px; font-weight: 600;
}
.tbl-meta .total span { color: var(--ink-3); font-size: 11px; font-weight: 400; }

.wstable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.wstable thead th {
  background: var(--bg);
  text-align: right;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 12px 10px;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
  position: sticky; top: 0;
  z-index: 2;
}
.wstable thead th .sort {
  display: inline-block; margin-right: 4px;
  color: var(--ink-3); font-weight: 400; cursor: pointer;
}
.wstable tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--rule-2);
  vertical-align: middle;
}
.wstable tbody tr:last-child td { border-bottom: 0; }
.wstable tbody tr.alt td { background: color-mix(in srgb, var(--accent) 2%, var(--surface)); }
.wstable tbody tr:hover td { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }

.wstable .cat-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--rule));
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  letter-spacing: 0;
}
.wstable .cat-pill:hover { background: var(--accent); color: var(--accent-ink); }

.wstable .thumb-cell {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  background: repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 14%, var(--bg-2)) 0 6px,
    color-mix(in srgb, var(--accent) 7%, var(--bg-2)) 6px 12px);
  position: relative;
}
.wstable .thumb-cell .badges {
  position: absolute; top: -4px; left: -4px;
  display: flex; flex-direction: column; gap: 2px;
}
.wstable .badge-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid var(--surface);
}
.wstable .badge-dot.exclusive { background: var(--accent); }
.wstable .badge-dot.sale { background: var(--danger); }
.wstable .badge-dot.back { background: var(--positive); }

.wstable .name-cell {
  min-width: 280px;
}
.wstable .name-cell .nm {
  font-size: 13.5px; font-weight: 500; color: var(--ink);
  line-height: 1.3;
}
[data-dir="atelier"] .wstable .name-cell .nm { font-family: var(--font-display); font-size: 15px; font-weight: 500; }
.wstable .name-cell .sub {
  font-size: 11px; color: var(--ink-3); margin-top: 2px;
  font-family: var(--font-mono);
}
.wstable .name-cell .flags {
  display: inline-flex; gap: 4px; margin-right: 8px;
  vertical-align: middle;
}
.wstable .name-cell .flag {
  display: inline-flex; align-items: center;
  font-size: 9.5px; font-weight: 600;
  padding: 1px 6px;
  letter-spacing: 0;
  border-radius: 5px;
  white-space: nowrap;
}
.wstable .name-cell .flag.exclusive { background: color-mix(in srgb, var(--accent) 16%, var(--bg)); color: var(--accent); }
.wstable .name-cell .flag.sale { background: color-mix(in srgb, var(--danger) 14%, var(--bg)); color: var(--danger); }
.wstable .name-cell .flag.back { background: color-mix(in srgb, var(--positive) 14%, var(--bg)); color: var(--positive); }

.wstable .barcode-cell, .wstable .brand-cell, .wstable .num-cell {
  font-family: var(--font-mono);
  font-size: 12.5px;
  white-space: nowrap;
  color: var(--ink-2);
}
.wstable .num-cell { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.wstable .price-cell {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-align: left;
}
.wstable .price-cell .old {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 400;
  text-decoration: line-through;
}
.wstable .stock-cell {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}
.wstable .stock-cell .pip {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--positive);
}
.wstable .stock-cell.low .pip { background: var(--warn); }
.wstable .stock-cell.out .pip { background: var(--danger); }
.wstable .stock-cell.out { color: var(--danger); }
.wstable .stock-cell.low { color: var(--warn); }
.wstable .stock-cell .plus {
  font-size: 11px; color: var(--ink-3);
}

.qty-cell {
  display: inline-flex; align-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.qty-cell button {
  width: 28px; height: 32px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--ink-2);
  font-size: 13px;
}
.qty-cell button:hover:not([disabled]) { background: var(--bg-2); color: var(--ink); }
.qty-cell button[disabled] { opacity: .35; cursor: not-allowed; }
.qty-cell input {
  width: 44px; height: 32px;
  border: 0; background: transparent;
  text-align: center; outline: none;
  font: inherit; font-family: var(--font-mono);
  font-size: 13px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.qty-cell input::-webkit-outer-spin-button,
.qty-cell input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.subtotal-cell {
  font-family: var(--font-mono);
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  text-align: left;
  color: var(--ink);
}
.subtotal-cell.zero { color: var(--ink-3); font-weight: 400; }

.timer-cell {
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}
.timer-cell .clock {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  background: color-mix(in srgb, var(--danger) 12%, var(--bg));
  color: var(--danger);
  border-radius: 999px;
  font-weight: 500;
}
.timer-cell .dash { color: var(--ink-3); }

.tbl-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  font-size: 12px;
}
.tbl-foot .pager {
  display: inline-flex; gap: 4px;
}
.tbl-foot .pager button {
  height: 28px; min-width: 28px; padding: 0 8px;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-mono);
}
.tbl-foot .pager button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tbl-foot .pager button[disabled] { opacity: .4; cursor: default; }
.tbl-foot .info { color: var(--ink-3); font-family: var(--font-mono); }

/* sticky bottom action bar (cart total) for catalog */
.catalog-actionbar {
  position: sticky; bottom: 0;
  margin: 16px -28px -28px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--rule);
  display: flex; align-items: center; gap: 14px;
  z-index: 30;
}
.catalog-actionbar .total-big {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 600;
}
.catalog-actionbar .total-big small {
  display: block; font-size: 10px; color: var(--ink-3);
  letter-spacing: 0; text-transform: uppercase; font-weight: 400;
  margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────
   Promo bar (top of page — single active promo)
   ───────────────────────────────────────────────────────── */

.promo-bar {
  background: var(--ink);
  color: var(--bg);
  padding: 0;
  position: relative;
  z-index: 60;
  overflow: hidden;
}
.promo-bar .inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  line-height: 1.2;
}
.promo-bar .badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}
.promo-bar .text {
  flex: 1;
}
.promo-bar .text b { font-weight: 700; }
.promo-bar .text .progress-inline {
  display: inline-flex; align-items: center; gap: 8px;
  margin-right: 8px;
  color: color-mix(in srgb, var(--bg) 70%, transparent);
  font-size: 12px;
}
.promo-bar .text .progress-inline .bar {
  width: 80px; height: 4px; border-radius: 999px;
  background: rgba(255,255,255,.18);
  overflow: hidden;
}
.promo-bar .text .progress-inline .bar > div {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .4s ease;
}
.promo-bar .close {
  background: transparent;
  border: 0;
  color: inherit;
  opacity: .6;
  cursor: pointer;
  padding: 4px;
}
.promo-bar .close:hover { opacity: 1; }

.promo-bar.unlocked {
  background: var(--positive);
}
.promo-bar.unlocked .badge {
  background: white;
  color: var(--positive);
}

/* Notify-me button (out of stock) */
.notify-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px;
  padding: 0 12px;
  background: color-mix(in srgb, var(--warn) 12%, var(--bg));
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--rule));
  border-radius: var(--radius);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-body);
  transition: background .15s ease, color .15s ease;
}
.notify-btn:hover {
  background: var(--warn);
  color: white;
}
.notify-btn.subscribed {
  background: color-mix(in srgb, var(--positive) 14%, var(--bg));
  color: var(--positive);
  border-color: color-mix(in srgb, var(--positive) 40%, var(--rule));
}
.notify-btn.subscribed:hover {
  background: var(--positive);
  color: white;
}

/* orders tracking table */
.orders-wide {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  font-size: 12.5px;
}
.orders-wide thead th {
  background: var(--bg);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 12px 10px;
  text-align: right;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.orders-wide tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--rule-2);
  white-space: nowrap;
  vertical-align: middle;
}
.orders-wide tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); cursor: pointer; }
.orders-wide tbody tr.totals td {
  background: var(--bg);
  font-weight: 700;
  border-top: 2px solid var(--rule);
}
.orders-wide .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.orders-wide .state-pill {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0;
}
.orders-wide .state-pill.closed { background: color-mix(in srgb, var(--positive) 14%, var(--bg)); color: var(--positive); }
.orders-wide .state-pill.open { background: color-mix(in srgb, var(--warn) 14%, var(--bg)); color: var(--warn); }
.orders-wide .items-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--rule));
  border-radius: var(--radius);
  font-size: 11.5px; font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}
.orders-wide .items-btn:hover { background: var(--accent); color: var(--accent-ink); }

/* mobile-cards hidden on desktop */
.tbl-wrap .mobile-cards { display: none; }

/* ─────────────────────────────────────────────────────────
   Saved Lists grid + create modal
   ───────────────────────────────────────────────────────── */

.lists-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}
@media (max-width: 900px) {
  .lists-grid { grid-template-columns: 1fr; }
}

.list-card.open {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.list-card-new {
  appearance: none;
  border: 1px dashed var(--rule);
  background: transparent;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 180px;
  color: var(--ink-2);
  cursor: pointer;
  font: inherit;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.list-card-new:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  color: var(--accent);
}

.modal-backdrop {
  position: fixed; inset: 0;
  background: color-mix(in srgb, #000 38%, transparent);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 24px;
  animation: backdrop-in .15s ease;
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.4);
  overflow: hidden;
  animation: modal-in .2s cubic-bezier(.2,.8,.3,1.2);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--rule-2);
}
.modal-head h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0;
}
.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}
.modal-foot {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--rule-2);
  background: color-mix(in srgb, var(--bg) 50%, var(--surface));
}

.radio-list { display: flex; flex-direction: column; gap: 6px; }
.radio-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.radio-row:hover { border-color: var(--accent-2); }
.radio-row.on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.radio-row input[type="radio"] { margin-top: 3px; accent-color: var(--accent); }
.radio-row .r-ttl { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.radio-row .r-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ─────────────────────────────────────────────────────────
   Account Settings — sections, forms, toggle rows
   ───────────────────────────────────────────────────────── */

.settings-section-head {
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.settings-section-head h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0;
}
.settings-section-head p {
  margin: 4px 0 0;
  color: var(--ink-3);
  font-size: 13px;
}

.settings-subhead {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 16px 0 10px;
}

.contact-card,
.address-card {
  background: color-mix(in srgb, var(--bg) 60%, var(--surface));
  border: 1px solid var(--rule-2);
  border-radius: 5px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.contact-card-head,
.address-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule-2);
  margin-bottom: 12px;
}
.address-card-head .tag { margin-inline-end: 4px; }

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule-2);
}
.card-row:last-of-type { border-bottom: 0; }

.toggle-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-2);
  cursor: pointer;
}
.toggle-row:last-of-type { border-bottom: 0; }
.toggle-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--accent);
}
.toggle-row .hint {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

.user-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-2);
}
.user-row:last-of-type { border-bottom: 0; }
.user-row .av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────
   Mobile · catalog table → card list
   ───────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .page { padding: 16px; }
  .page-head h1 { font-size: 28px; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .topbar .logo { font-size: 18px; }
  .topbar .logo small { font-size: 8.5px; }
  .nav-actions { width: 100%; justify-content: space-between; }
  .icon-btn span { display: inline; }
  .utilitybar .inner { padding: 6px 16px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .utilitybar .links { flex-wrap: wrap; gap: 12px; }

  /* filter bar collapses to a stack */
  .filterbar { padding: 12px; }
  .filterbar .row {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .filterbar .fld input,
  .filterbar .fld select { height: 42px; font-size: 14px; }
  .toggle {
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: var(--bg);
    border: 1px solid var(--rule-2);
    border-radius: var(--radius);
  }
  .toggle .lab {
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: var(--ink-2) !important;
  }

  /* hide regular table, show card list */
  .wstable {
    display: none;
  }
  .tbl-wrap .mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--rule-2);
  }
  .tbl-wrap .mobile-cards .pcard {
    background: var(--surface);
    padding: 14px;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: stretch;
  }
  .pcard .thumb-cell { width: 64px; height: 64px; }
  .pcard .main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .pcard .cat-pill { align-self: flex-start; font-size: 10px; padding: 2px 8px; }
  .pcard .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
  .pcard .top .name { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
  .pcard .top .price { font-size: 16px; font-weight: 700; white-space: nowrap; color: var(--ink); }
  .pcard .top .price .old { display: block; font-size: 11px; color: var(--ink-3); text-decoration: line-through; font-weight: 400; }
  .pcard .meta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
  .pcard .meta b { color: var(--ink-2); font-weight: 600; }
  .pcard .bottom {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
  }
  .pcard .bottom .stock-cell { font-size: 12px; }
  .pcard .bottom .qty-cell { height: 38px; }
  .pcard .bottom .qty-cell button { width: 38px; height: 38px; font-size: 16px; }
  .pcard .bottom .qty-cell input { width: 44px; height: 38px; font-size: 14px; }
  .pcard .bottom .subtotal { font-weight: 700; min-width: 70px; text-align: left; font-variant-numeric: tabular-nums; }
  .pcard .bottom .subtotal.zero { color: var(--ink-3); font-weight: 400; }
  .pcard .flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
  .pcard .flag {
    display: inline-flex; align-items: center;
    font-size: 10px; font-weight: 600;
    padding: 1px 6px; border-radius: 5px; white-space: nowrap;
  }
  .pcard .flag.exclusive { background: color-mix(in srgb, var(--accent-2) 18%, var(--bg)); color: var(--accent-2); }
  .pcard .flag.sale { background: color-mix(in srgb, var(--accent) 14%, var(--bg)); color: var(--accent); }
  .pcard .flag.back { background: color-mix(in srgb, var(--positive) 14%, var(--bg)); color: var(--positive); }
  .pcard .timer { font-size: 11px; }

  /* table meta + foot */
  .tbl-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }
  .tbl-meta .total { justify-content: space-between; width: 100%; }
  .tbl-foot { flex-direction: column; gap: 10px; padding: 14px; }
  .tbl-foot .pager button { min-width: 36px; height: 36px; }

  /* sticky bottom action bar */
  .catalog-actionbar {
    flex-wrap: wrap;
    margin: 16px -16px -16px;
    padding: 12px 16px;
  }
  .catalog-actionbar .total-big { font-size: 18px; }
  .catalog-actionbar .total-big small { font-size: 9px; }
  .catalog-actionbar .btn { flex: 1; min-width: 0; }

  /* orders table & account layout */
  .acct-layout { grid-template-columns: 1fr; }
  .acct-side { position: static; padding: 12px; }
  .acct-side .who { padding-bottom: 10px; margin-bottom: 8px; }
  .acct-side nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }

  /* horizontal-scroll wide tables (orders) */
  .orders-wide { font-size: 12px; }
  .tbl-wrap.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* promo bar */
  .promo-bar .inner { padding: 8px 14px; font-size: 12px; flex-wrap: wrap; gap: 8px; }
  .promo-bar .text .progress-inline { display: none; }

  /* dashboard stats */
  .stats { grid-template-columns: repeat(2, 1fr); }

  /* auth screens stack */
  .auth { grid-template-columns: 1fr; }
  .auth .panel-art { display: none; }
  .auth .form { padding: 32px 20px; }
  .fieldgrid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 14px; }
  .stat .v { font-size: 22px; }
  .topbar .nav-actions .icon-btn span { display: none; }
  .topbar .nav-actions .icon-btn:last-child span { display: inline; }
}

/* placeholder image */
.imgph {
  background: repeating-linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 16%, var(--bg-2)) 0 8px,
    color-mix(in srgb, var(--accent) 8%, var(--bg-2)) 8px 16px);
  border-radius: var(--radius);
}

/* sticky bottom band */
.action-band {
  position: sticky; bottom: 0;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--rule);
  padding: 14px 28px;
  display: flex; align-items: center; gap: 12px;
  margin: 28px -28px -28px;
}


/* ─────────────────────────────────────────────────────────
   Theme additions (WP integration only — non-design tweaks).
   ───────────────────────────────────────────────────────── */

/* Form messages */
.notice {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--rule));
  color: var(--ink);
  margin-bottom: 16px;
  font-size: 13px;
}
.notice.error { background: color-mix(in srgb, var(--danger) 14%, var(--bg)); border-color: color-mix(in srgb, var(--danger) 30%, var(--rule)); }
.notice.warn  { background: color-mix(in srgb, var(--warn) 16%, var(--bg));   border-color: color-mix(in srgb, var(--warn) 28%, var(--rule)); }
.notice.ok    { background: color-mix(in srgb, var(--positive) 14%, var(--bg)); border-color: color-mix(in srgb, var(--positive) 28%, var(--rule)); }

/* Hide WP-default form clutter we replace */
.woocommerce-form-row { margin: 0; padding: 0; }
.woocommerce-notices-wrapper:empty { display: none; }

/* WC quantity input wrapper compatibility (templates that use woocommerce_quantity_input) */
.qty .quantity { display: inline-flex; align-items: center; }
.qty .quantity input.qty {
  width: 44px; height: 36px; border: 0; background: transparent;
  text-align: center; font-variant-numeric: tabular-nums;
}

/* Cart pill in the topbar — accentuated when cart has items */
.cart-pill.has-items {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Saved-list count chip — extend the prototype's .cnt with a pill background */
.acct-side nav a .cnt { background: var(--bg-2); padding: 1px 6px; border-radius: 999px; }
.acct-side nav a.on .cnt { background: var(--accent); color: var(--accent-ink); }

/* Pager pagination wrapping for paginate_links() output */
.pager .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 8px;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); font-size: 12px; text-decoration: none;
  color: var(--ink-2); margin: 0 2px;
}
.pager .page-numbers.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* "Hidden" toggle input wrapper — purely a layout helper */
.tswitch-wrap { display: inline-flex; align-items: center; }

/* Promo bar inline progress bar (used inside .promo-bar .text) */
.progress-inline { display: inline-flex; align-items: center; vertical-align: middle; margin-inline-start: 8px; }
.progress-inline .bar {
  display: inline-block; width: 120px; height: 4px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 999px; overflow: hidden;
}
.progress-inline .bar i {
  display: block; height: 100%;
  background: var(--accent);
}

/* Save-cart-as-list mini-form on the "new list" card */
.list-card-new input[type="text"] { font: inherit; color: inherit; }
.list-card-new { cursor: default; border-style: dashed; }
