/* Printparts catalog, shared pages and admin styles. */

/* ===== Fonts (self-hosted – no requests to Google, see privacy policy) ===== */
@font-face { font-family: "Rubik"; font-weight: 500; font-display: swap; src: url("fonts/rubik-hebrew-500-normal.woff2") format("woff2"); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Rubik"; font-weight: 700; font-display: swap; src: url("fonts/rubik-hebrew-700-normal.woff2") format("woff2"); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Rubik"; font-weight: 800; font-display: swap; src: url("fonts/rubik-hebrew-800-normal.woff2") format("woff2"); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Rubik"; font-weight: 500; font-display: swap; src: url("fonts/rubik-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }
@font-face { font-family: "Rubik"; font-weight: 700; font-display: swap; src: url("fonts/rubik-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }
@font-face { font-family: "Rubik"; font-weight: 800; font-display: swap; src: url("fonts/rubik-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }
@font-face { font-family: "Heebo"; font-weight: 400; font-display: swap; src: url("fonts/heebo-hebrew-400-normal.woff2") format("woff2"); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; font-weight: 500; font-display: swap; src: url("fonts/heebo-hebrew-500-normal.woff2") format("woff2"); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; font-weight: 700; font-display: swap; src: url("fonts/heebo-hebrew-700-normal.woff2") format("woff2"); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; font-weight: 400; font-display: swap; src: url("fonts/heebo-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }
@font-face { font-family: "Heebo"; font-weight: 500; font-display: swap; src: url("fonts/heebo-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }
@font-face { font-family: "Heebo"; font-weight: 700; font-display: swap; src: url("fonts/heebo-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-display: swap; src: url("fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); }

/* ===== Design tokens (light, colorful) ===== */
:root {
  --bg: #fffaf4;
  --surface: #ffffff;
  --surface-2: #f6f1ff;
  --text: #1f1b3a;
  --muted: #5d5878;
  --border: #e7e0f2;
  --border-strong: #c9bfe0;
  --accent: #5b3df5;
  --accent-hover: #4325d8;
  --accent-text: #ffffff;
  --accent-soft: #efeaff;
  --accent-soft-text: #3d22b5;
  --accent-2: #ff8a3d;
  --accent-2-soft: #fff0e3;
  --accent-2-text: #8a3a06;
  --pink: #c42a6f;
  --pink-soft: #ffe8f2;
  --green: #0b7a3b;
  --green-soft: #e3f6ea;
  --blue: #1f63d6;
  --blue-soft: #e6efff;
  --ok: #0b7a3b;
  --ok-soft: #e3f6ea;
  --focus: #5b3df5;
  --warn-text: #b42318;
  --img-bg: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 28px rgb(64 38 160 / 0.12);
  --maxw: 1200px;
  --font-display: "Rubik", "Heebo", system-ui, "Segoe UI", Arial, sans-serif;
  --font-body: "Heebo", system-ui, "Segoe UI", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.65;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding-block: 0 48px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; text-wrap: balance; letter-spacing: -0.01em; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
code, .mono { font-family: var(--font-mono); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.fine { color: var(--muted); font-size: 0.88rem; }
.strong { font-weight: 700; }

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--accent-text); padding: 10px 16px;
  border-radius: var(--radius-sm); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 10px; color: var(--accent-text); }

/* ===== Affiliate disclosure (slim, always visible) ===== */
.disclosure-bar { background: var(--accent-soft); color: var(--accent-soft-text); font-size: 0.8rem; }
.disclosure-bar p { margin: 0; padding-block: 5px; }
.disclosure-bar a { color: inherit; font-weight: 700; }

/* ===== Header (same on every page) ===== */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; min-height: 60px; padding-block: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; flex: none; color: var(--accent); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem; border-radius: var(--radius-sm); }
.site-nav a:hover { background: var(--surface-2); color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -3px var(--accent); border-radius: 0; }

/* ===== Page head band (same on every page) ===== */
.hero { background: var(--surface); border-bottom: 1px solid var(--border); }
.hero .container { padding-block: clamp(20px, 4vw, 36px) clamp(18px, 3vw, 28px); display: grid; gap: 8px; }
.eyebrow { margin: 0; font-size: 0.82rem; font-weight: 700; color: var(--accent); letter-spacing: 0.02em; }
.hero h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; max-width: 26ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { margin: 0; color: var(--muted); max-width: 70ch; }
.lede.updated { font-size: 0.88rem; }
.page-body { padding-top: 24px; }

/* ===== Search console ===== */
.console { margin-top: 10px; display: grid; gap: 12px; }
.console fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.dept-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.dept-tabs::-webkit-scrollbar { display: none; }
.dept-tabs button {
  flex: none; font: 500 0.95rem var(--font-body); min-height: 44px; padding: 0 16px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
}
.dept-tabs button:hover { border-color: var(--border-strong); }
.dept-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 700; }
.dept-tabs .n:empty { display: none; }
.dept-tabs button.is-empty { display: none; }
.dept-tabs .n { font-size: 0.78rem; min-width: 1.6em; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.dept-tabs [aria-pressed="true"] .n { background: rgb(255 255 255 / 0.2); color: inherit; }

.search-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label, .field legend { font-weight: 700; font-size: 0.85rem; }
.field input, .field select {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; min-height: 46px; width: 100%;
}
.field input:hover, .field select:hover { border-color: var(--border-strong); }
.field select:disabled { opacity: 0.55; cursor: not-allowed; }
.field input[type="search"] { padding-inline-start: 40px; background-image: url("/search.svg"); background-repeat: no-repeat; background-position: right 12px center; }
.chips-label { font-weight: 700; font-size: 0.85rem; margin: 0 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit; font-size: 0.88rem; font-weight: 500; min-height: 40px; padding: 4px 14px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.chip:hover { border-color: var(--border-strong); }
.chip[aria-pressed="true"] { background: var(--accent-2-soft); border-color: var(--accent-2); color: var(--accent-2-text); }
.btn-reset {
  font: inherit; min-height: 46px; padding: 8px 16px; cursor: pointer; font-weight: 500;
  background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.btn-reset:hover { border-color: var(--border-strong); background: var(--surface-2); }

/* ===== Results ===== */
.results-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin: 20px 0 14px; }
.results-meta { margin: 0; font-weight: 700; font-family: var(--font-display); }
.list-note { margin: 20px 0 0; color: var(--muted); font-size: 0.85rem; max-width: 80ch; }
.catalog-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.catalog-view { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); }
.catalog-view button, .catalog-toolbar select { color: var(--text); font: 500 0.875rem var(--font-body); min-height: 40px; padding: 4px 12px; cursor: pointer; }
.catalog-view button { border: 0; border-radius: 6px; background: transparent; }
.catalog-view button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-soft-text); font-weight: 700; }
.catalog-toolbar select { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* ===== Product cards ===== */
.product-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.product-list > li { min-width: 0; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-media { aspect-ratio: 1; display: grid; place-items: center; background: var(--img-bg); border-bottom: 1px solid var(--border); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.card-media.no-img { background: var(--surface-2); aspect-ratio: 16 / 7; }
.card-media svg { width: 52px; height: 52px; color: var(--muted); opacity: 0.6; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card p { margin: 0; }
.card-cat { font-size: 0.78rem; font-weight: 700; color: var(--accent); }
.card h3 {
  margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card .desc { color: var(--muted); font-size: 0.93rem; }
.compact-price { margin-top: auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.compact-price strong { font-size: 1.35rem; color: var(--text); font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.compact-price bdi { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.compact-price small { flex-basis: 100%; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.part-details { border-top: 1px dashed var(--border); padding-top: 2px; }
.part-details summary, .model-filter summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.spec { margin: 0 0 6px; display: grid; gap: 2px; font-size: 0.85rem; }
.spec div { padding-block: 4px; border-bottom: 1px dashed var(--border); }
.spec dt { color: var(--muted); font-size: 0.78rem; }
.spec dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; }
.card-cat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.badge-ok { font-size: 0.72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.badge-ok::before { content: "✓ "; }
.alternatives { border-top: 1px dashed var(--border); }
.alternatives summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.alternatives ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.alternatives li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 8px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 0.85rem; }
.alternatives .alt-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.alternatives small { display: block; color: var(--muted); font-size: 0.75rem; }
.alternatives strong { font-variant-numeric: tabular-nums; }
.alternatives a { grid-column: 1 / -1; font-weight: 700; font-size: 0.82rem; min-height: 32px; display: inline-flex; align-items: center; }
.cta { display: grid; gap: 2px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-buy {
  display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 44px; cursor: pointer;
  background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 700; font-family: var(--font-display);
  border: 0; border-radius: var(--radius-sm); padding: 8px 14px; font-size: 0.95rem;
}
.btn-buy:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn-buy { white-space: nowrap; }
.btn-check {
  font: inherit; font-weight: 600; font-size: 0.82rem; min-height: 40px; padding: 0; cursor: pointer;
  background: transparent; color: var(--accent); border: 0; text-decoration: underline; text-underline-offset: 3px;
}
.btn-check:hover { color: var(--accent-hover); }
.aff-label { font-size: 0.72rem; color: var(--muted); }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 48px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--muted); }

/* List view */
.product-list.is-list-view { grid-template-columns: 1fr; gap: 10px; }
.is-list-view .card { flex-direction: row; }
.is-list-view .card-media { flex: none; width: clamp(96px, 22%, 180px); aspect-ratio: 1; border-bottom: 0; border-inline-end: 1px solid var(--border); }
.is-list-view .card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; align-content: start; }
.is-list-view .card-body > * { grid-column: 1; }
.is-list-view .compact-price, .is-list-view .cta { grid-column: 2; }
.is-list-view .compact-price { grid-row: 1 / 3; align-self: start; margin: 0; justify-content: end; text-align: end; max-width: 220px; }
.is-list-view .cta { grid-row: 3 / 6; align-self: end; min-width: 200px; }

/* ===== Notices ===== */
.notice {
  display: flex; gap: 10px; align-items: flex-start; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; font-size: 0.92rem;
}
.notice::before { content: "i"; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-soft-text); font: 700 0.8rem var(--font-mono); margin-top: 1px; }
.notice p { margin: 0; }

/* ===== Dialog ===== */
.check-dialog {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 0; background: var(--surface); color: var(--text);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow);
}
.check-dialog::backdrop { background: rgb(8 14 16 / 0.6); }
.dialog-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface);
}
.dialog-head h2 { margin: 0; font-size: 1.1rem; }
.dialog-close {
  font: inherit; font-size: 1.4rem; line-height: 1; min-width: 44px; min-height: 44px; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.dialog-body { padding: 4px 16px 16px; }
.dialog-body h3 { font-size: 1rem; margin: 16px 0 6px; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.price { font-family: var(--font-mono); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; direction: ltr; margin: 0; }
.price-time { font-size: 0.78rem; color: var(--muted); margin: 0; }
.price-amounts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.price-usd { font: 700 1.05rem var(--font-mono); color: var(--text); }
.delivered { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 10px; margin-top: 8px; padding: 10px 12px; background: var(--ok-soft); color: var(--text); border-inline-start: 3px solid var(--ok); border-radius: 6px; }
.delivered strong { font-size: 1.35rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delivered small { grid-column: 1 / -1; overflow-wrap: anywhere; color: var(--muted); }

/* ===== Coupons ===== */
.coupon-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.coupon-list.compact { grid-template-columns: 1fr; gap: 10px; }
.coupon { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; border-inline-start: 5px solid var(--accent-2); }
.coupon h3, .coupon h4 { margin: 0 0 8px; font-size: 1.05rem; }
.coupon p { margin: 6px 0; }
.coupon-code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.coupon-code code { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.04em; background: var(--accent-2-soft); color: var(--accent-2-text); padding: 4px 12px; border-radius: 6px; border: 1px dashed currentColor; }
.btn-copy { font: inherit; font-size: 0.88rem; font-weight: 500; min-height: 40px; padding: 4px 12px; cursor: pointer; background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 6px; }
.btn-copy:hover { border-color: var(--border-strong); }
.coupon-facts { margin: 8px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.88rem; display: grid; gap: 2px; }
.coupon-link { font-weight: 700; display: inline-block; margin-top: 8px; }
.page-body > .results-meta { margin: 0 0 14px; }

/* ===== Guides ===== */
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.guide { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: grid; gap: 8px; align-content: start; }
.guide h3 { margin: 0; font-size: 1.1rem; }
.guide p { margin: 0; }
.guide-links-label { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.guide-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.guide-link { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-decoration: none; font-size: 0.88rem; font-weight: 500; }
.guide-link:hover { border-color: var(--accent); color: var(--accent); }
.related-link { font-weight: 700; font-size: 0.92rem; justify-self: start; }

/* ===== Legal pages ===== */
.legal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(18px, 4vw, 40px); max-width: 860px; }
.legal > :first-child { margin-top: 0; }
.legal h2 { margin-top: 1.8em; font-size: 1.15rem; }
.legal p, .legal li { max-width: 72ch; }

/* ===== Footer ===== */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: 28px 20px; font-size: 0.88rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px 32px; }
.footer-brand { font: 800 1.05rem var(--font-display); color: var(--text); margin: 0 0 6px; }
.site-footer p { margin: 0; max-width: 60ch; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer a { color: var(--text); display: inline-flex; min-height: 32px; align-items: center; }
.site-footer a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.footer-fine { margin-top: 20px !important; padding-top: 14px; border-top: 1px solid var(--border); font-size: 0.8rem; max-width: none !important; }

/* ===== Small screens ===== */
@media (max-width: 860px) {
  .search-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .search-row .field-q { grid-column: 1 / -1; }
  .search-row .btn-reset { grid-column: 1 / -1; min-height: 40px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .site-header { position: static; }
  .site-header .container { justify-content: center; }
  .site-nav a { padding: 0 10px; }
  .hero h1 { font-size: 1.5rem; }
  .catalog-hero .lede { display: none; }
  .hero .container { padding-block: 14px; gap: 6px; }
  .console { margin-top: 4px; gap: 8px; }
  .console .field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .search-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; }
  .search-row .btn-reset { grid-column: auto; min-height: 46px; padding-inline: 10px; }
  .dept-tabs button { min-height: 40px; padding: 0 12px; font-size: 0.9rem; }
  .results-head { margin: 14px 0 10px; flex-wrap: nowrap; }
  .catalog-toolbar { flex-wrap: nowrap; gap: 4px; }
  .catalog-view button, .catalog-toolbar select { padding: 4px 8px; font-size: 0.82rem; }
  .catalog-toolbar select { max-width: 130px; }
  .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card-body { padding: 10px; gap: 6px; }
  .card h3 { font-size: 0.92rem; }
  .compact-price strong { font-size: 1.15rem; }
  .btn-buy { font-size: 0.88rem; padding: 6px; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 0; text-align: center; }
  .is-list-view .card-body { grid-template-columns: minmax(0, 1fr); }
  .is-list-view .card-body > *, .is-list-view .compact-price, .is-list-view .cta { grid-column: 1; grid-row: auto; text-align: start; justify-content: start; }
  .guide-list { grid-template-columns: 1fr; }
}
@media (max-width: 340px) { .product-list { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .disclosure-bar, .site-nav, .console, .skip-link { display: none; }
  .site-header { position: static; }
}

/* ===== Colorful layer ===== */
.disclosure-bar { background: var(--text); color: #fff; }
.disclosure-bar a { color: #ffd2b0; }
.brand-mark { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -3px var(--accent-2); }

.hero {
  position: relative; overflow: hidden; border-bottom: 0;
  background:
    radial-gradient(600px 260px at 92% -10%, #ffd9bf 0%, transparent 70%),
    radial-gradient(520px 260px at 8% 110%, #ffd3e8 0%, transparent 70%),
    linear-gradient(120deg, #f3eeff 0%, #fff6ee 55%, #eef6ff 100%);
}
.hero::after {
  content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 138 61 / 0.25), transparent 70%); pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: var(--text); }
.hero h1 em { background: linear-gradient(90deg, var(--accent), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-block; justify-self: start; padding: 2px 12px; border-radius: 999px; background: #fff; color: var(--accent); box-shadow: 0 2px 8px rgb(64 38 160 / 0.08); }

.console { background: rgb(255 255 255 / 0.85); border: 1px solid #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.field input, .field select { background: #fff; border-color: var(--border-strong); }

/* Department tabs – each department has its own color */
.dept-tabs button { background: #fff; border-color: var(--border-strong); font-weight: 600; }
.dept-tabs button[data-dept=""][aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.dept-tabs button[data-dept="bambu"] { --c: var(--green); --cs: var(--green-soft); }
.dept-tabs button[data-dept="other"] { --c: var(--blue); --cs: var(--blue-soft); }
.dept-tabs button[data-dept="diy"] { --c: var(--pink); --cs: var(--pink-soft); }
.dept-tabs button[data-dept]:not([data-dept=""])::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.dept-tabs button[data-dept]:not([data-dept=""]):hover { background: var(--cs); border-color: var(--c); }
.dept-tabs button[data-dept]:not([data-dept=""])[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.dept-tabs button[aria-pressed="true"]::before { background-color: #fff !important; }

/* Cards */
.card { border-color: var(--border); box-shadow: 0 2px 6px rgb(64 38 160 / 0.05); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-media { background: linear-gradient(180deg, #fff 70%, #faf7ff 100%); }
.card-cat > :first-child, .card-cat { color: var(--accent-soft-text); }
.card-cat { font-size: 0.75rem; }
.card[data-dept="bambu"] .card-cat { color: var(--green); }
.card[data-dept="other"] .card-cat { color: var(--blue); }
.card[data-dept="diy"] .card-cat { color: var(--pink); }
.card[data-dept] { border-top: 4px solid var(--accent); }
.card[data-dept="bambu"] { border-top-color: #28b864; }
.card[data-dept="other"] { border-top-color: #4b8bf5; }
.card[data-dept="diy"] { border-top-color: #e8559a; }
.compact-price strong { color: var(--text); }
.btn-buy { background: linear-gradient(135deg, var(--accent), #7b4dff); box-shadow: 0 4px 12px rgb(91 61 245 / 0.25); }
.btn-buy:hover { background: var(--accent-hover); }
.btn-check { color: var(--accent-2-text); }
.badge-ok { background: var(--green-soft); color: var(--green); }

.catalog-view button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-soft-text); }
.coupon { border-inline-start-color: var(--accent-2); background: linear-gradient(90deg, #fff, var(--accent-2-soft)); }
.guide { border-top: 4px solid var(--accent-2); }
.legal { box-shadow: 0 2px 6px rgb(64 38 160 / 0.05); }

.site-footer { background: #1f1b3a; color: #c9c4e3; border-top: 0; }
.site-footer a { color: #fff; }
.site-footer a[aria-current="page"] { color: #ffd2b0; }
.footer-brand { color: #fff; }
.footer-fine { border-top-color: rgb(255 255 255 / 0.15); }
.site-footer :focus-visible { outline-color: #ffd2b0; }

@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }

/* ===== Community page ===== */
.community-group { margin-bottom: 28px; }
.community-group h2 { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 8px 18px; border-radius: 999px; font-size: 1.15rem; color: #fff; }
.community-group.deals h2 { background: linear-gradient(135deg, #1f63d6, #3d8bff); }
.community-group.support h2 { background: linear-gradient(135deg, #0b7a3b, #1fa65a); }
.community-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.community-card {
  --c: var(--accent); --cs: var(--accent-soft);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  min-height: 84px; padding: 14px 16px; border-radius: var(--radius); text-decoration: none; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-inline-start: 5px solid var(--c);
  box-shadow: 0 2px 6px rgb(64 38 160 / 0.05); transition: transform .15s ease, box-shadow .15s ease;
}
.community-card:hover { color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow); background: linear-gradient(90deg, #fff 40%, var(--cs)); }
.community-card .platform { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--c); color: #fff; }
.community-card .platform svg { width: 28px; height: 28px; }
.community-card strong { display: block; font-family: var(--font-display); font-size: 1.02rem; line-height: 1.3; }
.community-card small { display: block; color: var(--muted); font-size: 0.85rem; }
.community-card .go { color: var(--c); font-weight: 700; font-size: 1.2rem; }
.community-card.fb { --c: #1f63d6; --cs: #e6efff; }
.community-card.tg { --c: #1a86c7; --cs: #e3f3fc; }
.community-card.wa { --c: #0b7a3b; --cs: #e3f6ea; }
.community-card.wa.hot { --c: #c2410c; --cs: #fff0e3; }
.community-card.ig { --c: #c42a6f; --cs: #ffe8f2; }
.community-card.ig .platform { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); }
.community-note { max-width: 80ch; }
@media (prefers-reduced-motion: reduce) { .community-card:hover { transform: none; } }

/* ===== Admin ===== */
.admin main { padding-top: 24px; }
.admin-status {
  position: fixed; z-index: 10; inset-inline: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  width: fit-content; max-width: min(36rem, calc(100% - 32px)); margin: 0 auto;
  padding: 10px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow); color: var(--text);
  font-weight: 700; overflow-wrap: anywhere; pointer-events: none;
}
.admin-status:empty { padding: 0; border: 0; box-shadow: none; }
.admin-status.is-error { color: var(--warn-text); border-color: currentColor; }
.admin-status.is-ok { color: var(--text); }
.admin button[aria-busy="true"] { opacity: 0.75; cursor: wait; }
.admin-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.admin-actions { display: flex; align-items: center; gap: 16px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--border); }
.admin-tabs [role="tab"] {
  font: inherit; font-weight: 700; min-height: 44px; padding: 8px 18px; cursor: pointer;
  background: transparent; color: var(--text); border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.admin-tabs [aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.admin-head > div { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin: 12px 0 20px; display: grid; gap: 12px;
}
.admin-form.narrow { max-width: 360px; }
.admin-form h3 { margin: 0; }
.admin-form textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--muted);
  border-radius: 8px; padding: 10px 12px; width: 100%;
}
.admin-form select[multiple] { min-height: 120px; }
.admin-form small { color: var(--muted); }
.admin-form fieldset { border: 0; padding: 0; margin: 0; }
.admin-form legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.grid2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.check { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.check input { width: 20px; height: 20px; }
.form-actions { display: flex; gap: 8px; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.admin-table th, .admin-table td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table thead th { background: var(--bg); }
.row-actions { white-space: nowrap; }
.row-actions .btn-reset { min-height: 36px; padding: 4px 10px; margin-inline-end: 4px; }
.btn-reset.danger, .danger-text { color: var(--warn-text); }

/* Admin: automation tabs */
.badge { display: inline-block; min-width: 1.6em; padding: 0 6px; border-radius: 999px; background: var(--warn-text); color: var(--surface); font-size: 0.8rem; text-align: center; }
.bulk-actions, .filter-row { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin: 12px 0; }
.filter-row .field { flex: 1 1 220px; }
.seller-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.seller-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow-wrap: anywhere; }
.checks-col { display: grid; gap: 2px; max-height: 360px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px; background: var(--bg); }
.inline-input { font: inherit; width: 100%; min-width: 180px; padding: 6px 8px; border: 1px solid var(--muted); border-radius: 6px; background: var(--bg); color: var(--text); }
.sys-status { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; }
.admin-table .wrap { overflow-wrap: anywhere; min-width: 200px; }
.admin-table .start { text-align: left; }
.admin details > summary { cursor: pointer; font-weight: 700; }
.check.strong { font-weight: 700; }
#diag-report { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.8rem; }

/* Admin: wording and spelling help (R-31) */
.polish { margin-top: 6px; }
.btn-polish { font: inherit; font-size: 0.85rem; padding: 4px 12px; border-radius: 999px; border: 1px solid #cfc4ff; background: #f3efff; color: #3d25c9; cursor: pointer; }
.btn-polish:hover { background: #e7dfff; }
.btn-polish:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-polish[disabled] { opacity: 0.6; cursor: progress; }
.polish-out { display: grid; gap: 8px; margin-top: 8px; }
.polish-out:empty { display: none; }
.polish-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid #ded6ff; border-radius: 12px; background: #faf8ff; }
.polish-row strong { grid-column: 1 / -1; font-size: 0.82rem; color: #3d25c9; }
.polish-row p { margin: 0; }

/* ---------- Illustrations (R-32) ---------- */
.hero-art { position: absolute; inset-inline-end: 16px; top: 50%; translate: 0 -50%; height: min(170px, 78%); width: auto; pointer-events: none; animation: art-float 7s ease-in-out infinite; }
.hero:has(.console) .hero-art { top: 6px; translate: none; height: 124px; }
.hero h1, .hero .lede, .hero .eyebrow { max-width: min(26ch, calc(100% - 200px)); }
.hero .lede { max-width: min(62ch, calc(100% - 220px)); }
@keyframes art-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .hero-art { animation: none; } }
@media (max-width: 860px) {
  .hero-art { height: 96px; top: 10px; translate: none; opacity: 0.95; }
  .hero:has(.console) .hero-art { height: 84px; }
  .hero h1, .hero .lede, .hero .eyebrow { max-width: calc(100% - 120px); }
}
@media (max-width: 600px) {
  .hero-art, .hero:has(.console) .hero-art { height: 64px; top: 8px; }
  .hero h1, .hero .eyebrow { max-width: calc(100% - 84px); }
  .hero .lede { max-width: none; }
}
/* Department tabs: small icon instead of a dot */
.dept-tabs button[data-dept]::before { content: ""; width: 20px; height: 20px; border-radius: 6px; background: #fff center / 18px no-repeat; flex: none; }
.dept-tabs button[data-dept=""]::before { background-image: url("/art/dept-all.svg"); }
.dept-tabs button[data-dept="bambu"]::before { background-image: url("/art/dept-bambu.svg"); }
.dept-tabs button[data-dept="other"]::before { background-image: url("/art/dept-other.svg"); }
.dept-tabs button[data-dept="diy"]::before { background-image: url("/art/dept-diy.svg"); }
.dept-tabs button[data-dept]:not([data-dept=""])::before { width: 20px; height: 20px; border-radius: 6px; background-color: #fff; }
.dept-tabs button { display: inline-flex; align-items: center; gap: 8px; }
/* Empty search and cards without a photo */
.empty-state::before { content: ""; display: block; width: 160px; height: 120px; margin: 0 auto 12px; background: url("/art/empty.svg") center / contain no-repeat; }
.card-media.no-img { background: var(--surface-2) url("/art/part.svg") center / auto 70% no-repeat; }
.card-media.no-img svg { display: none; }

/* ---------- Accessibility menu (R-36) ---------- */
.a11y { position: relative; }
.a11y-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; font: 600 0.95rem var(--font-body); color: #fff; background: #1f4fbf; border: 2px solid #1f4fbf; border-radius: 999px; cursor: pointer; }
.a11y-toggle:hover, .a11y-toggle[aria-expanded="true"] { background: #173d96; border-color: #173d96; }
.a11y-toggle[hidden] { display: none; }
.a11y-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 40; width: min(300px, calc(100vw - 32px)); padding: 12px; background: #fff; color: #1f1b3a; border: 2px solid #1f4fbf; border-radius: 16px; box-shadow: 0 16px 36px rgb(20 20 60 / 0.22); }
.a11y-panel ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.a11y-panel li button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; font: 500 1rem var(--font-body); color: inherit; background: #f4f6fb; border: 2px solid transparent; border-radius: 10px; cursor: pointer; text-align: start; }
.a11y-panel li button:hover { border-color: #1f4fbf; }
.a11y-panel li button[aria-pressed="true"] { background: #1f4fbf; color: #fff; font-weight: 700; }
.a11y-state { font-size: 0.85rem; opacity: 0.9; }
.a11y-reset { width: 100%; min-height: 40px; font: 500 0.95rem var(--font-body); color: #1f1b3a; background: #fff; border: 1px solid #8a86a3; border-radius: 10px; cursor: pointer; }
.a11y-reset:hover { background: #f4f6fb; }
.a11y-note { margin: 10px 0 0; font-size: 0.82rem; color: #4a4667; }
@media (max-width: 600px) { .a11y-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } .a11y-toggle { padding: 0 11px; } .a11y { position: absolute; inset-inline-end: 12px; top: 8px; } .site-header .container { position: relative; } }
@media print { .a11y { display: none; } }

/* Visitor choices */
html.a11y-text-1 { font-size: 115%; }
html.a11y-text-2 { font-size: 130%; }
html.a11y-font, html.a11y-font body { --font-display: Arial, "Segoe UI", sans-serif; --font-body: Arial, "Segoe UI", sans-serif; letter-spacing: 0.01em; line-height: 1.75; }
html.a11y-links a:not(.btn-buy):not(.brand) { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px; font-weight: 700; }
html.a11y-links a:focus-visible, html.a11y-links button:focus-visible { outline: 4px solid #000 !important; outline-offset: 3px; }
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-contrast {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #ffffff; --text: #000000; --muted: #1a1a1a;
  --border: #000000; --border-strong: #000000; --accent: #1a0f8f; --accent-hover: #000000; --accent-soft: #ffffff; --accent-soft-text: #1a0f8f;
  --accent-2: #8a3a06; --accent-2-soft: #ffffff; --accent-2-text: #000000; --pink: #7a0f3f; --pink-soft: #ffffff; --green: #064d25; --green-soft: #ffffff;
  --blue: #0b3a8f; --blue-soft: #ffffff; --ok: #064d25; --ok-soft: #ffffff; --focus: #000000; --shadow: none;
}
html.a11y-contrast .hero, html.a11y-contrast .card-media { background: #fff; }
html.a11y-contrast .hero::after { display: none; }
html.a11y-contrast .hero h1 em { background: none; color: #1a0f8f; }
html.a11y-contrast .btn-buy { background: #1a0f8f; box-shadow: none; }
html.a11y-contrast .site-footer { background: #000; color: #fff; }
html.a11y-contrast .site-footer a { color: #fff; }
html.a11y-contrast .disclosure-bar { background: #000; color: #fff; }
html.a11y-contrast .card, html.a11y-contrast .console, html.a11y-contrast input, html.a11y-contrast select { border-width: 2px; }
.footer-privacy { margin-top: 18px !important; max-width: none !important; }

/* ---------- Coupon calculator (R-38) ---------- */
.sum-form { margin: 0 0 24px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.sum-form[hidden] { display: none; }
.sum-form h2 { margin: 0; font-size: 1.15rem; }
.sum-form .fine { margin: 0; }
.sum-result:empty { display: none; }
.sum-result { padding: 14px; border-radius: var(--radius-sm); background: var(--accent-2-soft); border: 1px solid #ffd2ad; }
.sum-result h3 { margin: 0 0 10px; font-size: 1.05rem; color: var(--accent-2-text); }
.sum-next { margin: 10px 0 0; font-weight: 600; }
.coupon.is-above { opacity: 0.72; border-inline-start-color: var(--border-strong); }
.coupon.is-above::after { content: "דורש סל גדול יותר"; display: inline-block; margin-top: 6px; font-size: 0.82rem; color: var(--muted); }
a.btn-check { text-decoration: none; display: inline-flex; align-items: center; }

/* ===== Filaments (R-46) ===== */
.fil-empty h2 { margin: 0 0 6px; color: var(--text); font-size: 1.2rem; }
.fil-empty p { margin: 0; }
.fil-cheapest h2 { margin: 0; font-size: 1.15rem; }
.fil-cheapest .fine { margin: 2px 0 10px; }
.cheap-strip { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.cheap-item {
  display: grid; gap: 2px; min-height: 44px; padding: 10px 14px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); border-top: 4px solid var(--accent-2);
}
.cheap-item:hover { border-color: var(--accent-2); color: var(--text); box-shadow: var(--shadow); }
.cheap-mat { font-weight: 700; font-size: 0.82rem; color: var(--accent-2-text); }
.cheap-price { font-family: var(--font-display); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.cheap-sub { font-size: 0.8rem; color: var(--muted); }
.fil-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; }
.fil-row-end { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.check-field { display: flex; align-items: flex-start; gap: 8px; min-height: 44px; padding-top: 10px; }
.check-field input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.check-field label { font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.check-field .fine { font-weight: 400; }
.chip-color { display: inline-flex; align-items: center; gap: 6px; }
.fil-count { margin: 18px 0 12px; }
.fil-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.fil-card { border-top: 4px solid var(--accent-2); }
.fil-card[data-kind="accessory"] { border-top-color: var(--blue); }
.fil-card:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.fil-media { aspect-ratio: auto; height: 120px; background: linear-gradient(180deg, #fff 60%, var(--accent-2-soft) 100%); }
.fil-media img { width: auto; max-width: 100%; height: 120px; padding: 10px; object-fit: contain; }
.badge-good, .badge-cond { font-size: 0.8rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.badge-good { background: var(--green-soft); color: var(--green); }
.badge-good::before { content: "★ "; }
.badge-cond { background: var(--accent-2-soft); color: var(--accent-2-text); border: 1px solid var(--accent-2); }
.badge-cond::before { content: "! "; }
.fil-meta { font-size: 0.88rem; color: var(--muted); }
.swatches { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.82rem; }
.swatches li { display: inline-flex; align-items: center; gap: 5px; }
.sw { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgb(31 27 58 / 0.35); flex: none; }
.sw-black { background: #1d1d1f; } .sw-white { background: #fff; } .sw-grey { background: #8a8a92; }
.sw-silver { background: linear-gradient(135deg, #f2f2f5, #a9adb6); } .sw-red { background: #d92b2b; }
.sw-orange { background: #ff8a3d; } .sw-yellow { background: #f7d21e; } .sw-green { background: #28a45a; }
.sw-blue { background: #2f6fe0; } .sw-purple { background: #7b4dff; } .sw-pink { background: #f06aa8; }
.sw-brown { background: #7a4a24; } .sw-beige { background: #e8d6b5; } .sw-gold { background: linear-gradient(135deg, #ffe58a, #c99a1e); }
.sw-transparent { background: repeating-linear-gradient(45deg, #fff 0 3px, #dfe3ea 3px 6px); }
.sw-multi { background: conic-gradient(#d92b2b, #f7d21e, #28a45a, #2f6fe0, #7b4dff, #d92b2b); }
.sw-other { background: var(--surface-2); }
.fil-price { margin-top: auto; display: grid; gap: 2px; }
.fil-price .compact-price { margin: 0; }
.per-kg { font-size: 0.9rem; color: var(--muted); }
.per-kg strong { color: var(--accent-soft-text); font-variant-numeric: tabular-nums; }
.good-why { font-size: 0.8rem; color: var(--green); font-weight: 500; }
.fil-how { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 0.85rem; }
.fil-how.is-cond { background: var(--accent-2-soft); border-inline-start: 3px solid var(--accent-2); }
.fil-how-title { font-weight: 700; }
.fil-how ul { margin: 2px 0 0; padding-inline-start: 18px; }
.fil-ship { font-size: 0.8rem; color: var(--muted); }
.fil-list .empty-state p { margin: 0 0 12px; }
@media (max-width: 860px) { .fil-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 600px) {
  .fil-list { grid-template-columns: 1fr; }
  .cheap-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .cheap-item { padding: 8px 10px; }
  .cheap-price { font-size: 1.05rem; }
  .fil-row { gap: 6px; }
  .fil-row-end .btn-reset { width: 100%; }
}

/* Admin: quick add of several options (R-47) */
.bulk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bulk-tools input { max-width: 180px; }
.bulk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 480px; overflow: auto; }
.bulk-list li { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.bulk-list img { border-radius: 6px; object-fit: cover; flex: none; }
.bulk-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.bulk-main label { font-weight: 700; overflow-wrap: anywhere; }
.bulk-price { font-weight: 700; white-space: nowrap; }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cat-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.cat-list small { flex: 1; color: var(--muted); }

/* Admin: AI suggestions waiting for approval (R-49, R-53) */
.draft-card { border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px; margin-top: 12px; background: var(--surface); display: grid; gap: 8px; }
.draft-card h4 { margin: 0; font-size: 1.05rem; }
.draft-view { display: grid; gap: 8px; }
.draft-view p { margin: 0; }
.draft-table th[scope="row"] { white-space: nowrap; font-weight: 500; }
.draft-table .draft-from { color: var(--muted); }
.draft-table .draft-to { background: var(--green-soft); font-weight: 500; }
.draft-why { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.draft-inline { margin-top: 6px; padding: 6px 8px; background: var(--green-soft); border-radius: 8px; }
.gloss-builtin { white-space: pre-wrap; font: inherit; font-size: 0.88rem; color: var(--muted); max-height: 260px; overflow: auto; margin: 8px 0 0; }

/* ===== Catalogue cards, lighter version (R-50). Scoped to the catalogue list; the filaments page keeps its own cards. ===== */
#product-list .card { --dept: var(--accent); border: 1px solid var(--border); border-radius: 14px; box-shadow: none; transition: box-shadow 0.18s ease, border-color 0.18s ease; }
#product-list .card[data-dept="bambu"] { --dept: #1e9e55; }
#product-list .card[data-dept="other"] { --dept: #3b7be8; }
#product-list .card[data-dept="diy"] { --dept: #d9468c; }
#product-list .card:hover { transform: none; border-color: var(--border-strong); box-shadow: 0 6px 18px rgb(64 38 160 / 0.09); }
#product-list .card-media { position: relative; background: #fff; border-bottom: 0; }
#product-list .card-media img { padding: 10px; }
#product-list .card-flag { position: absolute; top: 8px; inset-inline-start: 8px; padding: 2px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; background: var(--accent-2-soft); color: var(--accent-2-text); }
#product-list .card-body { padding: 4px 12px 10px; gap: 6px; }
#product-list .card-title { margin: 0; font-size: 0.95rem; font-weight: 600; line-height: 1.35; min-height: 2.7em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#product-list .card-meta { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#product-list .card-meta::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 6px; border-radius: 50%; background: var(--dept); }
#product-list .card-badges { line-height: 1.2; }
#product-list .card-buy { margin-top: auto; padding-top: 4px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
#product-list .compact-price { margin: 0; gap: 0 6px; min-width: 0; }
#product-list .compact-price strong { font-size: 1.2rem; line-height: 1.2; }
#product-list .compact-price small { font-size: 0.74rem; }
#product-list .btn-buy { min-height: 40px; padding: 6px 12px; font-size: 0.86rem; border-radius: 10px; flex: none; }
#product-list .card-foot { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 0 12px; text-align: start; border-top: 1px solid var(--border); margin-top: 2px; }
#product-list .part-details { border: 0; padding: 0; }
#product-list .part-details[open] { flex: 1 1 100%; order: 5; }
#product-list .part-details summary, #product-list .btn-check { min-height: 36px; font-size: 0.8rem; font-weight: 600; }
#product-list .aff-label { margin-inline-start: auto; font-size: 0.7rem; }
#product-list .alternatives { border-top: 1px solid var(--border); }

/* List view with the lighter card */
#product-list.is-list-view .product-list { grid-template-columns: 1fr; gap: 10px; }
#product-list.is-list-view .card-body { display: flex; flex-direction: column; padding: 10px 14px; }
#product-list.is-list-view .card-title { min-height: 0; }
#product-list.is-list-view .compact-price { grid-row: auto; max-width: none; text-align: start; justify-content: flex-start; }
#product-list.is-list-view .card-media { border-inline-end: 0; }

/* ===== Catalogue order (R-51): one block per category ===== */
#product-list.is-grouped { display: block; }
.cat-group + .cat-group { margin-top: 30px; }
.cat-head { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.cat-head h3 { margin: 0; font: 800 1.15rem/1.3 var(--font-display); }
.cat-head .n, .cat-chips .n { font: 600 0.76rem var(--font-body); color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.more-row { grid-column: 1 / -1; text-align: center; padding-top: 6px; }

/* ===== Finding things (R-54) ===== */
.cat-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding: 6px 4px; }
/* Keep a focused element clear of the sticky header, the sticky category row and the back-to-top button */
html { scroll-padding-bottom: 70px; }
/* The header is sticky from 601px up and can wrap to two rows on narrow tablets */
@media (min-width: 601px) { html { scroll-padding-top: 130px; } }
@media (max-width: 600px) { html { scroll-padding-top: 64px; } }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips[hidden] { display: none; }
.cat-chips .chip { flex: none; min-height: 38px; font-size: 0.85rem; padding: 4px 12px; white-space: nowrap; }
.cat-chips .chip[aria-pressed="true"] .n { background: #fff; color: inherit; }
.to-top { position: fixed; bottom: 16px; inset-inline-start: 16px; z-index: 15; min-height: 44px; padding: 8px 16px; cursor: pointer; font: 700 0.88rem var(--font-body); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; box-shadow: 0 6px 18px rgb(64 38 160 / 0.16); }
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--surface-2); }
@media (min-width: 901px) {
  .cat-chips { position: sticky; top: 61px; z-index: 5; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px); }
}
@media (max-width: 600px) {
  .cat-chips { position: sticky; top: 0; z-index: 5; margin-inline: -16px; padding-inline: 16px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px); }
  #product-list .card-body { padding: 2px 10px 8px; gap: 4px; }
  #product-list .card-title { font-size: 0.88rem; }
  #product-list .card-buy { flex-direction: column; align-items: stretch; gap: 6px; }
  #product-list .card-foot { gap: 0 10px; }
  #product-list .aff-label { font-size: 0.68rem; }
  .cat-group + .cat-group { margin-top: 22px; }
  .cat-head h3 { font-size: 1.05rem; }
}
@media print { .to-top, .cat-chips { display: none; } }
html.a11y-contrast #product-list .card { border-width: 2px; border-color: #000; }
html.a11y-contrast #product-list .card-meta { color: #000; }

/* ===== The whole catalogue card leads to the product page (R-59) =====
   The name is the real link; its hit area is stretched over the card. The AliExpress button and the
   small controls in the footer sit above it and keep their own behaviour. */
#product-list .card-title a { color: inherit; text-decoration: none; }
#product-list .card-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
#product-list .card:hover .card-title a { text-decoration: underline; text-underline-offset: 3px; }
/* The title is clipped to two lines, so the focus ring is drawn inside the link instead of outside it */
#product-list .card-title a:focus-visible { outline-offset: -3px; }
#product-list .card:has(.card-title a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
#product-list .card-buy .btn-buy, #product-list .card-foot, #product-list .alternatives { position: relative; z-index: 1; }

/* ===== Product page (R-57, R-58): lively, with the department's colour ===== */
.pp { --dept: var(--accent); --dept-soft: var(--accent-soft); --dept-text: var(--accent-soft-text); }
.pp[data-dept="bambu"] { --dept: #1e9e55; --dept-soft: #e3f6ea; --dept-text: #0b5c2c; }
.pp[data-dept="other"] { --dept: #3b7be8; --dept-soft: #e6efff; --dept-text: #174a9c; }
.pp[data-dept="diy"] { --dept: #d9468c; --dept-soft: #ffe8f2; --dept-text: #8f1d55; }
.pp-band { background: linear-gradient(160deg, var(--dept-soft) 0%, var(--accent-2-soft) 55%, var(--bg) 100%); border-bottom: 1px solid var(--border); padding-block: 14px 30px; }
.crumbs ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.88rem; }
.crumbs li + li::before { content: "‹"; margin-inline-end: 6px; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; }
.pp-main { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 28px; align-items: start; }
.pp-media { position: relative; aspect-ratio: 1; background: #fff; border-radius: 22px; overflow: hidden; display: grid; place-items: center; box-shadow: 0 18px 40px rgb(64 38 160 / 0.14); border: 1px solid #fff; }
.pp-media img { width: 100%; height: 100%; object-fit: contain; padding: 18px; }
.pp-media.no-img { background: #fff url("/art/part.svg") center / auto 55% no-repeat; }
.pp-flag { position: absolute; top: 14px; inset-inline-start: 14px; padding: 4px 14px; border-radius: 999px; font: 700 0.85rem var(--font-display); background: var(--accent-2); color: #3d1a00; box-shadow: 0 4px 10px rgb(255 138 61 / 0.35); }
.pp-panel { background: var(--surface); border-radius: 22px; padding: clamp(16px, 3vw, 26px); display: grid; gap: 14px; box-shadow: 0 18px 40px rgb(64 38 160 / 0.10); border-top: 6px solid var(--dept); min-width: 0; }
.pp-panel > * { margin: 0; }
.pp-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.pp-dept { padding: 3px 12px; border-radius: 999px; background: var(--dept-soft); color: var(--dept-text); }
.pp-panel h1 { font: 800 clamp(1.4rem, 3.2vw, 2rem)/1.25 var(--font-display); overflow-wrap: anywhere; }
.pp-models { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pp-models a { display: inline-flex; align-items: center; min-height: 34px; padding: 2px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.pp-models a:hover { border-color: var(--dept); background: var(--dept-soft); }
.pp-price { background: var(--surface-2); border-radius: 16px; padding: 12px 16px; }
.pp-price p { margin: 0; }
.pp-amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.pp-amount strong { font: 800 clamp(2rem, 6vw, 2.6rem)/1.1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--text); }
.pp-amount bdi { color: var(--muted); font-variant-numeric: tabular-nums; }
.pp-price-note { color: var(--muted); font-size: 0.9rem; }
.pp-perks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.pp-perks li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 0.84rem; font-weight: 600; background: var(--surface-2); color: var(--text); }
.pp-perks li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pp-perks .perk-ship { background: var(--green-soft); color: #0b5c2c; }
.pp-perks .perk-ship::before { background: var(--green); }
.pp-perks .perk-star { background: var(--accent-2-soft); color: var(--accent-2-text); }
.pp-perks .perk-star::before { background: var(--accent-2); }
.pp-perks .perk-ok { background: var(--green-soft); color: #0b5c2c; }
.pp-perks .perk-ok::before { background: var(--green); }
.pp-cta { display: grid; gap: 6px; }
.pp-buy { min-height: 56px; padding: 12px 24px; font-size: 1.1rem; border-radius: 16px; box-shadow: 0 10px 22px rgb(91 61 245 / 0.28); }
.pp-buy:hover { box-shadow: 0 12px 26px rgb(91 61 245 / 0.36); }
.pp-aff { margin: 0; font-size: 0.8rem; color: var(--muted); }
.pp-coupons a { font-weight: 700; }
.pp-rest { display: grid; gap: 22px; padding-block: 26px 36px; }
.pp-rest h2 { margin: 0 0 8px; font: 800 1.15rem/1.3 var(--font-display); }
.pp-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 20px; border-radius: 18px; background: linear-gradient(120deg, var(--accent-soft), var(--pink-soft)); }
.pp-share h2 { margin: 0 0 2px; }
.pp-share p { margin: 0; }
.pp-share-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 44px; }
.pp-share-btn { font: 700 0.95rem var(--font-display); min-height: 46px; padding: 8px 20px; cursor: pointer; border-radius: 12px; border: 2px solid var(--accent); background: var(--surface); color: var(--accent-soft-text); }
.pp-share-btn:hover { background: var(--accent); color: var(--accent-text); }
.pp-details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 20px; }
.pp-spec { margin: 0 0 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.pp-spec div { padding-bottom: 8px; border-bottom: 1px solid var(--border); min-width: 0; }
.pp-spec dt { color: var(--muted); font-size: 0.8rem; }
.pp-spec dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; unicode-bidi: plaintext; text-align: start; }
.pp-related-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pp-tile { display: grid; gap: 6px; height: 100%; padding: 8px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: box-shadow 0.18s ease, border-color 0.18s ease; }
.pp-tile:hover { border-color: var(--border-strong); box-shadow: 0 6px 18px rgb(64 38 160 / 0.10); }
.pp-tile-media { display: block; aspect-ratio: 1; background: #fff; border-radius: 10px; overflow: hidden; }
.pp-tile-media img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.pp-tile-media.no-img { background: var(--surface-2) url("/art/part.svg") center / auto 60% no-repeat; }
.pp-tile-name { font-size: 0.88rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pp-more-link, .pp-back a { font-weight: 700; }
.pp-back { margin: 0; }
/* On a phone the buy button stays within reach while reading */
.pp-bar { display: none; }
.pp-share[hidden] { display: none; }
@media (max-width: 760px) {
  /* Room for the bar, also when the text is enlarged, so it never covers the focused element */
  html { scroll-padding-bottom: 7rem; }
  .pp-band { padding-block: 10px 20px; }
  .pp-main { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .pp-media { max-width: 420px; width: 100%; margin-inline: auto; border-radius: 18px; }
  .pp-panel { border-radius: 18px; }
  .pp-spec { grid-template-columns: minmax(0, 1fr); }
  .pp-share { padding: 14px 16px; }
  .pp-share-btn { width: 100%; }
  .pp-share-act { flex: 1 1 100%; }
  .pp-bar { position: sticky; bottom: 0; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--border-strong); box-shadow: 0 -6px 18px rgb(64 38 160 / 0.10); }
  .pp-bar p { margin: 0; min-width: 0; }
  .pp-bar strong { font: 800 1.25rem var(--font-display); font-variant-numeric: tabular-nums; }
  .pp-bar span { font-size: 0.85rem; color: var(--muted); }
  .pp-bar .btn-buy { min-height: 46px; padding: 8px 18px; border-radius: 12px; flex: none; }
}
@media print { .pp-bar, .pp-share { display: none; } }
html.a11y-contrast .pp-band, html.a11y-contrast .pp-share { background: #fff; }
html.a11y-contrast .pp-panel, html.a11y-contrast .pp-media { box-shadow: none; border: 2px solid #000; }

/* ===== Parts by printer (R-60) ===== */
.prn-index { display: grid; gap: 26px; padding-block: 22px 36px; }
.prn-index h2 { margin: 0 0 10px; font: 800 1.15rem/1.3 var(--font-display); }
.prn-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.prn-tile { display: grid; justify-items: center; gap: 2px; height: 100%; padding: 12px 10px 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; text-align: center; transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease; }
.prn-tile:hover { border-color: #1e9e55; box-shadow: 0 10px 24px rgb(30 158 85 / 0.16); transform: translateY(-2px); }
.prn-tile img { width: 100%; max-width: 190px; height: auto; }
.prn-name { font: 800 1.05rem var(--font-display); }
.prn-count { font-size: 0.84rem; font-weight: 600; color: #0b5c2c; background: var(--green-soft); border-radius: 999px; padding: 2px 12px; }
.prn-tile.is-empty .prn-count { color: var(--muted); background: var(--surface-2); }
.prn-hero { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 22px; align-items: center; }
.prn-hero img { width: 100%; height: auto; background: #fff; border-radius: 22px; box-shadow: 0 18px 40px rgb(64 38 160 / 0.12); }
.prn-hero > div { display: grid; gap: 10px; min-width: 0; }
.prn-hero > div > * { margin: 0; }
.prn-hero h1 { font: 800 clamp(1.5rem, 4vw, 2.2rem)/1.2 var(--font-display); }
.prn-sub { color: var(--muted); font-weight: 600; }
.prn-cat h2 .n { font: 600 0.78rem var(--font-body); color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 1px 9px; }
.prn-cat h2:focus { outline: none; }
.prn-price { font: 800 1rem var(--font-display); font-variant-numeric: tabular-nums; }
.prn-flag { justify-self: start; font-size: 0.72rem; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--accent-2-soft); color: var(--accent-2-text); }
.prn-none { background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 18px; padding: 20px; text-align: center; }
.prn-none p { margin: 0; color: var(--muted); }
@media (max-width: 600px) {
  .prn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .prn-hero { grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: 12px; }
  .prn-hero img { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) { .prn-tile:hover { transform: none; } }
@media (max-width: 600px) { .site-nav a { padding: 0 7px; font-size: 0.9rem; } }

/* A description may hold one sentence and a few points, each on its own line (R-61) */
.spec dd, .pp-spec dd, .draft-table td { white-space: pre-line; }

/* Filament deals: the base price line inside "how to get the price" (R-64) */
.fil-base { margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); }

/* Community coupons page (R-62) */
.cc-label { margin: 0; font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.cc-card code { overflow-wrap: anywhere; font: 700 0.95rem var(--font-mono); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 6px; padding: 1px 8px; }

/* Community coupon inside a filament card, and the copy button's status (R-71) */
.fil-community { background: var(--green-soft); border-inline-start: 3px solid var(--green); }
.fil-community p { margin: 0; }
.fil-community-name { font-size: 0.82rem; color: var(--muted); }
.fil-community-price strong { font-family: var(--font-display); font-size: 1.05rem; }
.fil-how .coupon-code { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.fil-how .coupon-code code { overflow-wrap: anywhere; font: 700 0.95rem var(--font-mono); background: var(--surface); color: var(--text); border: 1px dashed var(--border-strong); border-radius: 6px; padding: 1px 8px; }
.fil-how .btn-copy { background: var(--surface); border-color: var(--border-strong); }
.copy-status { font-size: 0.82rem; color: var(--text); }
.fil-cc-link { font-weight: 700; }

/* ===== Filaments redesign (R-72): light cards in a grid, and a page for every filament ===== */
.fil-hero .container { padding-block: 14px 12px; gap: 4px; }
.fil-hero h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.fil-hero .lede { font-size: 0.95rem; }
.fil-hero .hero-art { height: 84px; top: 6px; translate: none; }
@media (max-width: 900px) { .fil-hero .hero-art { display: none; } .fil-hero h1, .fil-hero .lede { max-width: none; } }
.fil-cheapest h2 { font-size: 1rem; margin: 0 0 6px; }
.cheap-strip { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 8px; padding: 6px 6px 8px; }
.cheap-strip > li { flex: 0 0 172px; }
.cheap-item { height: 100%; padding: 6px 10px; border-top-width: 3px; }
.cheap-price { font-size: 1.05rem; }
.cheap-sub { font-size: 0.76rem; }
.fil-filters { gap: 8px; padding: 10px 12px; }
.fil-colors { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fil-colors[hidden] { display: none; }
.fil-colors .chips-label { margin: 0; flex: none; }
.fil-colors .chips { flex-wrap: nowrap; overflow-x: auto; padding: 6px; min-width: 0; }
.fil-colors .chip { flex: none; }
.fil-count { margin: 12px 0 10px; }
.fil-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .fil-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
.fil-card { position: relative; display: flex; flex-direction: column; height: 100%; border: 1px solid var(--border); border-top: 3px solid var(--accent-2); border-radius: 14px; box-shadow: none; transition: box-shadow 0.18s ease, border-color 0.18s ease; }
.fil-card:hover { border-color: var(--border-strong); border-top-color: var(--accent-2); box-shadow: 0 6px 18px rgb(64 38 160 / 0.09); }
.fil-card[data-kind="accessory"], .fil-card[data-kind="accessory"]:hover { border-top-color: var(--blue); }
.fil-media { aspect-ratio: 1; height: auto; background: #fff; border-bottom: 0; }
.fil-media img { width: 100%; max-width: none; height: 100%; padding: 10px; object-fit: contain; }
.fil-card .card-body { padding: 4px 12px 10px; gap: 5px; }
.fil-card .card-body p { margin: 0; }
.fil-card .card-title { margin: 0; font-size: 0.95rem; font-weight: 600; line-height: 1.35; min-height: 2.7em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fil-card .card-title a { color: inherit; text-decoration: none; }
.fil-card .card-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.fil-card:hover .card-title a { text-decoration: underline; text-underline-offset: 3px; }
.fil-card .card-title a:focus-visible { outline: none; }
.fil-card .card-title a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 14px; }
.fil-meta { font-size: 0.78rem; overflow-wrap: anywhere; }
.fil-price { margin-top: auto; padding-top: 2px; }
.fil-price .compact-price strong { font: 800 1.35rem/1.2 var(--font-display); }
.per-kg { font-size: 0.8rem; color: var(--accent-soft-text); font-weight: 600; }
.fil-deal { font-size: 0.8rem; font-weight: 600; color: var(--accent-soft-text); overflow-wrap: anywhere; }
.fil-ship { font-size: 0.8rem; color: var(--muted); }
.fil-ship.is-free, .fp-ship.is-free { color: var(--green); font-weight: 700; }
.fil-card .price-time { font-size: 0.74rem; }
.fil-card .card-buy { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; }
.fil-card .btn-buy { min-height: 40px; padding: 6px 12px; font-size: 0.86rem; border-radius: 10px; flex: none; }
.fil-card .aff-label { font-size: 0.7rem; }
.badge-cond::before { content: none; }
.badge-qty { font-size: 0.8rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--pink-soft); color: #8f1d55; }
@media (max-width: 600px) {
  .fil-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cheap-strip { display: flex; }
  .cheap-strip > li { flex-basis: 150px; }
  .fil-card .card-body { padding: 2px 10px 8px; gap: 4px; }
  .fil-card .card-title { font-size: 0.88rem; }
  .fil-price .compact-price strong { font-size: 1.15rem; }
  .fil-card .card-buy { flex-direction: column; align-items: stretch; gap: 2px; text-align: center; }
  .badge-good, .badge-cond, .badge-qty { font-size: 0.72rem; padding: 1px 6px; }
}
@media (max-width: 340px) { .fil-list { grid-template-columns: 1fr; } }

/* The page of one filament */
.fil-page { --dept: var(--accent-2); --dept-soft: var(--accent-2-soft); --dept-text: var(--accent-2-text); }
.fp-title { margin: 0 0 14px; font: 800 clamp(1.3rem, 3vw, 1.9rem)/1.25 var(--font-display); overflow-wrap: anywhere; }
.fp-ended { max-width: 560px; }
.fp-ended p { margin: 0 0 12px; }
.fp-meta { color: var(--muted); font-size: 0.95rem; }
.fp-ship { font-size: 0.95rem; color: var(--muted); }
.fil-page .pp-price .price-time { margin-top: 4px; font-size: 0.85rem; }
.fp-rest { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.fp-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.fp-box p { margin: 0 0 6px; }
.fp-box > :last-child { margin-bottom: 0; }
.fp-box ul { margin: 0 0 8px; padding-inline-start: 20px; }
.fp-steps { list-style: none; display: grid; gap: 8px; }
.fp-box .fp-steps { padding: 0; }
.fp-steps li { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.fp-steps strong { display: block; margin-bottom: 2px; }
.fp-qty { background: var(--pink-soft); border-inline-start: 4px solid var(--pink); }
.fp-community { background: var(--green-soft); border-inline-start: 4px solid var(--green); }
.fp-community .coupon-code { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.fp-community .coupon-code code { overflow-wrap: anywhere; font: 700 1rem var(--font-mono); background: var(--surface); color: var(--text); border: 1px dashed var(--border-strong); border-radius: 6px; padding: 2px 10px; }
.fp-community .btn-copy { background: var(--surface); border-color: var(--border-strong); }
.fp-back { font-weight: 700; display: inline-flex; align-items: center; min-height: 32px; }
@media (max-width: 760px) { .fp-rest { grid-template-columns: minmax(0, 1fr); } }
.fil-media { aspect-ratio: 4 / 3; }
@media (max-width: 760px) { .fil-page .pp-media { max-width: 240px; } }
.cheap-time { white-space: nowrap; }
#f-noprime[aria-pressed="true"]::before { content: "✓ "; }
.fil-card .card-cat { gap: 3px 4px; }
.fil-card .card-cat > span:first-child { flex-basis: 100%; }

/* ===== Home page (R-74): the deals lead ===== */
.home-hero .container { padding-block: 18px 16px; gap: 8px; }
.home-hero h1 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); max-width: none; }
.home-hero .lede { max-width: 70ch; }
.home-search { display: grid; gap: 4px; max-width: 620px; margin-top: 4px; }
.home-search label { font-weight: 700; font-size: 0.9rem; }
.home-search input { font: inherit; min-height: 50px; padding: 8px 16px; border: 2px solid var(--border-strong); border-radius: 14px; background: var(--surface); color: var(--text); width: 100%; }
.home-search input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--accent); }
.home-results { max-width: 620px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.home-results h2 { margin: 0 0 6px; font: 800 1rem var(--font-display); }
.home-results p { margin: 6px 0 10px; font-size: 0.9rem; }
.home-results p:last-child { margin-bottom: 0; }
.home-result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.home-result { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 4px 6px; border-radius: 10px; color: var(--text); text-decoration: none; }
.home-result:hover { background: var(--surface-2); color: var(--text); }
.home-result img { width: 48px; height: 48px; object-fit: contain; flex: none; background: #fff; border-radius: 8px; }
.home-result > span { display: grid; min-width: 0; }
.home-result strong { font-weight: 600; font-size: 0.92rem; overflow-wrap: anywhere; }
.home-result-kind { font-size: 0.78rem; color: var(--muted); }
.home-body { display: grid; gap: 26px; padding-block: 18px 36px; }
.home-doors ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.home-door { --c: var(--accent); --cs: var(--accent-soft); display: grid; justify-items: center; gap: 2px; height: 100%; padding: 14px 12px 16px; text-align: center; text-decoration: none; color: var(--text); background: linear-gradient(180deg, var(--cs), var(--surface) 70%); border: 1px solid var(--border); border-top: 4px solid var(--c); border-radius: 18px; transition: box-shadow 0.18s ease, transform 0.18s ease; }
.home-door:hover { color: var(--text); box-shadow: var(--shadow); transform: translateY(-2px); }
.home-door img { width: 110px; height: 80px; object-fit: contain; }
.home-door strong { font: 800 1.15rem/1.25 var(--font-display); }
.home-door span { font-size: 0.86rem; color: var(--muted); }
.door-fil { --c: var(--accent-2); --cs: var(--accent-2-soft); }
.door-parts { --c: var(--green); --cs: var(--green-soft); }
.door-coupons { --c: var(--pink); --cs: var(--pink-soft); }
.door-guides { --c: var(--blue); --cs: var(--blue-soft); }
.home-section { display: grid; gap: 10px; min-width: 0; }
.home-section > p { margin: 0; }
.home-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.home-head h2 { margin: 0; font: 800 1.35rem/1.25 var(--font-display); }
.home-head a { font-weight: 700; display: inline-flex; align-items: center; min-height: 32px; }
#home-deals .fil-list { gap: 12px; }
#home-deals .fil-card .card-buy { flex-direction: column; align-items: stretch; gap: 2px; text-align: center; }
.home-printers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.home-printer { display: grid; justify-items: center; gap: 2px; height: 100%; min-height: 44px; padding: 8px 6px 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; font: 700 0.92rem var(--font-display); }
.home-printer:hover { color: var(--text); border-color: var(--green); box-shadow: 0 6px 16px rgb(30 158 85 / 0.14); }
.home-printer img { width: 96px; max-width: 100%; height: auto; }
.home-coupons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.home-guides { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-guide { display: grid; gap: 4px; height: 100%; padding: 12px 14px; border: 1px solid var(--border); border-inline-start: 4px solid var(--blue); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; }
.home-guide:hover { color: var(--text); border-color: var(--blue); }
.home-guide strong { font: 700 1rem/1.3 var(--font-display); }
.home-guide span { font-size: 0.86rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-community a { font-weight: 700; }
@media (max-width: 1100px) { #home-deals .fil-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .home-doors ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .home-coupons, .home-guides { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
@media (max-width: 600px) {
  #home-deals .fil-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .home-door { padding: 10px 8px 12px; border-radius: 14px; }
  .home-door img { width: 84px; height: 60px; }
  .home-door strong { font-size: 1rem; }
  .home-door span { font-size: 0.8rem; }
  .home-head h2 { font-size: 1.2rem; }
  .home-printers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-body { gap: 20px; padding-block: 14px 28px; }
}
@media (prefers-reduced-motion: reduce) { .home-door:hover { transform: none; } }
@media (min-width: 1101px) { #home-deals .fil-list { grid-template-columns: repeat(auto-fit, minmax(170px, 250px)); } }
@media (max-width: 600px) {
  .home-door { grid-template-columns: 52px minmax(0, 1fr); justify-items: start; align-items: center; text-align: start; gap: 0 8px; min-height: 64px; padding: 6px 10px; }
  .home-door img { width: 52px; height: 40px; }
  .home-door span { display: none; }
}
#home-deals { background: var(--accent-2-soft); border-radius: 22px; padding: 18px; }
#home-deals .home-head h2 { font-size: 1.7rem; }
.home-door img { width: 88px; height: 64px; }
.home-door { padding: 10px 12px 12px; }
.home-community a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border: 2px solid var(--blue); border-radius: 999px; text-decoration: none; }
.guide:target { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 600px) {
  #home-deals { padding: 10px; border-radius: 16px; }
  #home-deals .home-head h2 { font-size: 1.35rem; }
  .home-door { padding: 6px 10px; }
  .home-door img { width: 52px; height: 40px; }
  .home-printers { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .home-printer { font-size: 0.82rem; padding: 6px 4px; }
  .home-printer img { width: 64px; }
}

/* ---------- Admin: the scanner section (R-73) ---------- */
#sc-actions, #sc-asin-actions { flex-wrap: wrap; }
#sc-fields fieldset { min-width: 0; margin: 0 0 14px; padding: 10px 14px 4px; border: 1px solid var(--border-strong); border-radius: 12px; }
#sc-fields legend { padding: 0 6px; font-weight: 700; }
#sc-fields small { display: block; margin-top: 4px; }
