/* Stout Auto Parts — THE SHELF (catalog / storefront)
   Self-contained: parts.html does NOT load main.css, so none of the scroll-film
   canvas/loader styling leaks into a page whose whole job is scannability.
   Palette + type per DESIGN.md (locked). */

:root {
  --ink: #0F1215;
  --ink-2: #171C21;
  --steel-800: #232930;
  --steel-600: #3C444D;
  --steel-500: #5C666F;
  --steel-300: #9AA4AD;
  --steel-200: #C6CCD2;
  --steel-100: #E3E7EA;
  --paper: #F2EFE9;
  --paper-2: #FAF8F4;
  --amber: #E89B2E;
  --amber-deep: #B26E14;
  --red: #E02128;
  --red-deep: #9A161B;
  --green: #2E7D52;

  --hd: 60px;      /* header height */
  --tb: 62px;      /* toolbar height */
  --rail: 268px;
  --maxw: 1560px;

  --disp: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, sans-serif;
  --serif: "Fraunces", Georgia, serif;

  --shadow-1: 0 1px 2px rgba(15, 18, 21, .06), 0 2px 8px rgba(15, 18, 21, .05);
  --shadow-2: 0 12px 40px rgba(15, 18, 21, .18);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  /* faint shop-paper tooth */
  background-image: repeating-linear-gradient(0deg, rgba(15,18,21,.014) 0 1px, transparent 1px 3px);
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.u-cond {
  font-family: var(--disp);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 2px; }

/* ============================================================ header */
#chrome {
  position: sticky; top: 0; z-index: 60;
  height: var(--hd);
  display: flex; align-items: center; gap: 18px;
  padding: 0 clamp(12px, 2.4vw, 26px);
  background: var(--ink);
  color: var(--paper-2);
  border-bottom: 1px solid #000;
}
#chrome .mark { display: flex; align-items: center; gap: 9px; color: var(--steel-200); }
#chrome .mark svg { width: 26px; height: 28px; flex: none; }
#chrome .word {
  font-family: var(--disp); font-weight: 700; font-size: 19px; letter-spacing: .09em;
  line-height: .95; color: var(--paper-2); display: flex; flex-direction: column;
}
#chrome .word small {
  font-size: 8.5px; letter-spacing: .3em; color: var(--red); font-weight: 600;
}
#chrome nav { display: flex; gap: 20px; margin-left: 10px; }
#chrome nav a {
  font-family: var(--disp); font-weight: 600; font-size: 13.5px;
  text-transform: uppercase; letter-spacing: .08em; color: var(--steel-300);
  padding: 6px 0; border-bottom: 2px solid transparent; transition: color .16s, border-color .16s;
}
#chrome nav a:hover { color: var(--paper-2); }
#chrome nav a[aria-current="page"] { color: var(--paper-2); border-bottom-color: var(--red); }
.hd-spacer { flex: 1; }

.hd-call {
  font-family: var(--disp); font-weight: 600; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--steel-200);
  border: 1px solid var(--steel-600); padding: 7px 13px; border-radius: 2px;
  transition: border-color .16s, color .16s;
}
.hd-call:hover { color: var(--paper-2); border-color: var(--steel-300); }

#cartBtn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff; border: 0; cursor: pointer;
  font-family: var(--disp); font-weight: 700; font-size: 13.5px; letter-spacing: .08em;
  text-transform: uppercase; padding: 9px 15px; border-radius: 2px;
  transition: background .16s;
}
#cartBtn:hover { background: var(--red-deep); }
#cartBtn .n {
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: rgba(0,0,0,.28); display: grid; place-items: center; font-size: 12px;
}

/* ============================================================ masthead */
.masthead {
  background: var(--ink-2); color: var(--steel-200);
  border-bottom: 3px solid var(--red);
  padding: clamp(20px, 3.4vw, 34px) clamp(14px, 2.4vw, 26px);
}
.masthead .in { max-width: var(--maxw); margin: 0 auto; }
.masthead h1 {
  font-family: var(--disp); font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; color: var(--paper-2);
  font-size: clamp(30px, 5.2vw, 54px); line-height: .95; margin: 0 0 10px;
}
.masthead h1 em { font-style: normal; color: var(--amber); }
.masthead p {
  margin: 0; max-width: 62ch; color: var(--steel-300); font-size: 15px;
}
.masthead p b { color: var(--steel-200); font-weight: 600; }
.mh-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 16px; }
.mh-stats div { display: flex; flex-direction: column; }
.mh-stats .v {
  font-family: var(--disp); font-weight: 700; font-size: 23px; color: var(--amber);
  line-height: 1;
}
.mh-stats .k {
  font-family: var(--disp); font-weight: 600; font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--steel-500); margin-top: 3px;
}

/* ============================================================ toolbar */
#toolbar {
  position: sticky; top: var(--hd); z-index: 50;
  background: var(--paper-2);
  border-bottom: 1px solid var(--steel-100);
  box-shadow: 0 1px 0 rgba(15,18,21,.04);
}
#toolbar .in {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 11px clamp(12px, 2.4vw, 26px);
}
.search {
  position: relative; flex: 1 1 380px; min-width: 0; max-width: 560px;
}
.search svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--steel-500); pointer-events: none;
}
.search input {
  width: 100%; height: 40px; padding: 0 34px 0 34px;
  background: #fff; border: 1px solid var(--steel-200); border-radius: 2px;
  font-size: 15px; transition: border-color .16s, box-shadow .16s;
}
.search input::placeholder { color: var(--steel-500); }
.search input:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(232,155,46,.22);
}
.search .clr {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border: 0; background: none; cursor: pointer;
  color: var(--steel-500); font-size: 17px; line-height: 1; border-radius: 2px;
}
.search .clr:hover { color: var(--ink); background: var(--steel-100); }

.tb-count {
  font-family: var(--disp); font-weight: 600; font-size: 13px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--steel-500); white-space: nowrap;
}
.tb-count b { color: var(--ink); font-weight: 700; }
.tb-spacer { flex: 1; }

.sel-wrap { position: relative; }
.sel-wrap select {
  appearance: none; height: 40px; padding: 0 32px 0 12px;
  background: #fff; border: 1px solid var(--steel-200); border-radius: 2px;
  font-family: var(--disp); font-weight: 600; font-size: 13.5px;
  text-transform: uppercase; letter-spacing: .05em; cursor: pointer;
}
.sel-wrap::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px;
  border-right: 2px solid var(--steel-500); border-bottom: 2px solid var(--steel-500);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
#filterToggle {
  display: none; align-items: center; gap: 7px; height: 40px; padding: 0 14px;
  background: var(--ink); color: var(--paper-2); border: 0; border-radius: 2px;
  font-family: var(--disp); font-weight: 700; font-size: 13.5px;
  text-transform: uppercase; letter-spacing: .06em; cursor: pointer;
}
#filterToggle .n {
  background: var(--red); border-radius: 9px; padding: 1px 7px; font-size: 11.5px;
}

/* ============================================================ layout */
.shell {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: var(--rail) 1fr; gap: 0;
  align-items: start;
}

/* ---------------------------------------------------------- filter rail */
#rail {
  position: sticky; top: calc(var(--hd) + var(--tb));
  max-height: calc(100vh - var(--hd) - var(--tb));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 20px clamp(12px, 1.6vw, 20px) 40px;
  border-right: 1px solid var(--steel-100);
}
.f-group { margin-bottom: 24px; }
.f-group > h3 {
  font-family: var(--disp); font-weight: 700; font-size: 11.5px; letter-spacing: .17em;
  text-transform: uppercase; color: var(--steel-500);
  margin: 0 0 9px; padding-bottom: 7px; border-bottom: 1px solid var(--steel-100);
}
.f-opt {
  display: flex; align-items: center; gap: 9px; padding: 5px 4px;
  cursor: pointer; border-radius: 2px; line-height: 1.25;
}
.f-opt:hover { background: rgba(15,18,21,.045); }
.f-opt input { accent-color: var(--red); width: 15px; height: 15px; margin: 0; flex: none; cursor: pointer; }
.f-opt .lbl { flex: 1; font-size: 14px; }
.f-opt .ct {
  font-family: var(--disp); font-weight: 600; font-size: 12px;
  color: var(--steel-500); font-variant-numeric: tabular-nums;
}
.f-opt input:checked ~ .lbl { font-weight: 600; }

.price-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.price-row input {
  width: 100%; min-width: 0; height: 34px; padding: 0 8px;
  border: 1px solid var(--steel-200); border-radius: 2px; background: #fff; font-size: 14px;
}
.price-row span { color: var(--steel-500); }

#clearAll {
  width: 100%; height: 36px; margin-top: 4px; cursor: pointer;
  background: none; border: 1px solid var(--steel-200); border-radius: 2px;
  font-family: var(--disp); font-weight: 600; font-size: 12.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--steel-500);
  transition: border-color .16s, color .16s;
}
#clearAll:hover { border-color: var(--ink); color: var(--ink); }

/* ---------------------------------------------------------- results */
#main { padding: 18px clamp(12px, 2.4vw, 26px) 80px; min-width: 0; }

/* Old part number → surviving listing. Reads as an explanation, not an error:
   nothing went wrong, the customer's number was a duplicate of this one. */
.alias-note {
  margin: 0 0 14px; padding: 10px 13px;
  border-left: 3px solid var(--amber); background: var(--paper-2);
  font-size: 14px; line-height: 1.5; color: var(--steel-500);
}
.alias-note b { color: var(--ink); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink); color: var(--paper-2); border: 0; cursor: pointer;
  font-family: var(--disp); font-weight: 600; font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; padding: 5px 9px; border-radius: 2px;
}
.chip b { color: var(--amber); font-weight: 700; }
.chip .x { color: var(--steel-300); font-size: 14px; line-height: 1; }
.chip:hover .x { color: #fff; }

#grid { display: flex; flex-direction: column; gap: 0; }

.row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 150px 128px 116px;
  align-items: center; gap: 16px;
  padding: 13px 14px;
  background: var(--paper-2);
  border: 1px solid var(--steel-100); border-top: 0;
  transition: background .13s, box-shadow .13s;
}
.row:first-child { border-top: 1px solid var(--steel-100); }
.row:hover { background: #fff; box-shadow: inset 3px 0 0 var(--amber); }

.r-pn {
  font-family: var(--disp); font-weight: 700; font-size: 14px; letter-spacing: .045em;
  color: var(--ink); background: var(--steel-100); border: 1px solid var(--steel-200);
  padding: 5px 7px; border-radius: 2px; text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.r-name { min-width: 0; }
.r-name .nm {
  font-weight: 600; font-size: 15.5px; line-height: 1.25; color: var(--ink);
  overflow-wrap: anywhere;
}
/* rows link to the part page now — underline on hover says "this goes somewhere" */
a.r-pn { display: block; }
a.r-pn:hover { border-color: var(--ink); }
a.nm:hover { text-decoration: underline; text-underline-offset: 3px; }
.r-name .meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px;
  font-family: var(--disp); font-weight: 600; font-size: 11.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--steel-500);
}
.r-name .meta .brand { color: var(--ink); }
.r-name .meta i { font-style: normal; color: var(--steel-200); }

.r-stock { display: flex; flex-direction: column; gap: 4px; }
.stock {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--disp); font-weight: 700; font-size: 12px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--green);
}
.stock .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.stock.low { color: var(--amber-deep); }
.stock.low .dot { background: var(--amber); }
.warr {
  font-family: var(--disp); font-weight: 600; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--steel-500);
}

.r-price { text-align: right; }
.r-price .now {
  font-family: var(--disp); font-weight: 700; font-size: 24px; line-height: 1; color: var(--ink);
}
.r-price .was {
  font-size: 12.5px; color: var(--steel-500); margin-top: 3px;
}
.r-price .was s { text-decoration-color: var(--red); }
.r-price .save { color: var(--red-deep); font-weight: 600; }
.pbadge {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 5px;
  font-family: var(--disp); font-weight: 700; font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; padding: 2px 6px; border-radius: 2px; cursor: help;
}
.pbadge.v { color: var(--amber-deep); background: rgba(232,155,46,.16); border: 1px solid rgba(232,155,46,.4); }
.pbadge.e { color: var(--steel-500); background: transparent; border: 1px dashed var(--steel-300); }

.r-add {
  height: 40px; width: 100%; cursor: pointer;
  background: var(--ink); color: var(--paper-2); border: 0; border-radius: 2px;
  font-family: var(--disp); font-weight: 700; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; transition: background .14s, transform .08s;
}
.r-add:hover { background: var(--red); }
.r-add:active { transform: translateY(1px); }
.r-add.added { background: var(--green); }

#sentinel { height: 1px; }
#more {
  display: block; margin: 22px auto 0; padding: 13px 30px; cursor: pointer;
  background: none; border: 1px solid var(--steel-300); border-radius: 2px;
  font-family: var(--disp); font-weight: 700; font-size: 13.5px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink);
}
#more:hover { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }

.empty { padding: 70px 20px; text-align: center; color: var(--steel-500); }
.empty h3 {
  font-family: var(--serif); font-weight: 500; font-size: 25px; color: var(--ink);
  margin: 0 0 8px;
}

/* ============================================================ cart drawer */
#scrim {
  position: fixed; inset: 0; z-index: 80; background: rgba(15,18,21,.55);
  opacity: 0; pointer-events: none; transition: opacity .25s;
  backdrop-filter: blur(2px);
}
#scrim.on { opacity: 1; pointer-events: auto; }

#cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
  width: min(440px, 100vw); background: var(--paper-2);
  display: flex; flex-direction: column;
  transform: translateX(101%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-2);
}
#cart.on { transform: none; }
.cart-hd {
  display: flex; align-items: center; gap: 12px; flex: none;
  padding: 16px 18px; background: var(--ink); color: var(--paper-2);
}
.cart-hd h2 {
  margin: 0; flex: 1; font-family: var(--disp); font-weight: 700; font-size: 18px;
  letter-spacing: .07em; text-transform: uppercase;
}
.cart-hd button {
  background: none; border: 0; color: var(--steel-300); font-size: 24px;
  line-height: 1; cursor: pointer; padding: 2px 6px;
}
.cart-hd button:hover { color: #fff; }

.cart-body { flex: 1; overflow-y: auto; padding: 14px 18px; }
.ci {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  padding: 13px 0; border-bottom: 1px solid var(--steel-100);
}
.ci .nm { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.ci .pn {
  font-family: var(--disp); font-weight: 600; font-size: 11.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--steel-500); margin-top: 2px;
}
.ci .amt { font-family: var(--disp); font-weight: 700; font-size: 17px; text-align: right; }
.ci .qty { display: flex; align-items: center; gap: 4px; margin-top: 7px; }
.ci .qty button {
  width: 27px; height: 27px; cursor: pointer; background: #fff;
  border: 1px solid var(--steel-200); border-radius: 2px; font-size: 15px; line-height: 1;
}
.ci .qty button:hover { border-color: var(--ink); }
.ci .qty span {
  min-width: 30px; text-align: center; font-family: var(--disp); font-weight: 700; font-size: 15px;
}
.ci .rm {
  background: none; border: 0; cursor: pointer; padding: 0; margin-left: 6px;
  font-family: var(--disp); font-weight: 600; font-size: 11.5px; letter-spacing: .07em;
  text-transform: uppercase; color: var(--steel-500); text-decoration: underline;
}
.ci .rm:hover { color: var(--red); }

.cart-empty { text-align: center; color: var(--steel-500); padding: 56px 10px; }

.cart-ft { flex: none; padding: 16px 18px; border-top: 1px solid var(--steel-100); background: var(--paper); }
.cart-tot {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px;
}
.cart-tot .k {
  font-family: var(--disp); font-weight: 700; font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--steel-500);
}
.cart-tot .v { font-family: var(--disp); font-weight: 700; font-size: 28px; }
.cart-note { font-size: 12.5px; color: var(--steel-500); margin: 0 0 12px; line-height: 1.4; }
.btn-primary {
  display: block; width: 100%; padding: 14px; cursor: pointer; text-align: center;
  background: var(--red); color: #fff; border: 0; border-radius: 2px;
  font-family: var(--disp); font-weight: 700; font-size: 15px; letter-spacing: .09em;
  text-transform: uppercase; transition: background .16s;
}
.btn-primary:hover { background: var(--red-deep); }
.btn-primary:disabled { background: var(--steel-300); cursor: not-allowed; }

.rq { display: grid; gap: 9px; margin-bottom: 12px; }
.rq label {
  font-family: var(--disp); font-weight: 600; font-size: 11px; letter-spacing: .11em;
  text-transform: uppercase; color: var(--steel-500); display: block; margin-bottom: 3px;
}
.rq input, .rq textarea {
  width: 100%; padding: 9px 10px; background: #fff;
  border: 1px solid var(--steel-200); border-radius: 2px; font-size: 14.5px;
}
.rq textarea { resize: vertical; min-height: 62px; }
.rq input:focus, .rq textarea:focus { outline: none; border-color: var(--ink); }
.back {
  background: none; border: 0; cursor: pointer; padding: 8px 0 0;
  font-family: var(--disp); font-weight: 600; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--steel-500); text-decoration: underline;
  display: block; margin: 0 auto;
}

.ok { padding: 30px 6px; text-align: center; }
.ok .tick {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--green); color: #fff; display: grid; place-items: center; font-size: 27px;
}
.ok h3 { font-family: var(--serif); font-weight: 500; font-size: 23px; margin: 0 0 8px; }
.ok p { color: var(--steel-500); font-size: 14px; margin: 0 0 6px; }

/* ============================================================ toast */
#toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s;
  background: var(--ink); color: var(--paper-2);
  padding: 11px 20px; border-radius: 2px; box-shadow: var(--shadow-2);
  font-family: var(--disp); font-weight: 600; font-size: 13.5px;
  letter-spacing: .06em; text-transform: uppercase;
  border-left: 3px solid var(--amber);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================ footer */
.foot {
  background: var(--ink); color: var(--steel-500);
  padding: 34px clamp(14px, 2.4vw, 26px);
  font-size: 13px; line-height: 1.6;
}
.foot .in { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 16px; }
.foot a { color: var(--steel-200); text-decoration: underline; }
.foot strong { color: var(--steel-200); font-weight: 600; }
.foot .legal { max-width: 88ch; }

/* ============================================================ responsive */
@media (max-width: 1180px) {
  .row { grid-template-columns: 116px minmax(0, 1fr) 130px 116px 104px; gap: 12px; }
}

@media (max-width: 980px) {
  :root { --rail: 0px; }
  .shell { grid-template-columns: 1fr; }
  #filterToggle { display: inline-flex; }
  #chrome nav { display: none; }

  #rail {
    position: fixed; inset: 0 0 0 auto; z-index: 90;
    width: min(330px, 88vw); max-height: none; height: 100%;
    background: var(--paper-2); border-right: 0; box-shadow: var(--shadow-2);
    transform: translateX(101%); transition: transform .28s cubic-bezier(.4,0,.2,1);
    padding-top: 16px;
  }
  #rail.on { transform: none; }
  #railClose { display: block !important; }

  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "pn price" "name price" "stock add";
    row-gap: 9px; padding: 15px 14px;
  }
  .r-pn { grid-area: pn; justify-self: start; }
  .r-name { grid-area: name; }
  .r-stock { grid-area: stock; }
  .r-price { grid-area: price; }
  .r-add { grid-area: add; width: auto; padding: 0 22px; justify-self: end; }
}

@media (max-width: 560px) {
  #toolbar .in { flex-wrap: wrap; }
  .search { flex: 1 1 100%; order: -1; }
  .tb-count { font-size: 12px; }
  #chrome .hd-call { display: none; }
  .masthead h1 { font-size: clamp(26px, 8vw, 40px); }
  .r-price .now { font-size: 21px; }
}

#railClose {
  display: none; width: 100%; height: 38px; margin-bottom: 14px; cursor: pointer;
  background: var(--ink); color: var(--paper-2); border: 0; border-radius: 2px;
  font-family: var(--disp); font-weight: 700; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ============================================================ product page
   part.html — the app dialect: same tokens, spec-sheet energy. The page argues
   fitment and provenance with data; there is deliberately no photography. */
.pdp { max-width: 1120px; margin: 0 auto; padding: 26px clamp(14px, 3vw, 30px) 90px; }

.crumbs {
  display: flex; gap: 8px; align-items: center; margin-bottom: 18px;
  font-family: var(--disp); font-size: 12.5px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--steel-500);
}
.crumbs a { color: var(--steel-500); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs b { color: var(--ink); }

.pdp-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(20px, 3.5vw, 44px); align-items: start;
}

/* --- left column --- */
.pn-plate {
  display: inline-flex; flex-direction: column; gap: 2px;
  background: var(--ink); color: var(--paper-2);
  padding: 14px 18px 12px; border-radius: 3px;
  border-left: 4px solid var(--amber);
}
.pn-label {
  font-family: var(--disp); font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel-300);
}
.pn-plate h1 {
  font-family: var(--disp); font-weight: 700; letter-spacing: .02em;
  font-size: clamp(24px, 4vw, 34px); line-height: 1; margin: 0;
}
.pn-brand {
  font-family: var(--disp); font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--amber);
}
.pdp-name {
  font-family: var(--serif); font-weight: 500; font-style: italic;
  font-size: clamp(20px, 3vw, 27px); color: var(--ink); margin: 14px 0 20px;
}

.spec-table { margin: 0 0 26px; border-top: 1px solid var(--steel-200); }
.spec-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px;
  padding: 9px 2px; border-bottom: 1px solid var(--steel-200); }
.spec-row dt {
  font-family: var(--disp); font-size: 12px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--steel-500);
  padding-top: 1px;
}
.spec-row dd { margin: 0; font-size: 14.5px; color: var(--ink); }

.fit-block h3, .rail-block h3 {
  font-family: var(--disp); font-size: 17px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; margin: 0 0 6px;
}
.fit-sub, .rail-sub { font-size: 14px; color: var(--steel-500); margin: 0 0 12px; line-height: 1.55; }
.fit-sub b { color: var(--ink); }
.fit-table-wrap { overflow-x: auto; }
.fit-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fit-table th {
  text-align: left; font-family: var(--disp); font-size: 11.5px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; color: var(--steel-500);
  padding: 7px 10px; border-bottom: 2px solid var(--ink); white-space: nowrap;
}
.fit-table td { padding: 7px 10px; border-bottom: 1px solid var(--steel-200); }
.fit-table tbody tr:nth-child(odd) { background: var(--paper-2); }

.honesty { margin-top: 26px; border-top: 1px solid var(--steel-200); padding-top: 6px; }
.honesty p { font-size: 14px; line-height: 1.6; color: var(--steel-600, #4a545e); margin: 12px 0 0; }
.honesty b { color: var(--ink); }

/* --- buy box --- */
.buybox {
  position: sticky; top: calc(var(--hd) + 16px);
  background: #fff; border: 1px solid var(--steel-200); border-radius: 4px;
  box-shadow: var(--shadow-1); padding: 20px;
}
.bb-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bb-price .now { font-family: var(--disp); font-weight: 700; font-size: 38px; line-height: 1; }
.bb-price .was { font-size: 14px; color: var(--steel-500); }
.bb-price .was b { color: var(--red); font-weight: 700; }
.bb-badges { display: flex; gap: 8px; align-items: center; margin: 10px 0 12px; }
.bb-badges .warr {
  font-family: var(--disp); font-size: 11.5px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--steel-500);
}
.bb-stock { margin-bottom: 14px; }
.bb-stock .stock.out .dot { background: var(--red); }

.bb-fulfill { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ff-opt {
  display: flex; flex-direction: column; gap: 1px;
  border: 1px solid var(--steel-200); border-radius: 3px; padding: 9px 12px;
}
.ff-opt b { font-family: var(--disp); font-size: 13.5px; letter-spacing: .03em; text-transform: uppercase; }
.ff-opt span { font-size: 12.5px; color: var(--steel-500); }
.ff-opt.free { border-color: var(--green); }
.ff-opt.free b { color: var(--green); }
.ff-opt.xonly { border-color: var(--amber); background: var(--paper-2); }
.ff-opt.xonly b { color: var(--amber-deep, #b26f0e); }

.bb-add {
  width: 100%; border: 0; cursor: pointer; border-radius: 3px;
  background: var(--ink); color: var(--paper-2);
  font-family: var(--disp); font-weight: 700; font-size: 15px;
  letter-spacing: .08em; text-transform: uppercase; padding: 14px;
  transition: background .16s;
}
.bb-add:hover { background: var(--ink-2, #171C21); }
.bb-add:disabled { background: var(--steel-300); cursor: not-allowed; }
.bb-add.as-link { display: inline-block; width: auto; text-decoration: none; padding: 14px 22px; }
.bb-viewcart {
  display: block; text-align: center; margin-top: 10px;
  font-family: var(--disp); font-size: 13px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; color: var(--ink);
}
.bb-fine { font-size: 12.5px; color: var(--steel-500); line-height: 1.55; margin: 14px 0 0; }
.bb-fine a { color: var(--ink); }

/* --- same-box rail --- */
.rail-block { margin-top: 46px; border-top: 2px solid var(--ink); padding-top: 18px; }
.rail-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.rail-card {
  display: flex; flex-direction: column; gap: 3px; text-decoration: none;
  background: #fff; border: 1px solid var(--steel-200); border-radius: 4px;
  padding: 13px 14px; transition: border-color .15s, box-shadow .15s;
}
.rail-card:hover { border-color: var(--ink); box-shadow: var(--shadow-1); }
.rc-pn { font-family: var(--disp); font-weight: 700; font-size: 14px; color: var(--ink); }
.rc-name { font-size: 13px; color: var(--steel-600, #4a545e); }
.rc-meta { font-size: 11.5px; color: var(--steel-500); text-transform: uppercase; letter-spacing: .05em; font-family: var(--disp); }
.rc-price { font-family: var(--disp); font-weight: 700; font-size: 16px; margin-top: 4px; }

/* --- header cart link (PDP has no drawer; it hands off to /parts) --- */
.hd-cartlink {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-family: var(--disp); font-weight: 600; font-size: 13.5px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--paper-2);
  border: 1px solid var(--steel-500); border-radius: 3px; padding: 7px 12px;
}
.hd-cartlink .n {
  background: var(--amber); color: var(--ink); border-radius: 10px;
  font-size: 11.5px; font-weight: 700; padding: 1px 7px;
}

/* --- not-found --- */
.pdp-missing { text-align: center; padding-top: 70px; }
.pdp-missing h1 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 30px; }
.pdp-missing p { color: var(--steel-500); max-width: 46ch; margin: 10px auto 22px; line-height: 1.6; }

@media (max-width: 860px) {
  .pdp-grid { grid-template-columns: 1fr; }
  .buybox { position: static; }
  .spec-row { grid-template-columns: 120px 1fr; }
}

/* ============================================================ store pages
   order.html / returns.html / admin.html — the narrow app-page dialect. */
.page-narrow { max-width: 640px; margin: 0 auto; padding: 34px clamp(14px, 3vw, 30px) 90px; }
.pg-title { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(26px, 4vw, 34px); margin: 0 0 8px; }
.pg-sub { color: var(--steel-500); line-height: 1.6; margin: 0 0 18px; }
.pg-sub b { color: var(--ink); }
.page-narrow h2 {
  font-family: var(--disp); font-size: 16px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; margin: 28px 0 10px; border-top: 2px solid var(--ink); padding-top: 14px;
}

.sform { display: flex; flex-direction: column; gap: 14px; }
.sform label {
  display: flex; flex-direction: column; gap: 5px;
  font-family: var(--disp); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--steel-500);
}
.sform input, .sform textarea {
  border: 1px solid var(--steel-200); border-radius: 2px; background: #fff;
  padding: 10px 12px; font-size: 15px; font-family: var(--body); letter-spacing: normal; text-transform: none;
}
.sform input:focus, .sform textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(232,155,46,.22);
}
.form-err { color: var(--red-deep); font-size: 14px; margin: 0; }
.form-ok { color: var(--green); font-size: 14.5px; line-height: 1.55; margin: 0; }
.bb-add.sm { width: auto; padding: 9px 16px; font-size: 13px; }
.hd-call.as-btn { background: none; border: 1px solid var(--steel-200); color: var(--ink); cursor: pointer; }

.policy-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; line-height: 1.55; }
.policy-list b { font-weight: 600; }
.policy-list a { text-decoration: underline; text-underline-offset: 2px; }

/* order status view */
.order-view { margin-top: 26px; background: #fff; border: 1px solid var(--steel-200); border-radius: 4px; padding: 18px 20px; }
.ov-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ov-head b { font-family: var(--disp); font-weight: 700; font-size: 20px; letter-spacing: .04em; }
.ov-status {
  font-family: var(--disp); font-size: 11.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 2px;
  background: var(--steel-100); color: var(--steel-500);
}
.ov-status[data-s="paid"], .ov-status[data-s="ready"], .ov-status[data-s="shipped"], .ov-status[data-s="picked_up"] { background: #E7F2EB; color: var(--green); }
.ov-status[data-s="expired"], .ov-status[data-s="canceled"] { background: #FBEAEA; color: var(--red-deep); }
.ov-timeline { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ov-timeline li { padding-left: 22px; position: relative; color: var(--steel-500); font-size: 14.5px; }
.ov-timeline li::before {
  content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--steel-200);
}
.ov-timeline li.done::before, .ov-timeline li.on::before { background: var(--green); }
.ov-timeline li.on { color: var(--ink); font-weight: 600; }
.ov-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--steel-100); font-size: 14.5px; }
.ov-total { font-family: var(--disp); font-weight: 700; margin: 10px 0 0; }
.ov-track { margin: 8px 0 0; }

/* admin board */
.admin .page-narrow { max-width: 760px; }
.adm-card { background: #fff; border: 1px solid var(--steel-200); border-radius: 4px; padding: 14px 16px; margin-bottom: 12px; }
.adm-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-top b { font-family: var(--disp); font-size: 17px; letter-spacing: .04em; }
.adm-mode { font-family: var(--disp); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-deep); }
.adm-when { margin-left: auto; font-size: 12px; color: var(--steel-500); }
.adm-cust { font-size: 13.5px; color: var(--steel-600); margin: 6px 0; line-height: 1.5; }
.adm-tot { font-family: var(--disp); font-weight: 700; margin-top: 6px; }
.adm-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.adm-track { flex: 1 1 160px; border: 1px solid var(--steel-200); border-radius: 2px; padding: 8px 10px; font-size: 14px; }
