/* ACE Trading market — shared stylesheet (storefront, marketplace, consoles).
   Tokens match the public site (paper/ink neutrals, corten accent). */

:root {
  --paper: #faf9f6; --paper-2: #f2f0ea; --surface: #ffffff;
  --ink: #0b0e11; --ink-600: #2c343c; --ink-500: #47525c; --muted: #6b7178; --muted-2: #8b9198;
  --line: #e4e1d9; --line-strong: #d3cfc4;
  --accent: #b4522d; --accent-600: #9b4425; --accent-700: #7c361d; --accent-50: #fbf3ef; --accent-100: #f4e2d8;
  --ok: #1f7a4d; --ok-soft: #e6f4ec; --warn: #9a6600; --warn-soft: #fdf3dc; --danger: #b3261e; --danger-soft: #fbeae9; --info: #1c5d99; --info-soft: #e8f1f9;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Noto Sans Arabic", var(--font-sans);
  --r-sm: 4px; --r-md: 6px; --r-lg: 10px; --r-xl: 16px;
  --sh-1: 0 1px 2px rgb(11 14 17 / .05); --sh-2: 0 1px 3px rgb(11 14 17 / .06), 0 8px 24px -12px rgb(11 14 17 / .12); --sh-3: 0 2px 6px rgb(11 14 17 / .08), 0 20px 40px -20px rgb(11 14 17 / .24);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --hdr-h: 64px; --container: 1240px; --gutter: clamp(16px, 4vw, 40px);
}
html[dir="rtl"] { --font-sans: var(--font-ar); }

*, *::before, *::after { box-sizing: border-box; }
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 { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--font-sans); -webkit-font-smoothing: antialiased; min-height: 100dvh; display: flex; flex-direction: column; }
body.has-modal, body.menu-open { overflow: hidden; }
main { flex: 1; }
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-600); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; font-weight: 600; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; } .num, .tabular { font-variant-numeric: tabular-nums; }
.ta-right { text-align: end; } .ta-center { text-align: center; }
.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* Focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }

/* ---------- Header ---------- */
.hdr { position: sticky; top: 0; z-index: 40; background: rgb(250 249 246 / .92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.hdr__inner { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; height: var(--hdr-h); display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark { width: 30px; height: 20px; border: 2px solid var(--accent); border-radius: 3px; position: relative; background: repeating-linear-gradient(90deg, transparent 0 5px, var(--accent) 5px 7px); background-clip: content-box; padding: 3px; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text strong { font-size: 15px; letter-spacing: .02em; }
.brand__text small { font-size: 9.5px; letter-spacing: .18em; color: var(--muted); margin-top: 3px; }
.hdr__nav { display: flex; gap: 22px; align-items: center; font-size: 14px; color: var(--ink-500); }
.hdr__nav a.is-active { color: var(--ink); font-weight: 600; }
.hdr__site { margin-inline-start: 6px; }
.hdr__tools { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; background: var(--surface); }
.seg__btn { border: 0; background: transparent; padding: 4px 10px; font-size: 12px; font-weight: 600; border-radius: 999px; cursor: pointer; color: var(--muted); }
.seg__btn.is-on { background: var(--ink); color: #fff; }
.hdr__lang { border: 0; background: transparent; cursor: pointer; font-size: 14px; color: var(--ink-500); }
.hdr__cart { position: relative; display: inline-flex; padding: 6px; color: var(--ink); }
.hdr__cart-count { position: absolute; top: -2px; inset-inline-end: -2px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }
.hdr__signout { font-size: 13px; color: var(--muted); }
.hdr__burger { display: none; width: 40px; height: 40px; border: 0; background: transparent; flex-direction: column; justify-content: center; gap: 5px; cursor: pointer; padding: 8px; }
.hdr__burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease), opacity .25s; }
.hdr__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hdr__burger.is-open span:nth-child(2) { opacity: 0; }
.hdr__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { position: fixed; inset: var(--hdr-h) 0 0 0; background: var(--paper); z-index: 39; transform: translateY(-8px); opacity: 0; transition: opacity .3s var(--ease), transform .35s var(--ease); overflow: auto; }
.mobile-menu.is-open { opacity: 1; transform: none; }
.mobile-menu nav { display: flex; flex-direction: column; padding: 12px var(--gutter) 32px; }
.mobile-menu a, .mobile-menu button { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; text-align: start; background: none; border-inline: 0; border-top: 0; }
.demo-bar { background: var(--ink); color: #e6e9ec; font-size: 12.5px; display: flex; justify-content: center; gap: 14px; padding: 6px var(--gutter); }
.demo-bar .link-btn { color: #f4c7b3; }
@media (max-width: 900px) {
  .hdr__nav, .hdr__apply, .hdr__signout, .seg { display: none; }
  .hdr__burger { display: flex; }
}

/* ---------- Footer ---------- */
.ftr { border-top: 1px solid var(--line); margin-top: 60px; padding: 28px 0; font-size: 13px; color: var(--muted); }
.ftr__inner { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ftr nav { display: flex; gap: 18px; flex-wrap: wrap; }
.ftr strong { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--r-md); padding: 10px 16px; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--ink); color: #fff; } .btn--primary:hover { background: var(--ink-600); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; } .btn--accent:hover { background: var(--accent-600); color: #fff; }
.btn--secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); } .btn--secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink-500); } .btn--ghost:hover, .btn--ghost.is-active { background: var(--paper-2); color: var(--ink); }
.btn--danger { background: var(--danger); color: #fff; } .btn--danger:hover { background: #8f1e17; color: #fff; }
.btn--sm { padding: 6px 12px; font-size: 13px; } .btn--lg { padding: 14px 22px; font-size: 15px; } .btn--block { width: 100%; }
.link-btn { border: 0; background: none; padding: 0; cursor: pointer; color: var(--accent-600); text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { border: 1px solid transparent; background: transparent; border-radius: var(--r-md); width: 34px; height: 34px; display: inline-grid; place-items: center; cursor: pointer; font-size: 18px; color: var(--muted); }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }

/* ---------- Cards, badges, alerts ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.card--pad-0 { padding: 0; } .card--flat { box-shadow: none; }
.card__title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.badge--ok { background: var(--ok-soft); color: var(--ok); } .badge--warn { background: var(--warn-soft); color: var(--warn); } .badge--danger { background: var(--danger-soft); color: var(--danger); } .badge--info { background: var(--info-soft); color: var(--info); } .badge--muted { background: var(--paper-2); color: var(--muted); } .badge--accent { background: var(--accent-100); color: var(--accent-700); }
.alert { padding: 12px 14px; border-radius: var(--r-md); border: 1px solid; font-size: 14px; }
.alert--danger { background: var(--danger-soft); border-color: #f1c9c5; color: var(--danger); } .alert--ok { background: var(--ok-soft); border-color: #bfe3cd; color: var(--ok); } .alert--warn { background: var(--warn-soft); border-color: #f0dfae; color: var(--warn); } .alert--info { background: var(--info-soft); border-color: #c5dbee; color: var(--info); }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--paper-2); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; }
.kbd { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--paper-2); padding: 1px 6px; border-radius: 4px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2, .form-grid .field--full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.label { font-size: 13px; font-weight: 600; color: var(--ink-600); }
.label .req { color: var(--danger); }
.input { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 10px 12px; font: inherit; background: var(--surface); color: var(--ink); transition: border-color .2s, box-shadow .2s; min-height: 42px; }
.input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(11 14 17 / .08); }
.input:disabled, .input[readonly] { background: var(--paper-2); color: var(--muted); }
.input[aria-invalid="true"] { border-color: var(--danger); }
select.input { appearance: none; 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 1l5 5 5-5' stroke='%2347525c' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-inline-end: 34px; }
html[dir="rtl"] select.input { background-position: left 12px center; }
textarea.input { resize: vertical; min-height: 84px; }
.hint { color: var(--muted); font-size: 12.5px; }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input, .radio input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.radio-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-error { background: var(--danger-soft); color: var(--danger); border-radius: var(--r-md); padding: 10px 12px; font-size: 13.5px; grid-column: 1 / -1; }
.qty { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.qty button { width: 36px; border: 0; background: transparent; cursor: pointer; font-size: 18px; }
.qty input { width: 48px; border: 0; text-align: center; font: inherit; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { appearance: none; }
.search { position: relative; }
.search .input { padding-inline-start: 38px; }
.search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.switch { position: relative; width: 40px; height: 22px; background: var(--line-strong); border-radius: 999px; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
input:checked + .switch { background: var(--ok); } input:checked + .switch::after { transform: translateX(18px); } html[dir="rtl"] input:checked + .switch::after { transform: translateX(-18px); }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); padding: 22px; text-align: center; color: var(--muted); background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone.is-over, .dropzone:hover { border-color: var(--accent); background: var(--accent-50); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: start; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--paper); }
.table--dense th, .table--dense td { padding: 8px 10px; }
.table .cell-link { display: block; color: inherit; }
.table tr.is-link { cursor: pointer; }
.table td .badge { vertical-align: middle; }
.cell-primary { font-weight: 600; } .cell-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { flex: 1 1 220px; }
.toolbar .input { min-height: 38px; padding-block: 7px; }
.pagination { display: flex; gap: 4px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.pagination__meta { margin-inline-start: auto; font-size: 12.5px; }

/* ---------- States ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty__icon { font-size: 28px; margin-bottom: 8px; color: var(--line-strong); }
.loading { display: flex; gap: 10px; align-items: center; color: var(--muted); padding: 24px 0; font-size: 14px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { height: 16px; border-radius: 6px; background: linear-gradient(90deg, var(--paper-2) 25%, #e9e6df 37%, var(--paper-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; margin-bottom: 10px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- Toasts / modal ---------- */
.toasts { position: fixed; bottom: 20px; inset-inline-end: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 14px; border-radius: var(--r-md); font-size: 13.5px; box-shadow: var(--sh-3); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .3s var(--ease); }
.toast.is-in { opacity: 1; transform: none; }
.toast--ok { background: var(--ok); } .toast--danger { background: var(--danger); } .toast--warn { background: var(--warn); }
.modal-overlay { position: fixed; inset: 0; background: rgb(11 14 17 / .45); z-index: 90; display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .18s; }
.modal-overlay.is-in { opacity: 1; }
.modal { background: var(--surface); border-radius: var(--r-xl); width: 100%; max-width: 520px; max-height: min(90dvh, 820px); display: flex; flex-direction: column; box-shadow: var(--sh-3); transform: translateY(10px) scale(.98); transition: transform .22s var(--ease); }
.modal-overlay.is-in .modal { transform: none; }
.modal--lg { max-width: 760px; } .modal--xl { max-width: 980px; } .modal--sm { max-width: 400px; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; }
.modal__title { font-size: 17px; }
.modal__body { padding: 16px 20px; overflow: auto; }
.modal__foot { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); }

/* ---------- Page chrome ---------- */
.page { padding: 34px 0 60px; }
.page-head { margin-bottom: 22px; }
.page-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 600; letter-spacing: -.02em; }
.page-lede { color: var(--muted); margin-top: 6px; max-width: 64ch; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs__sep { color: var(--line-strong); }
.section-title { font-size: 20px; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 14px; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.is-active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tab__count { background: var(--paper-2); border-radius: 999px; padding: 0 7px; font-size: 11px; }
.stat { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; min-width: 0; }
a.stat:hover { border-color: var(--ink); color: inherit; }
.stat__label { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat__value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat__sub { font-size: 12.5px; color: var(--muted); }
.stat--warn { background: var(--warn-soft); border-color: #f0dfae; } .stat--danger { background: var(--danger-soft); border-color: #f1c9c5; } .stat--info { background: var(--info-soft); border-color: #c5dbee; } .stat--ok { background: var(--ok-soft); border-color: #bfe3cd; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 18px; font-size: 13.5px; }
html[dir="rtl"] .timeline li { padding: 0 18px 16px 0; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); }
.timeline time { display: block; color: var(--muted); font-size: 12px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.notice { background: var(--paper-2); border-radius: var(--r-md); padding: 12px 14px; font-size: 13.5px; color: var(--ink-600); }
.price { font-weight: 600; font-variant-numeric: tabular-nums; } .price--lg { font-size: 26px; letter-spacing: -.02em; } .price__usd { color: var(--muted); font-weight: 400; font-size: .8em; margin-inline-start: 6px; }

/* ---------- Console layout (admin / seller / account) ---------- */
.console { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: calc(100dvh - var(--hdr-h)); }
.console__side { border-inline-end: 1px solid var(--line); padding: 24px 14px; background: var(--paper); position: sticky; top: var(--hdr-h); height: calc(100dvh - var(--hdr-h)); overflow: auto; }
.console__main { padding: 28px var(--gutter) 60px; min-width: 0; }
.side-group { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 14px 10px 6px; }
.side-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: var(--r-md); font-size: 14px; color: var(--ink-600); }
.side-link:hover { background: var(--paper-2); color: var(--ink); }
.side-link.is-active { background: var(--ink); color: #fff; }
.side-link__count { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 6px; }
.side-link.is-active .side-link__count { background: #fff; color: var(--ink); }
.console__toggle { display: none; }
@media (max-width: 900px) {
  .console { grid-template-columns: 1fr; }
  .console__side { position: fixed; inset: var(--hdr-h) auto 0 0; width: min(300px, 86vw); z-index: 38; transform: translateX(-100%); transition: transform .35s var(--ease); box-shadow: var(--sh-3); }
  html[dir="rtl"] .console__side { left: auto; right: 0; transform: translateX(100%); }
  .console__side.is-open { transform: none; }
  .console__toggle { display: inline-flex; margin-bottom: 14px; }
  .console__main { padding-inline: 16px; }
}
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }
.sticky-side { position: sticky; top: calc(var(--hdr-h) + 16px); }

/* ---------- Storefront pieces ---------- */
.hero { background: var(--ink); color: #fff; padding: clamp(36px, 7vw, 80px) 0; position: relative; overflow: hidden; }
.hero h1 { font-size: clamp(30px, 5vw, 56px); max-width: 16ch; }
.hero p { color: #c5cbd1; max-width: 56ch; margin-top: 14px; font-size: 16px; }
.hero .btn--primary { background: #fff; color: var(--ink); } .hero .btn--primary:hover { background: var(--paper-2); }
.hero__facts { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 26px; font-size: 13px; color: #c5cbd1; }
.hero__facts strong { color: #fff; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.product-card__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card__title { font-size: 15px; font-weight: 600; }
.product-card__meta { display: flex; gap: 6px; flex-wrap: wrap; }
.product-card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.gallery { display: grid; grid-template-columns: 1fr; gap: 10px; }
.gallery__main { aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; background: var(--paper-2); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; }
.gallery__thumbs button { border: 2px solid transparent; border-radius: var(--r-md); padding: 0; overflow: hidden; width: 76px; height: 58px; flex: none; cursor: pointer; background: var(--paper-2); }
.gallery__thumbs button.is-active { border-color: var(--ink); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.spec-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.spec-list div { background: var(--paper-2); border-radius: var(--r-md); padding: 10px 12px; font-size: 13px; }
.spec-list dt { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; } .spec-list dd { margin: 2px 0 0; font-weight: 600; }
.buy-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.summary-line--total { font-size: 17px; font-weight: 600; border-top: 1px solid var(--line); padding-top: 12px; }
.steps { display: flex; gap: 6px; counter-reset: s; margin-bottom: 22px; flex-wrap: wrap; }
.steps li { list-style: none; flex: 1 1 120px; padding: 8px 10px; border-top: 3px solid var(--line); font-size: 12.5px; color: var(--muted); }
.steps li.is-done { border-color: var(--ok); } .steps li.is-active { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.seller-card { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.avatar { width: 48px; height: 48px; border-radius: 12px; background: var(--paper-2); display: grid; place-items: center; font-weight: 700; color: var(--ink-500); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.verified { color: var(--ok); font-size: 12px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }

/* Reveal animations (opt-in, resting state visible for no-JS) */
.reveal { opacity: 1; transform: none; }
.js .reveal:not(.is-in) { opacity: 0; transform: translateY(14px); }
.js .reveal { transition: opacity .7s var(--ease), transform .8s var(--ease); }
body.is-ready .reveal { opacity: 1; transform: none; }

/* Print */
@media print {
  .hdr, .ftr, .demo-bar, .console__side, .no-print, .toasts { display: none !important; }
  body { background: #fff; }
  .console { display: block; } .console__main { padding: 0; }
}

/* Appended (storefront): the mobile header hides .hdr__apply/.hdr__signout, but .btn/.link-btn are
   declared later with equal specificity and win — raise specificity so the burger menu takes over. */
@media (max-width: 900px) { .hdr .hdr__apply, .hdr .hdr__signout, .hdr .seg { display: none; } }

/* Integration: grid children must be allowed to shrink below their content width on phones. */
.grid > *, .two-col > *, .detail-grid > *, .stats > * { min-width: 0; }
