/* Juicy Joes — Neon Kong components
   Buttons, fields, cards, badges, notices, drawers, modals, lists, tables, skeletons, empty states.
   Every colour comes from tokens.css. Class names are the contract for the WordPress theme. */

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--control-h); padding: 0 22px; border-radius: var(--r);
  font-weight: 600; font-size: var(--fs-sm); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid transparent; position: relative;
  transition: background var(--t), color var(--t), box-shadow var(--t), border-color var(--t), transform var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn-neon { background: var(--neon); color: var(--night); font-weight: 800; box-shadow: var(--glow-btn); }
.btn-neon:hover { background: var(--neon-hot); box-shadow: var(--glow-btn-hover); }
.btn-line { border-color: var(--brass-2); color: var(--cream); }
.btn-line:hover { border-color: var(--brass); color: var(--brass); box-shadow: 0 0 18px rgba(201,154,99,.2); }
.btn-ghost { color: var(--cream-2); }
.btn-ghost:hover { background: var(--glass); color: var(--cream); }
.btn-brass { background: var(--brass); color: var(--night); }
.btn-brass:hover { background: #d8ab74; }
.btn-danger { border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { min-height: var(--control-h-sm); padding: 0 14px; font-size: var(--fs-xs); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: var(--fs-md); }
.btn-block { width: 100%; }
.btn .n { font-family: var(--display); font-weight: 900; font-size: 1.25em; letter-spacing: .02em; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn[aria-busy="true"] { color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite;
}
.btn-line[aria-busy="true"]::after { border-color: rgba(201,154,99,.3); border-top-color: var(--brass); }
@keyframes spin { to { transform: rotate(360deg); } }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; min-width: var(--tap); padding: 0 12px;
  border-radius: var(--r); border: 1px solid transparent; font-weight: 500; font-size: var(--fs-sm); color: var(--cream-2);
  transition: border-color var(--t), background var(--t), color var(--t);
}
.icon-btn:hover { border-color: var(--line-2); background: var(--glass); color: var(--cream); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.square { padding: 0; width: 42px; justify-content: center; }
.link-arrow { font-weight: 600; font-size: var(--fs-xs); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--brass); display: inline-flex; gap: 8px; align-items: center; }
.link-arrow svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform var(--t); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ============ Pills, badges, stock ============ */
.pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--neon); color: var(--night); font-size: var(--fs-xs); font-weight: 800; box-shadow: 0 0 10px var(--neon); }
.badge { display: inline-block; font-family: var(--sign); font-size: .9rem; line-height: 1.2; color: var(--core); text-shadow: 0 0 8px var(--neon); border: 1px solid var(--neon); border-radius: var(--r-sm); padding: 3px 8px; box-shadow: 0 0 10px rgba(255,45,63,.4), inset 0 0 8px rgba(255,45,63,.2); white-space: nowrap; }
.badge.solid { background: var(--neon); color: var(--night); text-shadow: none; box-shadow: none; }
.badge.brass { color: var(--brass); border-color: var(--brass-2); text-shadow: none; box-shadow: none; font-family: var(--body); font-weight: 700; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; }
.badge.mute { color: var(--muted); border-color: var(--line-2); text-shadow: none; box-shadow: none; font-family: var(--body); font-weight: 600; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; }
.stock { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 600; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.stock.in { color: var(--ok); }
.stock.low { color: var(--warn); }
.stock.out { color: var(--bad); }
.stock.unknown { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; padding: 6px 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--muted); }
.tag b { color: var(--cream); font-weight: 600; }
.placeholder { border: 1px dashed var(--brass-2); color: var(--brass); background: var(--info-bg); border-radius: var(--r); padding: 2px 8px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; display: inline-block; }

/* ============ Price ============ */
.price { font-family: var(--display); font-weight: 900; font-size: 1.6rem; letter-spacing: .01em; color: var(--cream); line-height: 1; }
.price s { color: var(--muted); font-size: .85rem; font-family: var(--body); font-weight: 400; margin-left: 6px; }
.price small { font: 500 var(--fs-xs) var(--body); color: var(--muted); letter-spacing: .06em; margin-right: 4px; text-transform: uppercase; }
.price.lg { font-size: 2.4rem; }
.price.sm { font-size: 1.2rem; }
.vat { font-size: var(--fs-xs); color: var(--muted); }

/* ============ Fields ============ */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-weight: 600; font-size: var(--fs-sm); color: var(--cream-2); display: flex; justify-content: space-between; gap: 10px; }
.field-label .opt { color: var(--muted); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; min-height: var(--control-h); padding: 0 14px; background: var(--glass); color: var(--cream);
  border: 1px solid var(--line-2); border-radius: var(--r); outline: none; transition: border-color var(--t), box-shadow var(--t);
}
.textarea { padding: 12px 14px; min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--brass) 50%), linear-gradient(135deg, var(--brass) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brass); box-shadow: var(--glow-brass); }
.input:disabled, .select:disabled { opacity: .5; cursor: not-allowed; }
.hint { font-size: var(--fs-xs); color: var(--muted); }
.error-text { font-size: var(--fs-xs); color: var(--bad); display: none; align-items: center; gap: 6px; }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.field.is-invalid .error-text { display: inline-flex; }
.field.is-valid .input { border-color: var(--ok); }
.form-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-sm); color: var(--cream-2); cursor: pointer; min-height: var(--tap); padding: 6px 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--neon); flex: none; }
.check .count { margin-left: auto; color: var(--muted); font-size: var(--fs-xs); }
.check:hover { color: var(--cream); }
.toggle { position: relative; width: 48px; height: 26px; border-radius: var(--r-pill); background: var(--glass-3); border: 1px solid var(--line-2); flex: none; transition: background var(--t); }
.toggle::before { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: left var(--t), background var(--t), box-shadow var(--t); }
.toggle[aria-checked="true"] { background: rgba(255,45,63,.2); border-color: var(--neon); }
.toggle[aria-checked="true"]::before { left: 25px; background: var(--neon); box-shadow: 0 0 10px var(--neon); }

/* choice cards: variations, delivery methods, payment, add-ons */
.choices { display: grid; gap: var(--s2); }
.choices.inline { display: flex; flex-wrap: wrap; }
.choice {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: var(--tap);
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--glass); cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t), background var(--t); position: relative;
}
.choice:hover { border-color: var(--brass-2); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; transition: border-color var(--t), box-shadow var(--t); }
.choice .dot.square { border-radius: var(--r-sm); }
.choice .body { flex: 1; min-width: 0; }
.choice .title { font-weight: 600; color: var(--cream); font-size: var(--fs-sm); }
.choice .meta { font-size: var(--fs-xs); color: var(--muted); }
.choice .cost { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--brass); white-space: nowrap; }
.choice.is-selected, .choice:has(input:checked) { border-color: var(--neon); background: rgba(255,45,63,.06); box-shadow: 0 0 0 1px var(--neon), 0 0 16px rgba(255,45,63,.25); }
.choice.is-selected .dot, .choice:has(input:checked) .dot { border-color: var(--neon); background: var(--neon); box-shadow: 0 0 10px var(--neon), inset 0 0 0 3px var(--glass); }
.choice.is-disabled, .choice:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.choice.is-disabled .title::after, .choice:has(input:disabled) .title::after { content: " · unavailable"; color: var(--muted); font-weight: 400; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { min-width: var(--tap); min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--glass); font-size: var(--fs-sm); font-weight: 600; color: var(--cream-2); transition: border-color var(--t), box-shadow var(--t), color var(--t); }
.swatch:hover { border-color: var(--brass-2); color: var(--cream); }
.swatch[aria-pressed="true"] { border-color: var(--neon); color: var(--core); box-shadow: 0 0 0 1px var(--neon), 0 0 12px rgba(255,45,63,.3); }
.swatch[disabled] { opacity: .4; text-decoration: line-through; cursor: not-allowed; }

/* quantity stepper */
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--glass); height: var(--control-h); }
.qty.sm { height: var(--control-h-sm); }
.qty-btn { width: var(--tap); display: grid; place-items: center; color: var(--cream-2); font-size: 1.2rem; font-weight: 600; transition: background var(--t), color var(--t); }
.qty.sm .qty-btn { width: 36px; }
.qty-btn:hover { background: var(--glass-2); color: var(--cream); }
.qty-btn[disabled] { opacity: .35; cursor: not-allowed; }
.qty-input { width: 52px; text-align: center; background: none; border: 0; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); color: var(--cream); font-weight: 600; outline: none; 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; }
.qty.sm .qty-input { width: 44px; font-size: var(--fs-sm); }
.qty:focus-within { border-color: var(--brass); box-shadow: var(--glow-brass); }

/* ============ Notices and toasts ============ */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--glass); font-size: var(--fs-sm); color: var(--cream-2); }
.notice svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.notice b { color: var(--cream); font-weight: 600; }
.notice .body { flex: 1; min-width: 0; }
.notice .actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.notice-ok { border-color: rgba(93,201,138,.5); background: var(--ok-bg); color: var(--cream); }
.notice-ok svg { color: var(--ok); }
.notice-warn { border-color: rgba(233,176,74,.5); background: var(--warn-bg); color: var(--cream); }
.notice-warn svg { color: var(--warn); }
.notice-bad { border-color: rgba(255,90,90,.55); background: var(--bad-bg); color: var(--cream); }
.notice-bad svg { color: var(--bad); }
.notice-info { border-color: rgba(201,154,99,.5); background: var(--info-bg); color: var(--cream); }
.notice-info svg { color: var(--brass); }
.notice-neon { border-color: var(--neon); box-shadow: 0 0 14px rgba(255,45,63,.25); color: var(--cream); }
.notice-neon svg { color: var(--neon); }
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--glass-2); border: 1px solid var(--line-2); color: var(--cream); font-size: var(--fs-sm); box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); animation: toast-in var(--t-slow) var(--ease-out); }
.toast.ok { border-color: rgba(93,201,138,.6); }
.toast.bad { border-color: rgba(255,90,90,.6); }
.toast .btn { margin-left: auto; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ============ Product card ============ */
.pcard { display: flex; flex-direction: column; gap: 8px; position: relative; min-width: 0; }
.pcard .tile { aspect-ratio: 4 / 5; border-radius: var(--r-md); background: radial-gradient(circle at 50% 80%, rgba(255,45,63,.22), transparent 55%), #0B0708; display: grid; place-items: end center; overflow: hidden; position: relative; border: 1px solid var(--line); }
.pcard .tile img { width: 88%; height: 92%; object-fit: contain; object-position: bottom; mix-blend-mode: screen; transition: transform var(--t-slow) var(--ease); }
.pcard .tile.light { background: linear-gradient(#fff9ee, #f1e4cb); place-items: center; }
.pcard .tile.light img { width: 80%; height: 80%; object-position: center; mix-blend-mode: multiply; }
.pcard .tile.light::before { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 5px; border-radius: 0 0 6px 6px; background: #fff8e8; box-shadow: 0 0 16px 6px rgba(255,240,210,.65); }
.pcard:hover .tile img { transform: translateY(-6px) scale(1.04); }
.pcard .badge, .pcard .badges { position: absolute; top: 10px; left: 10px; z-index: 2; }
.pcard .badges { display: flex; gap: 6px; flex-wrap: wrap; }
.pcard .badges .badge { position: static; }
.pcard .cat { font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
.pcard .name { font-weight: 500; font-size: var(--fs-sm); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pcard .name a:hover { color: var(--brass); }
.pcard .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard .add { min-height: var(--control-h-sm); padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--brass-2); color: var(--cream); font-weight: 600; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; transition: background var(--t), color var(--t), border-color var(--t), box-shadow var(--t); }
.pcard .add:hover, .pcard .add.is-added { background: var(--neon); border-color: var(--neon); color: var(--night); box-shadow: 0 0 16px rgba(255,45,63,.5); }
.pcard.is-soldout .tile img { filter: grayscale(.6) brightness(.55); }
.pcard.is-soldout .add { border-color: var(--line-2); color: var(--muted); }
.pcard.is-soldout .add:hover { background: var(--glass-2); box-shadow: none; color: var(--cream); border-color: var(--line-2); }
.pcard .tile a { position: absolute; inset: 0; z-index: 1; }
.pgrid { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rail > * { scroll-snap-align: start; }

/* ============ Category / board tiles ============ */
.board { display: flex; flex-direction: column; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 18px 16px; min-height: 150px; position: relative; overflow: hidden; transition: border-color var(--t), transform var(--t), box-shadow var(--t); }
.board::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--unlit); border-radius: var(--r); pointer-events: none; transition: border-color var(--t), box-shadow var(--t); }
.board:hover { transform: translateY(-3px); border-color: var(--line-2); }
.board:hover::before { border-color: var(--neon); box-shadow: 0 0 10px var(--neon), inset 0 0 10px rgba(255,45,63,.25); }
.board .c { font-family: var(--sign); font-size: 2.2rem; line-height: 1; color: var(--core); text-shadow: var(--glow-s); }
.board .t { font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .02em; margin-top: 6px; }
.board .s { font-size: var(--fs-xs); color: var(--muted); margin-top: auto; padding-top: 12px; }
.plaque { border: 1px solid var(--brass-2); border-radius: var(--r-md); padding: 20px; background: linear-gradient(160deg, rgba(201,154,99,.08), transparent 60%), var(--glass); display: flex; flex-direction: column; gap: 8px; position: relative; }
.plaque::before, .plaque::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); top: 10px; left: 10px; box-shadow: inset 0 1px 1px rgba(255,255,255,.6); }
.plaque::after { left: auto; right: 10px; }
.plaque b { font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .02em; }
.plaque p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }

/* ============ Panels, summaries, steps ============ */
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--s4); }
.panel-head h3 { font-size: 1.2rem; }
.summary { background: var(--glass); border: 1px solid var(--brass-2); border-radius: var(--r-lg); padding: var(--s5); position: sticky; top: calc(var(--header-h, 120px) + 16px); }
.summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); color: var(--cream-2); padding: 8px 0; border-bottom: 1px dotted var(--line-2); }
.summary-line.total { border: 0; padding-top: 14px; color: var(--cream); font-weight: 600; font-size: var(--fs-md); }
.summary-line.total .price { font-size: 1.7rem; }
.summary-line .muted { color: var(--muted); }
.steps { list-style: none; display: flex; gap: 6px; counter-reset: step; }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; border-bottom: 2px solid var(--line-2); }
.steps li::before { counter-increment: step; content: counter(step); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font-family: var(--display); font-weight: 700; font-size: .85rem; }
.steps li.is-done { color: var(--brass); border-color: var(--brass-2); }
.steps li.is-done::before { background: var(--brass); color: var(--night); border-color: var(--brass); }
.steps li.is-current { color: var(--core); border-color: var(--neon); }
.steps li.is-current::before { border-color: var(--neon); color: var(--core); box-shadow: 0 0 10px var(--neon); }
@media (max-width: 560px) { .steps li span { display: none; } .steps li.is-current span { display: inline; } }

/* ============ Navigation bits ============ */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-xs); color: var(--muted); list-style: none; letter-spacing: .04em; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a:hover { color: var(--brass); }
.crumbs [aria-current] { color: var(--cream-2); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { padding: 12px 16px; font-weight: 600; font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; position: relative; min-height: var(--tap); }
.tab::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--neon); box-shadow: 0 0 8px var(--neon); transform: scaleX(0); transition: transform var(--t); }
.tab[aria-selected="true"] { color: var(--cream); }
.tab[aria-selected="true"]::after { transform: scaleX(1); }
.tabpanel { padding: var(--s5) 0; }
.tabpanel[hidden] { display: none; }
details.acc { border-top: 1px solid var(--line); }
details.acc:last-of-type { border-bottom: 1px solid var(--line); }
details.acc summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; font-weight: 600; color: var(--cream); min-height: var(--tap); }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; font-family: var(--display); font-size: 1.4rem; color: var(--brass); transition: transform var(--t); }
details.acc[open] summary::after { transform: rotate(45deg); }
details.acc .acc-body { padding: 0 0 16px; color: var(--cream-2); font-size: var(--fs-sm); }
.pagination { display: flex; align-items: center; gap: 6px; list-style: none; flex-wrap: wrap; justify-content: center; }
.page-link { min-width: var(--tap); height: var(--tap); display: inline-grid; place-items: center; padding: 0 12px; border-radius: var(--r); border: 1px solid transparent; font-weight: 600; font-size: var(--fs-sm); color: var(--cream-2); font-variant-numeric: tabular-nums; }
.page-link:hover { border-color: var(--line-2); background: var(--glass); color: var(--cream); }
.page-link.is-current { border-color: var(--neon); color: var(--core); box-shadow: 0 0 10px rgba(255,45,63,.4); }
.page-link[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.page-link svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* chips (active filters) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--glass); font-size: var(--fs-xs); font-weight: 600; color: var(--cream-2); transition: border-color var(--t), color var(--t), background var(--t); }
.chip:hover { border-color: var(--brass-2); color: var(--cream); }
.chip.is-active { border-color: var(--neon); color: var(--core); background: rgba(255,45,63,.08); }
.chip .x { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.chip .x:hover { background: var(--glass-3); color: var(--cream); }
.chip .x svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.4; fill: none; }

/* ============ Lists and tables ============ */
.rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.row-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row-item .th { width: 56px; height: 56px; border-radius: var(--r-md); background: var(--paper); display: grid; place-items: center; overflow: hidden; }
.row-item .th img { width: 84%; height: 84%; object-fit: contain; mix-blend-mode: multiply; }
.row-item .th.dark { background: #0B0708; border: 1px solid var(--line); }
.row-item .th.dark img { mix-blend-mode: screen; }
.row-item .nm { font-weight: 500; font-size: var(--fs-sm); line-height: 1.3; }
.row-item .nm small { display: block; color: var(--muted); font-weight: 400; font-size: var(--fs-xs); }
.row-item .end { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font: 600 var(--fs-xs)/1 var(--body); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--brass); background: var(--glass); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr:hover td { background: rgba(255,255,255,.02); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
@media (max-width: 760px) {
  .table.stack thead { display: none; }
  .table.stack tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table.stack td { display: block; padding: 0; border: 0; }
  .table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: var(--fs-xs); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
  .table.stack td.num { text-align: left; }
  .table.stack td.full { grid-column: 1 / -1; }
}
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: var(--fs-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--cream); }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: 1px solid; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.ok { color: var(--ok); border-color: rgba(93,201,138,.5); background: var(--ok-bg); }
.status.warn { color: var(--warn); border-color: rgba(233,176,74,.5); background: var(--warn-bg); }
.status.bad { color: var(--bad); border-color: rgba(255,90,90,.5); background: var(--bad-bg); }
.status.mute { color: var(--muted); border-color: var(--line-2); }
.status.neon { color: var(--core); border-color: var(--neon); box-shadow: 0 0 8px rgba(255,45,63,.4); }

/* ============ Skeleton and empty ============ */
.skeleton { position: relative; overflow: hidden; background: var(--glass-2); border-radius: var(--r); color: transparent !important; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); transform: translateX(-100%); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton.tile { aspect-ratio: 4 / 5; }
.skeleton.line { height: 14px; }
.skeleton.line.w60 { width: 60%; }
.skeleton.line.w40 { width: 40%; }
.empty { text-align: center; padding: clamp(32px, 6vw, 64px) var(--s4); border: 1px dashed var(--line-2); border-radius: var(--r-lg); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .sign { margin-bottom: 4px; }
.empty p { color: var(--muted); max-width: 44ch; margin: 0; }
.empty .row { justify-content: center; margin-top: 8px; }
.empty svg { width: 44px; height: 44px; stroke: var(--brass); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ============ Drawers, scrim, modals, sheets ============ */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: calc(var(--z-drawer) - 1); opacity: 0; pointer-events: none; transition: opacity var(--t); }
.scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; width: min(92vw, 420px); background: var(--wall); border-left: 1px solid var(--line-2); z-index: var(--z-drawer); display: flex; flex-direction: column; transform: translateX(100%); transition: transform var(--t-slow) var(--ease-out); box-shadow: -30px 0 60px rgba(0,0,0,.6); }
.drawer-right { right: 0; }
.drawer-left { left: 0; border-left: 0; border-right: 1px solid var(--line-2); transform: translateX(-100%); box-shadow: 30px 0 60px rgba(0,0,0,.6); }
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px var(--s4); border-bottom: 1px solid var(--line); min-height: 64px; }
.drawer-head h2 { font-size: 1.4rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--s4); overscroll-behavior: contain; }
.drawer-foot { padding: var(--s4); border-top: 1px solid var(--line); background: var(--glass); display: flex; flex-direction: column; gap: 10px; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 86vh; background: var(--wall); border-top: 1px solid var(--line-2); border-radius: var(--r-xl) var(--r-xl) 0 0; z-index: var(--z-drawer); display: flex; flex-direction: column; transform: translateY(100%); transition: transform var(--t-slow) var(--ease-out); }
.sheet.is-open { transform: none; }
.sheet::before { content: ""; width: 44px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 10px auto 0; }
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--s4); opacity: 0; pointer-events: none; transition: opacity var(--t); }
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal-box { width: min(100%, 520px); background: var(--wall); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s5); box-shadow: 0 40px 80px rgba(0,0,0,.7); transform: translateY(10px); transition: transform var(--t-slow) var(--ease-out); }
.modal.is-open .modal-box { transform: none; }
.modal-box h2 { font-size: 1.6rem; margin-bottom: var(--s3); }
body.is-locked { overflow: hidden; }

/* ============ Cart lines (drawer + cart page) ============ */
.cart-line { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line .th { width: 72px; height: 84px; border-radius: var(--r-md); background: #0B0708; border: 1px solid var(--line); display: grid; place-items: end center; overflow: hidden; }
.cart-line .th img { width: 84%; height: 92%; object-fit: contain; object-position: bottom; mix-blend-mode: screen; }
.cart-line .th.light { background: var(--paper); place-items: center; }
.cart-line .th.light img { mix-blend-mode: multiply; object-position: center; }
.cart-line .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.cart-line .nm { font-weight: 500; font-size: var(--fs-sm); line-height: 1.3; }
.cart-line .meta { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.cart-line .bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.cart-line .remove { font-size: var(--fs-xs); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; min-height: var(--tap); display: inline-flex; align-items: center; }
.cart-line .remove:hover { color: var(--bad); }
.cart-line.addon { grid-template-columns: 72px minmax(0, 1fr); padding-left: 24px; border-bottom-style: dotted; position: relative; }
.cart-line.addon::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 50%; width: 10px; border-left: 1px solid var(--brass-2); border-bottom: 1px solid var(--brass-2); border-radius: 0 0 0 6px; }
.cart-line.addon .th { width: 52px; height: 60px; }
.cart-line .linked { font-size: var(--fs-xs); color: var(--brass); font-weight: 600; }
.cart-line.is-changed { background: var(--warn-bg); margin: 0 calc(var(--s4) * -1); padding-left: var(--s4); padding-right: var(--s4); border-left: 3px solid var(--warn); }

/* ============ Demo state bar (design preview only; delete in production) ============ */
.demo { position: fixed; right: 12px; bottom: 12px; z-index: var(--z-toast); background: rgba(16,10,11,.92); border: 1px solid var(--brass-2); border-radius: var(--r-lg); padding: 10px 12px; font-size: var(--fs-xs); box-shadow: 0 20px 40px rgba(0,0,0,.6); max-width: min(92vw, 360px); backdrop-filter: blur(10px); }
.demo summary { cursor: pointer; list-style: none; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); display: flex; gap: 8px; align-items: center; }
.demo summary::-webkit-details-marker { display: none; }
.demo summary::before { content: "◆"; font-size: .6rem; }
.demo .demo-body { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.demo .demo-body button { min-height: 32px; padding: 0 10px; border-radius: var(--r); border: 1px solid var(--line-2); color: var(--cream-2); font-size: var(--fs-xs); font-weight: 600; }
.demo .demo-body button[aria-pressed="true"] { border-color: var(--neon); color: var(--core); box-shadow: 0 0 8px rgba(255,45,63,.4); }
.demo .demo-note { width: 100%; color: var(--muted); margin-top: 6px; }
@media print { .demo { display: none; } }
