/* Potomac Shop, Rix Racing theme. Colours and type follow DSM Legacy: Orbitron over Roboto, a deep
   navy base, red and yellow accents. Rix's slate blue is the quiet accent. */
:root {
  --bg: #0f172a;
  --surface: #111827;
  --surface-alt: #1f2937;
  --line: #334155;
  --text: #f8fafc;
  --muted: #cbd5f5;
  --red: #f87171;
  --red-deep: #ef4444;
  --yellow: #facc15;
  --slate: #557b97;
  --good: #4ade80;
  --radius: 10px;
  --heading: 'Orbitron', system-ui, sans-serif;
  --body: 'Roboto', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); }
a { color: var(--yellow); }
a:hover { color: #fde68a; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--heading); letter-spacing: 0.02em; line-height: 1.2; }
h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); margin: 0 0 0.6rem; }
h2 { font-size: 1.15rem; text-transform: uppercase; margin: 1.6rem 0 0.6rem; }
h3 { font-size: 0.95rem; margin: 0.6rem 0 0.2rem; font-family: var(--body); font-weight: 500; letter-spacing: 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--yellow); color: #111; padding: 0.4rem 0.8rem; z-index: 9; }
.quiet { color: var(--muted); font-size: 0.92rem; }
.good { color: var(--good); }
.warn-text { color: var(--yellow); }

.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.9rem clamp(1rem, 4vw, 2.5rem); background: #0b1222; border-bottom: 3px solid var(--red-deep); position: sticky; top: 0; z-index: 5; }
.brand { font-family: var(--heading); font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: 0.08em; text-transform: uppercase; }
.brand-mark { background: var(--red-deep); color: #fff; padding: 0.15rem 0.45rem; border-radius: 4px; margin-right: 0.35rem; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; align-items: center; }
.top nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.top nav a:hover, .top nav a[aria-current] { color: var(--yellow); }
.demo-bar { margin: 0; padding: 0.5rem clamp(1rem, 4vw, 2.5rem); background: var(--slate); color: #fff; font-size: 0.9rem; }
.demo-bar a { color: #fff; font-weight: 700; }
main { padding: 0 clamp(1rem, 4vw, 2.5rem) 3rem; max-width: 1200px; margin: 0 auto; }
.foot { border-top: 1px solid var(--line); padding: 1.5rem clamp(1rem, 4vw, 2.5rem); color: var(--muted); font-size: 0.92rem; }
.foot p { margin: 0.2rem 0; }

.hero { padding: clamp(2.5rem, 8vw, 5rem) 0 2rem; background: radial-gradient(60rem 30rem at 85% -10%, rgba(239, 68, 68, 0.22), transparent 60%); }
.eyebrow { font-family: var(--heading); text-transform: uppercase; letter-spacing: 0.18em; color: var(--red); font-size: 0.78rem; margin: 0 0 0.6rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }

.picker { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 1.2rem 0; }
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); flex: 1 1 12rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.7rem; min-height: 2.75rem; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
button, .button { font: 600 0.95rem var(--body); background: var(--red-deep); color: #fff; border: 0; border-radius: 8px; padding: 0.7rem 1.2rem; min-height: 2.75rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; }
button:hover, .button:hover { background: #dc2626; color: #fff; }
button.small, .button.small { padding: 0.4rem 0.75rem; min-height: 2.3rem; font-size: 0.85rem; background: var(--surface-alt); border: 1px solid var(--line); }
button.small.primary { background: var(--red-deep); border-color: var(--red-deep); }
button.link { background: none; padding: 0; min-height: 0; color: var(--text); font-weight: 400; }
button[disabled] { opacity: 0.5; cursor: not-allowed; }

.section { padding: 1.5rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--line); }
.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); gap: 1rem; }
.card a { display: block; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem; color: var(--text); text-decoration: none; transition: border-color 0.15s; }
.card a:hover { border-color: var(--red); }
.card-image { aspect-ratio: 1; background: #fff; border-radius: 6px; overflow: hidden; display: grid; place-items: center; }
.card-image img { width: 100%; height: 100%; object-fit: contain; }
.no-photo { color: #475569; font-size: 0.85rem; }
.no-photo.big { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--surface-alt); color: var(--muted); border-radius: var(--radius); }
.price { font-weight: 700; color: var(--yellow); margin: 0.2rem 0; }
.price s { color: var(--muted); font-weight: 400; }
.price.big { font-size: 1.6rem; font-family: var(--heading); }
.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.3rem 0 0; }
.tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid var(--slate); color: #bfdbfe; padding: 0.1rem 0.4rem; border-radius: 4px; }
.tag-quiet { border-color: var(--line); color: var(--muted); }
.tag-sold { border-color: var(--red); color: var(--red); }
.empty { color: var(--muted); padding: 2rem 0; }

.part { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem; padding-top: 2rem; }
@media (max-width: 760px) { .part { grid-template-columns: 1fr; } }
.gallery { display: grid; gap: 0.6rem; }
.gallery img { background: #fff; border-radius: var(--radius); width: 100%; }
.stock { color: var(--good); font-weight: 500; }
.stock.gone { color: var(--red); }
.fits { padding-left: 1.1rem; }
.fits.small { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* Dashboard */
.admin-main { max-width: 960px; padding-top: 1.2rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1rem 0; }
.panel h2 { margin-top: 0.2rem; }
.panel.warn { border-color: var(--yellow); }
.panel.narrow { max-width: 26rem; margin: 3rem auto; }
.form { display: grid; gap: 0.9rem; }
.cols { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hint { margin: -0.4rem 0 0; color: var(--muted); font-size: 0.82rem; }
.notice { background: #14532d; border: 1px solid var(--good); padding: 0.7rem 1rem; border-radius: 8px; }
.problem { background: #450a0a; border: 1px solid var(--red); padding: 0.7rem 1rem; border-radius: 8px; }
.demo-login { background: var(--surface-alt); border-left: 4px solid var(--yellow); padding: 0.6rem 0.8rem; border-radius: 6px; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.8rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem; color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.stat span { display: block; font: 700 1.8rem var(--heading); color: var(--text); }
.stat:hover { border-color: var(--red); }
.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0; }
.tabs a { padding: 0.35rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 0.88rem; }
.tabs a[aria-current] { background: var(--red-deep); border-color: var(--red-deep); }
.search { display: flex; gap: 0.5rem; }
.rows { list-style: none; padding: 0; margin: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.thumb { width: 3.5rem; height: 3.5rem; flex: none; background: #fff; border-radius: 6px; overflow: hidden; display: grid; place-items: center; font-size: 0.65rem; color: #475569; text-decoration: none; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.row-main { flex: 1 1 14rem; min-width: 0; }
.row-main p { margin: 0.15rem 0 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.row-actions.big { margin: 0.4rem 0 0.8rem; }
.inline { display: inline; margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-bottom: 1rem; }
.badge { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.1rem 0.45rem; border-radius: 4px; border: 1px solid var(--line); }
.badge-active { border-color: var(--good); color: var(--good); }
.badge-draft { border-color: var(--yellow); color: var(--yellow); }
.badge-held { border-color: var(--slate); color: #bfdbfe; }
.badge-sold { border-color: var(--red); color: var(--red); }
.activity { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.activity li { padding: 0.3rem 0; border-bottom: 1px dashed var(--line); }
.preview { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.preview th, .preview td { text-align: left; padding: 0.45rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.preview tr.skip { opacity: 0.75; }
.copy { font-family: ui-monospace, monospace; font-size: 0.85rem; }
code { background: var(--bg); padding: 0.2rem 0.4rem; border-radius: 4px; word-break: break-all; }
details { margin: 0.6rem 0 1rem; }
summary { cursor: pointer; color: var(--yellow); }
