/* ==========================================================================
   views.css — 3D / 2D / Compare view modes
   Body carries exactly one of: .view-3d  .view-2d  .view-compare
   ========================================================================== */

/* --------------------------------------------------------------------------
   Mode-specific visibility helpers
   -------------------------------------------------------------------------- */
body:not(.view-2d) .only-2d { display: none !important; }
body.view-2d .only-3d,
body.view-compare .only-3d  { display: none !important; }

/* 3D-only HUD pieces */
body:not(.view-3d) #vp-btn-transparency,
body:not(.view-3d) .mobile-pan-btns,
body:not(.view-3d) .viewport__crosshair { display: none !important; }

/* Compare covers the viewport — only the top-left HUD + size chips remain */
body.view-compare .viewport__controls,
body.view-compare .viewport__dim-legend { display: none !important; }

/* --------------------------------------------------------------------------
   Header view toggle (shares .header__unit-toggle / .unit-btn styling)
   -------------------------------------------------------------------------- */
.header__view-toggle .unit-btn { padding: 4px 11px; }

/* --------------------------------------------------------------------------
   Top-left HUD: view label + Front/Rear toggle
   -------------------------------------------------------------------------- */
.viewport { container-type: inline-size; container-name: viewport; }

.viewport__topleft {
  top: var(--space-4);
  left: var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  z-index: 5;
}

.viewport__topleft .viewport__view-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Panel: Front/Rear toggle under the tabs (2D + Compare only)
   -------------------------------------------------------------------------- */
.panel__axle {
  display: none;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}

/* The Front/Rear toggle only applies to the Fitment tab */
body[data-tab="fitment"] .panel__axle { display: block; }

/* Fitment tab: compact so one axle fits on a desktop panel without scrolling */
#tab-fitment { padding-top: var(--space-3); }
#tab-fitment .section { margin-bottom: var(--space-3); }
#tab-fitment .section__title { margin-bottom: var(--space-3); }
#tab-fitment .fit-axle-section--susp { padding-top: var(--space-4); }
#tab-fitment .control-row { margin-bottom: var(--space-2); }   /* same as the baseline popover */
#tab-fitment .toggle-row { padding: 2px 0; }
#tab-fitment .tyre-size-display {
  padding: 8px var(--space-3);
  margin-bottom: var(--space-2);
}
#tab-fitment .tyre-size-display__wheel { font-size: 13px; margin-bottom: 1px; }
#tab-fitment .tyre-size-display__size  { font-size: 18px; line-height: 1.2; }
#tab-fitment .tyre-size-display__label,
#tab-fitment .tyre-size-display__od    { display: inline; margin-top: 0; }
#tab-fitment .tyre-size-display__od::before { content: ' · '; color: var(--color-text-muted); }

/* Compare is about the wheel + tyre — only the Fitment tab applies */
body.view-compare .panel__tab[data-tab="vehicle"],
body.view-compare #tab-vehicle { display: none !important; }

/* Fitment tab shows only the selected axle (all modes) */
body[data-axle="front"] .fit-axle-section[data-axle="rear"],
body[data-axle="rear"]  .fit-axle-section[data-axle="front"] { display: none; }

/* Compare is about the tyre — ride height / camber don't apply */
body.view-compare .fit-axle-section--susp { display: none; }

/* 2D: the colour-keyed pills and bottom bar make the legend redundant */
body.view-2d .viewport__dim-legend { display: none !important; }

/* Segmented toggle — same look as the header unit toggle */
.seg-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  pointer-events: all;
}

.seg-toggle--full {
  display: flex;
  width: 100%;
  background: var(--color-surface-2);
  backdrop-filter: none;
}

.seg-toggle__btn {
  flex: 1;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-family: var(--font-ui);
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.seg-toggle__btn:hover:not(.active) { color: var(--color-text-secondary); }

.seg-toggle__btn.active {
  background: var(--color-accent);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Baseline → New size chips (2D + Compare)
   Narrow viewports: under the Front/Rear toggle. Wide: top centre.
   -------------------------------------------------------------------------- */
.size-chips {
  position: absolute;
  top: 44px;
  left: var(--space-5);
  right: var(--space-5);
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  z-index: 6;
  pointer-events: none;
}

body.view-2d .size-chips,
body.view-compare .size-chips { display: flex; }

@container viewport (min-width: 1120px) {
  .size-chips {
    top: var(--space-4);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    justify-content: center;
    max-width: calc(100% - 640px);
  }
}
@container viewport (min-width: 760px) {
  body.view-compare .size-chips {
    top: var(--space-4);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    justify-content: center;
    max-width: calc(100% - 340px);
  }
}

.size-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 4px 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  pointer-events: all;
}

.size-chip b {
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.size-chip--base b { color: #b8860b; }
.size-chip--new  b { color: var(--color-accent); }

button.size-chip {
  cursor: pointer;
  border-style: dashed;
  border-color: #d4a017;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
button.size-chip:hover,
button.size-chip[aria-expanded="true"] {
  background: #fffaf0;
  border-style: solid;
}
.size-chip__caret { color: var(--color-text-muted); margin-left: -2px; }

.size-chips__arrow { color: var(--color-text-muted); font-size: 14px; }

/* Baseline popover */
.baseline-popover {
  position: absolute;
  z-index: 50;
  width: 300px;
  max-width: calc(100% - 16px);
  max-height: calc(100% - 80px);
  overflow-y: auto;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-top: 3px solid #d4a017;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  padding: var(--space-3);
  pointer-events: all;
}
.baseline-popover[hidden] { display: none; }

.baseline-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}
.baseline-popover__title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.baseline-popover__close {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 2px 6px;
}
.baseline-popover__close:hover { color: var(--color-text-primary); }
.baseline-popover .control-row { margin-bottom: var(--space-2); }

/* Checkbox row */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px var(--space-3);
  margin-bottom: var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  position: relative;
}
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-row__box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface-1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.check-row input:checked + .check-row__box {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.check-row input:checked + .check-row__box::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg);
}
.check-row input:focus-visible + .check-row__box { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.check-row__text  { display: flex; flex-direction: column; gap: 2px; }
.check-row__label { font-size: 12px; font-weight: 600; color: var(--color-text-primary); }
.check-row__hint  { font-size: 10px; color: var(--color-text-muted); line-height: 1.4; }

/* --------------------------------------------------------------------------
   2D overlay
   -------------------------------------------------------------------------- */
.viewport__overlay2d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

body.view-2d .viewport { cursor: grab; }
body.view-2d .viewport:active { cursor: grabbing; }

.dim-legend__dot--dashed {
  background: transparent;
  border: 1.5px dashed #d4a017;
  width: 10px;
  height: 10px;
}

/* --------------------------------------------------------------------------
   Compare view — visualizer fills the viewport below the HUD
   -------------------------------------------------------------------------- */
.compare-stage {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: var(--hud-top, 76px) var(--space-5) var(--space-5);
  background: var(--color-bg);
  z-index: 1;
}
body.view-compare .compare-stage { display: flex; }
/* The 3D loop pauses in Compare, so the canvas holds a stale 3D / 2D frame —
   never let it show through anywhere the stage doesn't cover */
body.view-compare #canvas-3d { visibility: hidden; }

.compare-stage .compare-visual {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}
.compare-stage .compare-visual__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  aspect-ratio: auto;
}
.compare-stage .compare-visual__caption {
  position: absolute;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  pointer-events: none;
}
.compare-stage .compare-visual__legend { margin-top: var(--space-2); }

/* --------------------------------------------------------------------------
   Stats bar
   3D + 2D: four columns (Ride Height, Hub–Fender, Camber, Tire Diameter),
            each with front + rear.
   Compare: Size + Clearance groups for the selected axle.
   -------------------------------------------------------------------------- */
.stats-bar { display: block; }

.stats-set--main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stats-set--compare { display: none; }

body.view-compare .stats-set--main { display: none; }
body.view-compare .stats-set--compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Main columns */
.stats-col {
  padding: 8px var(--space-3);
  text-align: center;
  border-right: 1px solid var(--color-border-subtle);
  min-width: 0;
}
.stats-col:last-child { border-right: none; }

.stats-col__pair {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
}
.stats-col__cell {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  transition: opacity var(--transition-normal);
}
.stats-col__axle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-secondary);
  align-self: center;
  flex-shrink: 0;
}
.stats-col__cell { align-items: center; gap: 6px; }
.stats-col__val {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stats-col__label {
  display: inline-block;
  margin-top: 3px;
  padding-bottom: 2px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 2px solid var(--dim-color, transparent);
}
.stats-col[data-dim="rideHeight"]  { --dim-color: #5b6270; }
.stats-col[data-dim="hubToFender"] { --dim-color: #7c3aed; }

/* 2D shows one corner — fade the other axle */
body.view-2d .stats-bar[data-axle="front"] .stats-col__cell[data-axle="rear"],
body.view-2d .stats-bar[data-axle="rear"]  .stats-col__cell[data-axle="front"] { opacity: 0.38; }

/* Compare groups */
.stats-group {
  padding: 6px var(--space-3) 8px;
  min-width: 0;
}
.stats-group + .stats-group { border-left: 1px solid var(--color-border-subtle); }
.stats-group__title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 4px;
}
.stats-group__items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stats-group .stats-bar__item {
  border-right: none;
  padding: 2px 6px;
  min-width: 0;
}
.stats-bar__item--cmp .stats-bar__value { font-size: 14px; }
.stats-bar__item--cmp .stats-bar__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-bar__sub {
  display: block;
  font-size: 9.5px;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1000px) {
  body.view-compare .stats-set--compare { grid-template-columns: 1fr; }
  .stats-group + .stats-group { border-left: none; border-top: 1px solid var(--color-border-subtle); }
  .stats-col__pair { gap: var(--space-2); }
}

/* --------------------------------------------------------------------------
   Narrow headers — keep the logo + both toggles on one row
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
  .logo-wordmark { display: none; }
  .header__view-toggle .unit-btn,
  .header__unit-toggle .unit-btn { padding: 4px 8px; }
}

/* --------------------------------------------------------------------------
   Touch devices — the bottom bar floats above the panel (all modes)
   -------------------------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {
  .stats-bar,
  body.view-2d .stats-bar,
  body.view-compare .stats-bar {
    display: block;
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(var(--mobile-panel-h, 52dvh) + 8px);
    z-index: 90;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    transition: bottom 0.3s ease;
  }

  /* Main: four narrow columns, F over R */
  .stats-col { padding: 6px 4px; }
  .stats-col__pair { flex-direction: column; align-items: center; gap: 0; }
  .stats-col__val { font-size: 13px; }
  .stats-col__label { font-size: 8px; letter-spacing: 0.06em; }

  /* Compare: horizontal scroll */
  body.view-compare .stats-set--compare { display: flex; width: max-content; }
  .stats-group + .stats-group { border-top: none; border-left: 1px solid var(--color-border-subtle); }
  .stats-group__items { display: flex; gap: 2px; }
  .stats-group .stats-bar__item { min-width: 92px; }
  .stats-bar__item--cmp .stats-bar__label { max-width: 110px; }

  /* D-pad sits above the floating bar */
  .mobile-pan-btns { bottom: calc(var(--mobile-panel-h, 52dvh) + 104px) !important; }

  /* Compare stage: its (opaque) background runs all the way down behind the
     floating stats bar and the panel — it used to stop 84 px above the panel,
     leaving a strip where the paused 3D / 2D canvas showed through. The
     visual is kept clear of the bar by padding instead: panel + 8 px bar
     offset + the bar's measured height (--stats-h, main.js) + a 10 px gap. */
  .compare-stage {
    padding: var(--hud-top, 96px) 8px
             calc(var(--mobile-panel-h, 52dvh) + 8px + var(--stats-h, 84px) + 10px);
    bottom: 0;
  }
  .compare-stage .compare-visual { padding: var(--space-2); }
  .compare-stage .compare-visual__caption { font-size: 9.5px; white-space: nowrap; }
  .compare-stage .compare-visual__legend { margin-top: 4px; font-size: 10px; }

  /* The header toggle already names the mode — save the vertical space */
  .viewport__topleft { top: var(--space-3); left: var(--space-3); }
  .viewport__topleft .viewport__view-label { display: none; }
  .size-chips { top: var(--space-3); left: var(--space-3); right: var(--space-3); }
  .stats-col__axle { width: 17px; height: 17px; font-size: 10px; }
  .stats-col__pair { gap: 2px; }

  /* Panel content shares the sheet with the tabs (+ axle toggle) */
  .panel__content { flex: 1; height: auto; min-height: 0; }
  .panel__axle { padding: var(--space-2) var(--space-3); }
  .size-chip { font-size: 10.5px; padding: 3px 9px; }
  .size-chips__arrow { display: none; }

  body.view-2d .viewport__dim-legend { display: none !important; }
}

/* ==========================================================================
   MPP promotions (promos.js)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Ride height presets — Fitment tab, directly above the Front/Rear toggle.
   One chip row + one caption line (~50 px) so the axle's sliders still fit
   a desktop panel without scrolling; the axle toggle below drops its top
   padding so the two read as one block.
   -------------------------------------------------------------------------- */
.rh-presets {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 6px var(--space-4) 2px;
  flex-shrink: 0;
}
body[data-tab="fitment"]:not(.view-compare) .rh-presets { display: flex; }
.rh-presets[hidden] { display: none !important; }

/* Shares the block with the axle toggle */
body.has-rh-presets:not(.view-compare) .panel__axle { padding-top: var(--space-1); }
body.has-rh-presets:not(.view-compare) #tab-fitment { padding-top: var(--space-2); }

.rh-presets__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.rh-presets__label {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.rh-presets__chips {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.rh-presets__chips::-webkit-scrollbar { display: none; }

.rh-chip {
  flex: 1 0 auto;
  padding: 3px 9px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--color-text-secondary);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.rh-chip:hover:not(.active) { border-color: var(--color-border-strong); color: var(--color-text-primary); }
.rh-chip.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.rh-chip:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }

.rh-presets__meta {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: 11px;
  line-height: 16px;
  min-width: 0;
}

.rh-presets__caption {
  flex: 1;
  min-width: 0;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rh-presets__link {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
}
.rh-presets__link:hover { text-decoration: underline; }
.rh-presets__link[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Link cards — thumbnail · title + subtitle · arrow, like the article cards
   on the MPP site. Used by the wheel promo card and the coilover kits dialog.
   -------------------------------------------------------------------------- */
.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 12px 12px;
  background: #fff;
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-family: var(--font-ui);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.link-card:hover {
  text-decoration: none;   /* base.css underlines a:hover */
  border-color: var(--color-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.link-card:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.link-card__thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}
.link-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.link-card__thumb img[hidden] { display: none; }

.link-card__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.link-card__title,
.link-card__sub {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.link-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-primary);
}

.link-card__sub {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text-muted);
}
.link-card__sub:empty { display: none; }

.link-card__titlerow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
}

.link-card__tag {
  white-space: nowrap;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  background: var(--color-accent-glow);
  border-radius: 999px;
}

.link-card__arrow {
  display: inline-block;
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--color-accent);
  transition: transform var(--transition-fast);
}
.link-card:hover .link-card__arrow { transform: translateX(3px); }

.link-card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

/* --------------------------------------------------------------------------
   Wheel promo card — viewport top left, under the view label (3D only:
   in 2D / Compare that corner belongs to the size chips + drawing).
   -------------------------------------------------------------------------- */
.promo-card {
  width: 300px;
  max-width: 100%;
  gap: 12px;
  padding: 10px 16px 10px 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  pointer-events: all;
}
.promo-card[hidden],
body:not(.view-3d) .promo-card { display: none !important; }

.promo-card--in { animation: promo-in 0.28s ease-out; }
@keyframes promo-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* Wheel inside a dark tyre ring — same look as the wheel style cards */
.promo-card .link-card__thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1c1c1f;
}
.promo-card .link-card__thumb img { width: 73%; height: 73%; }
.promo-card .link-card__title { font-size: 14px; }
.promo-card .link-card__arrow { font-size: 18px; }

@media (prefers-reduced-motion: reduce) {
  .promo-card--in { animation: none; }
}

/* --------------------------------------------------------------------------
   Dialogs — fitment picker + coilover kits
   -------------------------------------------------------------------------- */
.mpp-dialog {
  position: fixed;
  inset: 0;
  z-index: 9400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
}
.mpp-dialog[hidden] { display: none; }

.mpp-dialog__card {
  width: 360px;
  max-width: 100%;
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 20px;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.mpp-dialog__card--wide { width: 540px; }

.mpp-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mpp-dialog__title {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
}
.mpp-dialog__card--wide .mpp-dialog__title { font-size: 16px; }

.mpp-dialog__intro {
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--color-text-muted);
}
.mpp-dialog__card--wide .mpp-dialog__intro { font-size: 12px; margin-bottom: 14px; }

.mpp-dialog__section {
  margin: 18px 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.mpp-dialog__section[hidden] { display: none; }

.mpp-dialog__close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin: -6px -8px 0 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.mpp-dialog__close:hover { color: var(--color-text-primary); background: var(--color-surface-3); }
.mpp-dialog__close:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }

/* Touch: compact card that clears the icon buttons top right; presets
   drop the label so the chips get the full width */
@media (hover: none) and (pointer: coarse) {
  .promo-card {
    width: auto;
    max-width: min(240px, calc(100vw - 160px));
    gap: 10px;
    padding: 8px 12px 8px 8px;
    border-radius: 10px;
  }
  .promo-card .link-card__thumb { width: 38px; height: 38px; }
  .promo-card .link-card__title { font-size: 13px; }
  .promo-card .link-card__sub   { font-size: 11px; }

  /* Kits dialog: tighter cards on phones */
  .mpp-dialog { padding: 10px; }
  .mpp-dialog__card { padding: 16px; }
  .link-card { gap: 10px; padding: 10px 12px 10px 10px; }
  .link-card__thumb { width: 48px; height: 48px; }
  .link-card__title { font-size: 14px; }
  .mpp-dialog .link-card__sub { -webkit-line-clamp: 3; line-clamp: 3; }   /* narrow: room for the full blurb */

  .rh-presets { padding: var(--space-2) var(--space-3) 0; gap: 4px; }
  .rh-presets__label { display: none; }
  .rh-chip { padding: 5px 10px; }
}
