/* qipei — self-hosted Archivo, no external dependencies. Archivo ships
   from Google Fonts as one variable font (wght 100–900); a single
   @font-face with a weight range covers every weight used. */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/archivo-var.woff2') format('woff2'); }
* { box-sizing: border-box; }
:root {
  --ink: #14181d; --ink-soft: #2a3138; --muted: #5b6670; --line: #e3e6e8; --line-strong: #c9d0d4;
  --accent: #0f766e; --accent-bright: #14919b; --accent-soft: #ecfdf5;
  --hero-bg: #0b1f22; --hero-img-bg: #134e4a; --bg: #fff; --soft: #f6f4ef;
  --wrap: 1240px;
}
body { margin: 0; font-family: 'Archivo', -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif; color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.6; }
/* Horizontal scrollbar (v8): the featured band's full-bleed negative
   margins use 50vw, which includes the vertical scrollbar width, so the
   band was ~15px wider than the viewport and a horizontal scrollbar showed
   on every desktop screenshot. Clip horizontal overflow at the root
   instead of shrinking the band. */
html, body { overflow-x: clip; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- header ---- */
.topbar { border-bottom: 1px solid var(--line); background: #fff; }
.topbar-in { max-width: var(--wrap); margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.logo { font-size: 22px; font-weight: 900; letter-spacing: .01em; color: var(--ink); display: inline-flex; align-items: center; }
.logo::before { content: 'W'; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: var(--accent); color: #fff; font-size: 18px; font-weight: 900; border-radius: 8px; margin-right: 9px; flex: 0 0 auto; }
.logo span { color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: 2px; margin-left: 8px; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.topbar nav a { color: var(--ink); font-weight: 600; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 8px; }
.topbar nav a:hover { background: var(--soft); text-decoration: none; }
/* Header primary CTA (v7): "Send Inquiry" was plain text at the same
   weight as the other nav links, so the header had no solid-primary
   layer. It is now the orange button; the mobile rule below keeps it
   visible when the other links collapse into the select. */
.topbar nav a.nav-cta { background: var(--accent); border: 1px solid var(--accent); color: #fff; padding: 8px 14px; min-height: 40px; margin-left: 8px; }
.topbar nav a.nav-cta:hover { background: #115e59; border-color: #115e59; color: #fff; text-decoration: none; }
.mkt { padding: 8px 16px; font-size: 14px; background: #fff7ed; border-bottom: 1px solid var(--line); }

/* ---- layout ---- */
main { max-width: var(--wrap); margin: 0 auto; padding: 0 24px 28px; }
main > section { margin-top: 48px; }
main > section:first-child { margin-top: 0; }
h1 { font-size: 32px; line-height: 1.2; font-weight: 900; letter-spacing: -.01em; margin: 24px 0 8px; }
h2 { font-size: 26px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; margin: 0 0 6px; }
h3 { font-size: 17px; margin: 0 0 4px; }
.section-lead { color: var(--muted); font-size: 15px; margin: 0 0 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 8px; cursor: pointer; font-size: 15px; font-weight: 700; font-family: inherit; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease; }
.btn:hover { background: #115e59; border-color: #115e59; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.btn.ghost { background: #fff; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.small { min-height: 44px; padding: 6px 10px; font-size: 13.5px; }
.btn:disabled { opacity: .5; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px; border: 1px solid var(--line-strong); border-radius: 8px; margin: 4px 0 12px; font-family: inherit; color: var(--ink); }
label { font-size: 14px; font-weight: 600; display: block; }

/* ---- cards ---- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(20, 24, 29, .05), 0 8px 20px rgba(20, 24, 29, .08); transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease; }
.card:hover { border-color: var(--line-strong); box-shadow: 0 16px 34px rgba(20, 24, 29, .16); transform: translateY(-2px); }
.card-thumb { position: relative; background: #e9dcc2; border-bottom: 1px solid var(--line); height: 168px; flex: 0 0 auto; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 14px; }
/* Titles reserve two lines on every card (v7): titles wrap, and without
   the reserve the button row sat at different heights down the column.
   The OE line no longer reserves (v8): it renders only when the part has
   an OE number, so an empty row cannot leave a blank gap. */
/* v9: the 2-line title reserve left a visible one-line gap under every
   1-line title (cloud-browser audit). All featured titles are 1 line at
   card widths, so reserve 1 line; buttons still align via margin-top:auto
   on .row, and a wrapping title simply grows its own card. */
.card h3 { font-size: 16.5px; line-height: 1.35; font-weight: 700; margin: 0; min-height: 1.35em; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent); }
.card .fit { color: var(--muted); font-size: 13.5px; margin: 2px 0 0; }
/* The OE row is always rendered (v11): v8 made it conditional and the
   cloud audit caught the price/buttons sitting one line higher on the
   6 of 9 featured cards without an OE number. The row stays empty when
   the part has no verified OE — no "Not provided" text, nothing
   invented — it only reserves the line so every card's price lands at
   the same height. */
.card .oe { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 2px 0 0; min-height: 1.6em; }
.card .tier-line { color: var(--muted); font-size: 13.5px; margin: 2px 0 0; }
.card .price { font-weight: 800; font-size: 18px; margin: 8px 0 0; }
/* Price disclaimer sits on its own line under the price (v8): inline it
   ran on glued to the bold price ("$5–11· excl. …"). Scoped to cards so
   the detail page and compare table keep their inline form. */
.card .price-note { display: block; margin-top: 2px; }
.card .merch { color: var(--muted); font-size: 13.5px; margin: 2px 0 0; }
/* Badges live in a reserved row at the top of the card body (v10): the
   v8 thumbnail overlay read as inconsistent — only 1 of 9 featured cards
   carries one — and it covered product (brake-pad top corner). The row
   reserves 24px on every card, so badged and unbadged cards stay the
   same height and the photo stays clean. v11: fixed height, not
   min-height — the pill measured 25px on the inherited 1.6 line-height,
   so the row grew to 27px on the one badged card and its buttons sat
   3px low; the pill now gets an 18px line-height (22px total). */
.card .badge-line { height: 24px; line-height: 24px; margin: 0 0 6px; overflow: hidden; }
.card .badge-line .badge { margin-right: 0; }
.card .row { margin-top: auto; padding-top: 12px; gap: 10px; border-top: 1px solid var(--line); }
.card .row .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; padding: 6px 4px; }
/* Price disclaimer (small, muted) and the Details text link: the card row
   is Inquire (solid, primary) + Compare (ghost); Details sits on its own
   line under the buttons (v7) instead of squeezed into the same row. */
.price-note { font-size: 13.5px; font-weight: 500; color: #4f5a64; }
.card-link { align-self: flex-start; font-size: 14px; font-weight: 700; white-space: nowrap; padding: 4px 0; margin-top: 10px; }
.meta { color: var(--muted); font-size: 14px; margin: 4px 0; }
.price { font-weight: 700; font-size: 17px; margin: 8px 0; }
.badge { display: inline-block; font-size: 13px; line-height: 18px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fef3c7; color: #92400e; margin-right: 6px; }
.badge.hv { background: #fee2e2; color: #991b1b; }
.badge.safety { background: #fef3c7; color: #92400e; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.panel { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 16px 0; background: var(--soft); }
.warn { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; padding: 10px 12px; border-radius: 8px; }
.ok { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; padding: 10px 12px; border-radius: 8px; }
table.cmp { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
table.cmp th, table.cmp td { border: 1px solid var(--line); padding: 10px; text-align: left; font-size: 14px; vertical-align: top; }
table.cmp th { background: var(--soft); min-width: 110px; }
td.bad { background: #fef2f2; color: #991b1b; }
#compare-bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--ink); color: #fff; padding: 10px 16px; display: none; gap: 12px; align-items: center; justify-content: space-between; z-index: 10; }
#compare-bar .btn { min-height: 44px; }
.searchrow { display: flex; gap: 8px; margin: 16px 0; }
.searchrow input { flex: 1; margin: 0; }
.form-narrow { max-width: 560px; }
.nav-select { display: none; width: 100%; margin: 4px 0 0; padding: 10px; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; }

/* ---- footer ---- */
footer { background: #10181d; color: #c3d2da; font-size: 14.5px; border-top: 3px solid var(--accent); }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 36px 24px 24px; display: grid; grid-template-columns: 1.2fr 0.85fr 1fr; gap: 28px; }
.foot-in h4 { color: #eef3f5; font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.foot-in .logo { color: #eef3f5; }
.foot-in p { margin: 0 0 10px; }
.foot-in ul { list-style: none; margin: 0; padding: 0; }
.foot-in ul li { margin: 0 0 8px; }
.foot-in ul a { color: #c3d2da; }
.foot-in ul a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.foot-bottom-in { max-width: var(--wrap); margin: 0 auto; padding: 14px 24px 22px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-start; align-items: center; color: #8fa3ad; font-size: 13px; }
/* Bottom-bar links (v7): the copyright line used to sit alone with a
   large empty dark space to its right. */
.foot-bottom-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-bottom-links a { color: #8fa3ad; }
.foot-bottom-links a:hover { color: #fff; }
.foot-small { font-size: 13px; color: #8fa3ad; }
/* CONTACT notes sit tighter (v7): the grey small-print lines floated with
   a sparse gap under the inquiry link. */
.foot-in .foot-small { margin-bottom: 6px; }

/* ---- hero (design v2.15): dark ink card, orange accent, stats row ---- */
.hero { display: grid; grid-template-columns: 0.94fr 1.06fr; background: var(--hero-bg); color: #eef3f5; border-radius: 16px; margin: 20px 0 0; overflow: hidden; box-shadow: 0 14px 36px rgba(11, 28, 34, .20); }
/* Hero seam blend (v7): the v6 gradient panels left the illustration
   reading as a pasted teal rectangle — its own edges showed against the
   panel gradient in the contain letterbox. The panel is now flat
   #003a46 (the illustration's sampled edge colour) and the text panel
   gradients into that same colour, so the hero reads as one panel. */
.hero-text { padding: 36px 36px 28px; background: linear-gradient(90deg, var(--hero-bg) 0%, var(--hero-bg) 78%, var(--hero-img-bg) 100%); }
.hero-kicker { color: #5eead4; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; }
.hero-h1 { font-size: clamp(34px, 3.8vw, 48px); line-height: 1.1; font-weight: 900; letter-spacing: -.015em; color: #eef3f5; margin: 0 0 14px; }
.hero-h1 span, .hero-h1 em { display: block; }
.hero-h1 em { font-style: normal; color: var(--accent-bright); }
.hero-sub { color: #c3d2da; max-width: 56ch; margin: 0 0 16px; font-size: 16px; }
.hero-search { display: flex; gap: 6px; background: #fff; border-radius: 10px; padding: 6px; margin: 0 0 18px; }
.hero-search select, .hero-search input { width: auto; min-height: 44px; margin: 0; border: 0; background: #f2f4f5; font-size: 14px; color: var(--ink); }
.hero-search select { flex: 0 0 128px; }
.hero-search input { flex: 1; min-width: 0; }
.hero-search .hero-btn { background: var(--accent-bright); border-color: var(--accent-bright); flex: 0 0 auto; }
.hero-search .hero-btn:hover { background: #0d9488; border-color: #0d9488; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 14px; }
.hero-stat strong { display: block; font-size: 24px; font-weight: 800; color: #eef3f5; line-height: 1.2; }
.hero-stat span { font-size: 12.5px; color: #9db0bb; }
/* Flat edge color of the hero illustration (#003a46, sampled): the old
   radial gradient showed through the contain letterbox as a lighter band
   (v5); the v6 left-to-right gradient then showed the illustration's own
   top/bottom edges as a pasted rectangle (v7). Flat panel, same colour
   as the illustration edge, so no rectangle can show. The image itself
   is cover (v8): contain left a wide empty teal band below the
   illustration whenever the text column ran taller than the 3:2 image;
   cover fills the panel and the slightly wider image column keeps the
   crop to a few percent at the top and bottom. */
.hero-img { background: var(--hero-img-bg); display: flex; align-items: center; min-height: 100%; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

/* ---- numbered how-it-works flow ---- */
/* Steps (v10): labels wrap 1 line on some cards and 2 on others, so the
   text blocks read uneven even though the boxes are equal height (cloud
   audit at 1920px). The span reserves exactly 2 lines so all five text
   blocks are the same height, and the chevron gutter was widened (18px
   left the "›" touching the card borders). v11: the span centres its
   text inside the reserved 2-line height — v10 top-aligned it, which
   left a dead gap under every 1-line label; the disc centres against
   the span, so each step reads as one balanced tile. */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; padding: 0; list-style: none; counter-reset: step; margin: 20px 0 0; }
.steps li { position: relative; counter-increment: step; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; line-height: 1.45; background: #fff; display: flex; align-items: center; gap: 12px; hyphens: none; }
/* v9: step labels wrap to 1 line on some cards and 2 on others (cloud
   audit). The text span reserves exactly 2 lines so all five text blocks
   are the same height, vertically centred next to the number disc. */
.steps li span { min-height: 2.9em; display: flex; align-items: center; }
.steps li::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; margin-top: 0; }
.steps li::after { content: '\203A'; position: absolute; right: -19px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 24px; font-weight: 700; z-index: 1; }
.steps li:last-child::after { display: none; }
.form-narrow .steps { grid-template-columns: 1fr; }
.form-narrow .steps li::after { display: none; }

/* ---- category chips ---- */
/* Category pills are content-sized and centred (v10): the 5-column grid
   stretched short labels ("Lighting", "Tyres", "Fluids") into wide pills
   with empty side padding (cloud audit). Flex wrap keeps each pill snug
   to its label and centres the rows. */
.cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 20px 0 0; }
.cat { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14.5px; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 15px; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.cat svg { width: 20px; height: 20px; color: var(--accent); flex: 0 0 auto; }
.cat-n { font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 1px 8px; }

/* ---- browse-by-series strip (home only) ---- */
.series { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 20px; }
/* Series chip (v7): the v6 text-only chip with a small left-aligned glyph
   read as a placeholder and left its bottom third blank. The glyph now
   sits large and centred on a warm tinted panel, and a "View parts →"
   link fills the foot, so the chip reads as a card, not a label. */
.series-chip { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 0 0 14px; background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(20, 24, 29, .05), 0 4px 12px rgba(20, 24, 29, .06); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.series-chip:hover { border-color: var(--accent); box-shadow: 0 8px 20px rgba(20, 24, 29, .12); text-decoration: none; transform: translateY(-2px); }
.series-chip strong { display: block; font-size: 16px; font-weight: 800; color: var(--ink); padding: 0 16px; }
.series-count { display: block; font-size: 13px; color: var(--muted); padding: 0 16px; }
.series-view { display: block; font-size: 13.5px; font-weight: 700; color: var(--accent); padding: 8px 16px 0; }
/* Generic car side-profile glyph (v6): the series chips were text-only and
   read as placeholders next to the photographic part cards. Two body
   styles (v7): SUV for the four SUVs, a longer/flatter hatchback for the
   MG4 EV, so the five chips are not five copies of one drawing. Original
   silhouettes, no brand marks. Turns accent colour on hover. */
/* v10: series glyphs were still small clip-art in a big empty beige band
   (cloud audit at 1920px). The car fills the band now (200px wide, tight
   padding) and sits on a soft ground shadow so it reads as a parked car,
   not a floating cut-out. Hover no longer recolors the car orange — the
   strip looked uneven in static screenshots with one card hovered. */
.series-car-wrap { display: flex; align-items: center; justify-content: center; background: var(--soft); border-bottom: 1px solid var(--line); padding: 10px 8px 8px; margin-bottom: 12px; }
.series-car { display: block; width: 200px; height: auto; color: var(--ink-soft); }
.cat:hover { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 2px 8px rgba(20, 24, 29, .08); }

.viewall { text-align: center; margin: 28px 0 0; }

/* ---- featured band (home only): a soft warm panel behind the catalogue
   so the page has rhythm instead of one long white run ---- */
/* The band runs full-bleed (v7): it used to stop at the 1240px content
   column with white margins and square corners, reading as a large inset
   panel. Negative viewport margins stretch the background edge to edge
   while the padding keeps the content on the 1240px column. The band
   still runs to the footer (v6): the beige panel used to end in a white
   strip (main's bottom padding) before the footer, with "View all parts"
   stranded in the gap. Negative bottom margin swallows that padding so the
   band, not white, meets the footer. */
.band { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 40px calc(50% - 50vw) -28px; padding: 36px calc(50vw - 50%) 28px; }

/* ---- ad slot (renders only when a live ad exists) ---- */
.ad-slot { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 14px 16px; margin: 48px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.ad-slot:empty { display: none; }
.ad-label { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 6px; }
.ad-slot a { font-weight: 700; }
.ad-slot .ad-who { color: var(--muted); font-size: 13.5px; }

@media (max-width: 1020px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li::after { display: none; }
  .steps li:last-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-text { padding: 32px 24px 28px; }
  .hero-search { flex-wrap: wrap; }
  .hero-search select { flex: 1 1 100%; }
  .hero-search input { flex: 1 1 100%; }
  .hero-search .hero-btn { flex: 1 1 100%; }
  .hero-img img { min-height: 0; max-height: none; height: auto; object-fit: contain; }
  .foot-in { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .band { margin-bottom: -24px; padding: 28px calc(50vw - 50%) 24px; }
  /* Narrow phones: the 2-col grid forces equal widths and wraps long labels
     ("Steering / Chassis", "EV high-voltage") to two lines; back to
     content-sized wrapping pills, as before v6. */
  .cats { display: flex; flex-wrap: wrap; }
  main { padding: 0 16px 24px; }
  .series { grid-template-columns: repeat(2, 1fr); }
  .series-chip:last-child { grid-column: 1 / -1; }
  .topbar-in { padding: 10px 16px; }
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
  .grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  /* Mobile nav becomes a dropdown select (design §8 / v2.8); the text
     links collapse, action buttons stay visible. */
  .topbar nav a { display: none; }
  .topbar nav a.nav-cta { display: inline-flex; }
  .nav-select { display: block; }
}
