/* The engine-rebuilders template (payboxtimers.com/car-chargers look): DM Sans
   everywhere, JetBrains Mono for small uppercase labels and part numbers,
   white surfaces, neutral text and rules, blue as the primary accent and
   emerald as the second, 8px corners, 72rem content width. Every colour is a
   token in :root. */
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-latin.woff2") format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-latin.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --font-sans: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ink: #171717;        /* neutral-900 */
  --ink-2: #525252;      /* neutral-600 */
  --muted: #737373;      /* neutral-500 */
  --faint: #a3a3a3;      /* neutral-400 */
  --line: #e5e5e5;       /* neutral-200 */
  --line-2: #f5f5f5;     /* neutral-100 */
  --bg: #fff;
  --bg-2: #fafafa;       /* neutral-50 */
  --blue: #3b82f6;       /* blue-500 */
  --blue-ink: #2563eb;   /* blue-600 */
  --blue-dark: #1d4ed8;  /* blue-700 */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --green: #10b981;      /* emerald-500 */
  --green-ink: #059669;  /* emerald-600 */
  --green-700: #047857;
  --ok-bg: #ecfdf5; --ok-ink: #047857; --ok-line: #a7f3d0;
  --err-bg: #fef2f2; --err-ink: #b91c1c; --err-line: #fecaca;
  --radius: 8px;
  --max: 72rem;
  --gutter: 24px;
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--blue-ink); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.025em; color: var(--ink); }
h1, h2 { font-size: 1.875rem; font-weight: 700; }
h2 { margin-top: 2.5rem; }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; }
h4 { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
@media (min-width: 48rem) { h1, h2 { font-size: 2.25rem; } }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hl-blue { color: var(--blue); }
.hl-green { color: var(--green-ink); }
code { font: .95em var(--font-mono); background: var(--bg-2); padding: .1em .35em; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Eyebrow label: a short rule, then mono uppercase text. */
.kicker {
  display: flex; align-items: center; gap: .75rem;
  font: 500 .75rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .25em;
  color: var(--blue-ink); margin-bottom: 1rem;
}
.kicker::before { content: ""; width: 2rem; height: 1px; background: var(--blue); flex: none; }
.kicker-green { color: var(--green-700); }
.kicker-green::before { background: var(--green); }
/* Badge: a pill with a pulsing dot. */
.badge {
  display: inline-flex; align-items: center; gap: .5rem; padding: .375rem .75rem; margin-bottom: 1rem;
  border-radius: 999px; border: 1px solid rgba(59, 130, 246, .3); background: var(--blue-50);
  font: 400 .75rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .2em; color: var(--blue-ink);
}
.badge-dot { width: .375rem; height: .375rem; border-radius: 50%; background: var(--blue); animation: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.lead { font-size: 1.125rem; line-height: 1.625; color: var(--muted); max-width: 48rem; }
@media (min-width: 48rem) { .lead { font-size: 1.25rem; } }

/* Menu bar: brand and page links from the left, phone and WhatsApp at the right. */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line-2); }
.menubar {
  max-width: var(--max); margin: 0 auto; padding: .6rem var(--gutter);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.125rem; display: inline-flex; align-items: center; gap: .4rem; margin-right: .5rem; transition: opacity .15s; }
.brand:hover { opacity: .8; }
.brand-mark { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 6px; background: var(--blue-ink); color: #fff; font-size: 1rem; font-weight: 700; line-height: 1; }
.top-links { display: flex; gap: .5rem; flex-wrap: wrap; margin-left: auto; }
.top-links .btn { padding: .45rem .85rem; font-size: .8125rem; }
@media (max-width: 52rem) {
  .menubar { gap: .6rem; }
  .top-links { width: 100%; margin-left: 0; }
  .top-links .btn { flex: 1; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.25rem; border-radius: var(--radius); border: 1px solid transparent;
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn svg { width: 1.25em; height: 1.25em; }
.btn-pay { background: var(--blue-ink); color: #fff; border-color: var(--blue-ink); }
.btn-pay:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
/* The phone number in the menu bar: white with black text (owner request 2026-10-19). */
.btn-call { background: #fff; color: #000; border-color: var(--line); }
.btn-call:hover { background: var(--bg-2); color: #000; border-color: var(--line); }
.btn-quiet, .btn-wa { background: var(--bg); color: var(--ink); border-color: var(--line); }
.btn-quiet:hover, .btn-wa:hover { border-color: var(--blue-300); color: var(--blue-ink); }
.btn-wide { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, .35); }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 3rem; }
main.narrow { max-width: 42rem; padding-top: 2rem; }

.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin-top: 1.25rem; }
.card {
  display: flex; flex-direction: column; gap: .35rem;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: var(--bg);
  transition: border-color .3s, box-shadow .3s;
}
.card:hover { border-color: var(--blue-300); box-shadow: var(--shadow-lg); }
.card p { margin: 0; }

/* Home intro. */
.hero { padding: 2rem 0 .5rem; }
.hero .lead { max-width: 48rem; }
.hero .band-cta { justify-content: flex-start; margin-top: 1.5rem; }
.hero-call { margin-top: 1rem; color: var(--muted); }
.hero-call a { font-weight: 500; }
.band-cta { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.25rem; }


.contact { padding-top: 1rem; scroll-margin-top: 5rem; }
.contact-wrap { max-width: var(--max); margin: 1rem auto 0; padding: 0 var(--gutter) 3rem; }
.contact-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
@media (min-width: 52rem) { .contact-grid { grid-template-columns: 1fr 1.6fr; } }
.contact-ways { display: grid; gap: .75rem; align-content: start; }
.way { display: grid; gap: .2rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--bg); transition: border-color .3s, box-shadow .3s; }
a.way:hover { border-color: var(--blue-300); box-shadow: var(--shadow-lg); }
.way-k { font: 500 .6875rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .2em; color: var(--blue-ink); }
.way-v { font-size: 1.125rem; font-weight: 600; }
/* The WhatsApp card shows the WhatsApp logo instead of its label (owner request 2026-10-19). */
.way-logo { display: block; height: 1.75rem; width: auto; }
/* Phone and WhatsApp in one card (owner request 2026-10-19): the number calls, the logo opens WhatsApp. */
.way-phone { gap: .35rem; }
.way-phone .way-v { color: var(--ink); text-decoration: none; justify-self: start; }
.way-phone .way-v:hover { color: var(--blue-ink); }
.way-wa { display: inline-flex; align-items: center; gap: .5rem; justify-self: start; margin-top: .25rem; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; transition: border-color .2s, box-shadow .2s; }
.way-wa:hover { border-color: #25d366; box-shadow: var(--shadow-lg); }
.contact-form { display: grid; gap: .9rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.contact-form label { display: grid; gap: .35rem; font-weight: 500; font-size: .875rem; color: var(--ink); }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.contact-form .two { display: grid; gap: .9rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 30rem) { .contact-form .two { grid-template-columns: 1fr; } }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ok { padding: .75rem 1rem; border-radius: var(--radius); background: var(--ok-bg); color: var(--ok-ink); border: 1px solid var(--ok-line); font-weight: 500; }
.err { padding: .75rem 1rem; border-radius: var(--radius); background: var(--err-bg); color: var(--err-ink); border: 1px solid var(--err-line); font-weight: 500; }

.paid .receipt, .checkout .receipt { border-collapse: collapse; margin: 1rem 0 1.25rem; width: 100%; max-width: 30rem; }
.paid .receipt th, .paid .receipt td, .checkout .receipt th, .checkout .receipt td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--line-2); }
.paid .receipt th, .checkout .receipt th { color: var(--muted); font-weight: 500; width: 9rem; }


[hidden] { display: none !important; }

/* Checkout: our own payment form; the card fields are Stripe Elements inside it. */
.checkout .summary { max-width: 26rem; }
.checkout .summary .total th, .checkout .summary .total td { border-bottom: 0; font-size: 1.1rem; }
.checkout .summary .total th { color: var(--ink); font-weight: 600; }
.pay-page { margin-top: 1.25rem; }
.pay-page .field-group { display: grid; gap: .35rem; }
.pay-page .field-label { font-weight: 500; font-size: .875rem; }
.payment-element { min-height: 6rem; }
.payment-element .loading { padding: 1.5rem 0; text-align: center; }
.pay-page label .muted { font-weight: 400; }


/* Parts-catalog additions (as in tesla/). */
main { padding-top: 1.5rem; }
.hero { padding: 1.5rem 0 1rem; }
.hero h1 { max-width: 48rem; }
/* Home: the search box at the top, then the sections. */
.home .hero { padding: 6vh 0 1.5rem; text-align: center; }
.home .hero h1 { margin-inline: auto; }
.home .search { max-width: 52rem; margin-inline: auto; justify-content: center; }
.home .search-field { text-align: left; }
.foot { max-width: var(--max); margin: 0 auto; padding: 1.5rem var(--gutter) 2.5rem; border-top: 1px solid var(--line-2); color: var(--faint); font-size: .8125rem; }
.cart-count { display: inline-grid; place-items: center; min-width: 1.4em; height: 1.4em; padding: 0 .3em; border-radius: 999px; background: var(--blue-ink); color: #fff; font: 600 .75rem/1 var(--font-mono); }
.cart-count.empty { background: var(--line); color: var(--muted); }
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue-ink); }
.crumbs [aria-current] { color: var(--ink); }

/* Search: one big field and a button. */
.search { display: flex; gap: .5rem; flex-wrap: wrap; max-width: 46rem; margin: 1.25rem 0; }
.search-field { position: relative; flex: 1 1 18rem; display: flex; }
.search input { flex: 1 1 auto; width: 100%; font: inherit; padding: .75rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); color: var(--ink); background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.search-big input { font-size: 1.0625rem; padding: .9rem 1.1rem; }
.search-big .btn { padding: .9rem 1.75rem; font-size: 1.0625rem; }
.search .search-clear { padding-left: 1rem; padding-right: 1rem; font-size: .9375rem; }
/* Recent searches: a drop-down under the search box (as in engine-rebuilders). */
.search { position: relative; z-index: 6; }
.search-history { position: absolute; left: 0; right: 0; top: calc(100% + .25rem); z-index: 30; margin: 0; padding: .25rem; list-style: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 20rem; overflow-y: auto; }
.search-history-head { padding: .35rem .65rem .25rem; font: 500 .6875rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .15em; color: var(--faint); }
.search-history [role=option] { padding: .5rem .65rem; border-radius: 6px; font-size: .9375rem; color: var(--ink); cursor: pointer; }
.search-history [role=option]:hover, .search-history [role=option].active { background: var(--bg-2); color: var(--blue-ink); }

.chip { display: inline-flex; align-items: center; gap: .3rem; font: inherit; font-size: .8125rem; font-weight: 500; padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.chip:hover { background: var(--blue-50); border-color: var(--blue-300); color: var(--blue-ink); }
.chip-on, .chip-on:hover { background: var(--blue-ink); border-color: var(--blue-ink); color: #fff; }
.years { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.models .card h3 { font-size: 1.5rem; margin: 0; }
.section-names { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); color: var(--ink-2); }

/* The section grid of a car. */
.trim-pick label { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; font-size: .875rem; }
.trim-pick select, .filter input { font: inherit; font-size: .9375rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--ink); }
.section-grid { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; }
/* Compact: the icon beside the name and count, not above them. */
.section-card { text-decoration: none; color: var(--ink); display: grid; grid-template-columns: auto 1fr; align-items: center; align-content: center; gap: .1rem .75rem; padding: .75rem 1rem; }
.section-card h3 { margin: 0; font-size: 1rem; line-height: 1.25; }
.section-card p { grid-column: 2; }
.section-icon { font-size: 1.5rem; line-height: 1; grid-row: span 2; }
.other-years { margin-top: 1.5rem; color: var(--muted); font-size: .875rem; }

/* A section: tabs, tools, then one table per group. */
.section-tabs { display: flex; gap: .4rem; overflow-x: auto; padding: .25rem 0 .75rem; margin: 1rem 0; scrollbar-width: thin; }
.section-tabs .chip { flex: none; }
.list-tools { position: sticky; top: 3.4rem; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: .75rem 0; background: var(--bg); border-bottom: 1px solid var(--line-2); }
.filter { flex: 1 1 18rem; }
.filter input { width: 100%; }
.list-tools .small { margin: 0; }
.part-group h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
.parts { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.parts thead th { text-align: left; font: 500 .6875rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .15em; color: var(--muted); padding: .5rem .5rem; border-bottom: 1px solid var(--line); }
.parts td, .parts tbody th { padding: .6rem .5rem; border-bottom: 1px solid var(--line-2); vertical-align: top; text-align: left; }
.parts tbody th { font-weight: 500; }
.parts tbody th a { color: var(--ink); }
.parts tr:target { background: var(--blue-50); }
.parts .num { text-align: right; white-space: nowrap; }
.parts .note { display: block; font-weight: 400; font-size: .8125rem; color: var(--muted); }
.parts .oem { white-space: nowrap; }
.parts .oem code { font-size: .875rem; font-weight: 500; color: var(--blue-dark); background: var(--blue-50); }
.copy { margin-left: .25rem; padding: .1rem .35rem; border: 0; background: none; color: var(--faint); cursor: pointer; border-radius: 4px; font-size: .9rem; }
.copy:hover, .copy:focus-visible { color: var(--blue-ink); background: var(--bg-2); outline: none; }
.copy.copied { color: var(--green-ink); }
.parts .fits { color: var(--ink-2); }
.parts .buy { text-align: right; white-space: nowrap; }
.btn-small { padding: .4rem .8rem; font-size: .875rem; }
.add.added { background: var(--green-ink); border-color: var(--green-ink); }
/* Phones: each part is a card. */
@media (max-width: 46rem) {
  .parts thead { display: none; }
  .parts, .parts tbody, .parts tr, .parts td, .parts tbody th { display: block; }
  .parts tr { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .parts td, .parts tbody th { padding: 0; border: 0; }
  .parts tbody th { grid-column: 1 / -1; }
  .parts .oem { grid-column: 1; }
  .parts .fits { grid-column: 1 / -1; }
  .parts .num { text-align: left; }
  .parts .buy { grid-row: span 2; align-self: center; }
}
.building { margin: 1.5rem 0; padding: 1.25rem; border: 1px dashed var(--blue-300); border-radius: var(--radius); background: var(--blue-50); }
.wait { color: var(--ink-2); font-weight: 500; margin: 0; }
.wait::before { content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .5em; border: 2px solid var(--blue); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -.1em; }
@keyframes spin { to { transform: rotate(360deg); } }
.results { margin-top: 1rem; }

/* Cart and checkout. */
.cart-lines { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.cart-lines th, .cart-lines td { padding: .6rem .4rem; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.cart-lines td.num, .cart-lines th.num { text-align: right; white-space: nowrap; }
.cart-lines .note { display: block; font-size: .8125rem; color: var(--muted); font-weight: 400; }
.cart-lines input { width: 3.5rem; font: inherit; padding: .3rem .4rem; border: 1px solid var(--line); border-radius: 6px; }
.cart-lines tfoot th, .cart-lines tfoot td { border-bottom: 0; }
.cart-lines .total th, .cart-lines .total td { font-weight: 700; font-size: 1.125rem; }
.paid .receipt .note, .checkout .receipt .note { display: block; font-size: .8125rem; color: var(--muted); font-weight: 400; }
.checkout .summary { max-width: none; }
.contact-form .three { display: grid; gap: .9rem; grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 30rem) { .contact-form .three { grid-template-columns: 1fr; } }
.admin-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  .hero > *, .section-grid .card { animation: rise .6s var(--ease) both; }
  .hero > :nth-child(2) { animation-delay: .06s; }
  .hero > :nth-child(n+3) { animation-delay: .12s; }
}
.parts thead .verify { text-transform: none; letter-spacing: 0; color: var(--faint); }

/* A described problem: the likely parts, one card each. */
.diagnosis h2 { font-size: 1.375rem; margin: 0 0 1rem; }
.which-car { margin: 1rem 0 1.5rem; padding: 1rem 1.25rem; border: 1px solid var(--blue-200); border-radius: var(--radius); background: var(--blue-50); }
.which-car p { margin: 0; font-weight: 500; }
.which-car .which-model { margin-top: .75rem; font: 500 .75rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .15em; color: var(--blue-ink); }
.which-car .years { margin-top: .4rem; }
.candidates { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; }
.candidate h3 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.candidate .parts { margin-top: .5rem; }
.badge-like { padding: .15rem .55rem; border-radius: 999px; font: 600 .6875rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.like-high { background: var(--blue-ink); color: #fff; }
.like-medium { background: var(--blue-100); color: var(--blue-dark); }
.like-low { background: var(--line-2); color: var(--muted); }

/* Prelude Superstore additions. */
.sections { padding-bottom: 1rem; }
.sections-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 1.5rem; margin-top: 1.5rem; }
.sections-head h2 { margin: 0; }
.trim-pick { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }

/* Photos: a square thumbnail per row, the section icon when there is none. */
.parts .pic { width: 4rem; padding-right: 0; }
.parts .pic a { text-decoration: none; }
.thumb { display: block; width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-2); }
.thumb-none { display: grid; place-items: center; font-size: 1.5rem; color: var(--faint); }
/* Phones: photo on the left, the part in the middle, Add on the right. */
@media (max-width: 46rem) {
  .parts-pics tr { grid-template-columns: auto 1fr auto; }
  .parts-pics .pic { grid-column: 1; grid-row: 1 / span 5; width: auto; }
  .parts-pics tbody th, .parts-pics .oem, .parts-pics .fits, .parts-pics .num { grid-column: 2; }
  .parts-pics .buy { grid-column: 3; grid-row: 1 / span 5; }
}

/* A part's own page: the photo, then the details. */
.part-detail { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 52rem) { .part-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.part-photo { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.part-photo img { display: block; width: 100%; max-height: 32rem; object-fit: contain; background: #fff; }
.part-photo figcaption { padding: .6rem .9rem; font-size: .8125rem; color: var(--muted); border-top: 1px solid var(--line); background: var(--bg); }
.part-photo-none { display: grid; place-items: center; min-height: 18rem; text-align: center; }
.part-photo-none span { font-size: 4rem; color: var(--faint); }
.part-info h1 { font-size: 1.75rem; }
.part-price { font-size: 1.75rem; font-weight: 700; margin: .5rem 0 1rem; }
.part-buy .btn { min-width: 12rem; }
.spec { border-collapse: collapse; width: 100%; margin: 1.25rem 0; font-size: .9375rem; }
.spec th, .spec td { text-align: left; padding: .5rem .25rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.spec th { color: var(--muted); font-weight: 500; width: 9.5rem; }
.spec code { font-size: .875rem; color: var(--blue-dark); background: var(--blue-50); }

/* Checkout: the shipping rates as a radio list. */
.rates { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.rates legend { margin-bottom: .5rem; }
#rates-list { display: grid; gap: .5rem; }
.rate { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background-color .15s; }
.rate:hover { border-color: var(--blue-300); }
.rate:has(input:checked) { border-color: var(--blue-ink); background: var(--blue-50); }
.contact-form .rate input { width: auto; }
.rate-name { font-weight: 500; }
.rate-name .note { display: block; font-weight: 400; font-size: .8125rem; color: var(--muted); }
.rate-price { font-weight: 600; white-space: nowrap; }
.checkout .receipt .note { display: block; }

/* Admin. */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-head .kicker { margin: 0; }
.status { padding: .15rem .55rem; border-radius: 999px; font: 600 .6875rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; background: var(--line-2); color: var(--muted); }
.status-authorized { background: var(--blue-100); color: var(--blue-dark); }
.status-captured { background: var(--ok-bg); color: var(--ok-ink); }
.admin-parts input[type=number], .admin-parts input[name=name] { font: inherit; font-size: .875rem; padding: .35rem .45rem; border: 1px solid var(--line); border-radius: 6px; width: 100%; }
.admin-parts input[type=number] { width: 5.5rem; text-align: right; }
.admin-parts .box { white-space: nowrap; }
.admin-parts .box label { display: inline-block; }
.admin-parts .box input { width: 4.25rem; }
.admin-parts .pic { display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; width: auto; }
.admin-parts .upload { cursor: pointer; }
.checkout .receipt th { width: auto; }

/* Shared top bar (engine-rebuilders, prelude and tesla carry the same block; see topBar in lib/page.mjs). */
.sites { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.site-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .6rem; border-radius: var(--radius); color: var(--muted); text-decoration: none; font-weight: 500; font-size: .9375rem; white-space: nowrap; transition: color .15s, background .15s; }
.site-tab:hover { color: var(--ink); background: var(--bg-2); }
.site-tab[aria-current] { color: var(--ink); font-weight: 700; font-size: 1.0625rem; margin-right: 0; }
.site-tab.site-word { gap: .1rem; }
.site-mark { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 6px; background: var(--blue-ink); color: #fff; font-size: .85rem; font-weight: 700; line-height: 1; }
.account-chip { cursor: default; }
