/* ================================================================
   mod-menu.css – Left panel: floating box system, horizontal cards
   ================================================================ */

/* ── Floating box — shared across both panels ───────────────── */
.mv-box {
  background: rgba(14, 14, 16, 0.96);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--r-xl);
}

/* ── Left panel shell — transparent container ───────────────── */
.left-panel {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--left-panel-w);
  z-index: 20;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
  transition: transform var(--t-slow);
  -webkit-font-smoothing: antialiased;
  backface-visibility: hidden;
}

.left-panel.collapsed {
  transform: translateX(-100%);
}

/* Panel entrance (#A4) — fade + rise as the landing overlay dissolves.
   `both` fill holds the panel invisible during the delay so it does not flash
   behind the still-opaque overlay, then it rises in on a clearing stage.
   JS removes the class once it completes so the finished animation's fill does
   not pin `transform` and break the collapse translateX. */
.left-panel.panel-enter {
  animation: panelEnterLeft 560ms var(--ease-out) 300ms both;
}
@keyframes panelEnterLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .left-panel.panel-enter { animation: none; }
}

/* Fixed expand tab visible when left panel is collapsed */
.left-panel-expand {
  display: none;
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  width: 22px;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.08);
  border-left: none;
  border-radius: 0 6px 6px 0;
  background: rgba(18,18,22,0.85);
  /* backdrop-filter removed for perf */
  color: var(--c-text-3);
  font-size: 14px;
  cursor: pointer;
  line-height: 52px;
  text-align: center;
  transition: color var(--t-fast), background var(--t-fast);
}
.left-panel-expand:hover { color: var(--c-text-1); background: rgba(255,255,255,0.06); }
.left-panel.collapsed ~ .left-panel-expand { display: block; }

/* ── Collapse toggle tab ────────────────────────────────────── */
.panel-toggle {
  position: absolute;
  top: 50%;
  right: -22px;
  transform: translateY(-50%);
  width: 22px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 17, 0.95);
  
  border: 1px solid var(--c-border-mid);
  border-left: none;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  color: var(--c-text-3);
  font-size: 12px;
  cursor: pointer;
  z-index: 21;
  transition: color var(--t-fast), background var(--t-fast);
}
.panel-toggle:hover { color: var(--c-text-2); background: rgba(255,255,255,0.05); }

/* ── Fixed top area (search + categories, never scrolls) ────── */
.panel-fixed {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-3) 0;
  flex-shrink: 0;
}

/* ── Search box ─────────────────────────────────────────────── */
.search-box {
  padding: 8px 12px;
  position: relative;
}

.search-input {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  height: 44px; /* ≥44px touch target (playbook §7) */
  padding-left: 32px;
  color: #ddd;
  font-size: var(--text-xs);
  width: 100%;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s, background 0.2s;
}
.search-input::placeholder { color: rgba(255,255,255,0.2); }
.search-input:focus {
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.45); /* focus ring ≥3:1 contrast (playbook §7) */
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #444;
  pointer-events: none;
  width: 14px;
  height: 14px;
}

.search-clear {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #444;
  font-size: 14px;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  display: none;
  transition: color 0.15s;
}
.search-clear:hover { color: #aaa; }
.search-input:not(:placeholder-shown) ~ .search-clear { display: block; }

/* ── Category box ───────────────────────────────────────────── */
.category-box {
  overflow: hidden;
}

.category-rail {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: inherit;
  overflow: hidden;
}

.cat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 44px; /* ≥44px touch target (playbook §7) */
  border: none;
  border-radius: 0;
  border-left: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.cat-btn:active { opacity: 0.65; transition-duration: 55ms; }

.cat-btn__icon {
  font-size: 13px;
  width: 18px;
  text-align: center;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.35;
  transition: opacity 0.15s, color 0.15s;
}
.cat-btn__icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.cat-btn__label {
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  transition: color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-btn:hover { background: rgba(255,255,255,0.03); }
.cat-btn:hover .cat-btn__label { color: rgba(255,255,255,0.7); }
.cat-btn:hover .cat-btn__icon  { opacity: 0.6; }

.cat-btn.active { background: rgba(255,255,255,0.06); border-left-color: #ffffff; }
.cat-btn.active .cat-btn__label { color: #fff; }
.cat-btn.active .cat-btn__icon  { opacity: 1; color: #ffffff; }

.cat-btn__count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}
.cat-btn__count:empty { display: none; }

/* OEM BUILD category — full-width separator, stock badge */
.cat-btn--oem {
  border-bottom: 1px solid #1e1e1e;
  position: relative;
}
.cat-btn--oem .cat-btn__icon { color: #60a5fa; opacity: 0.7; }
.cat-btn--oem.active .cat-btn__icon { opacity: 1; }

.cat-btn--oem .oem-stock-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: #2a2a2a;
  color: #666;
  font-size: 8px;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Scrollable parts area ──────────────────────────────────── */
.panel-scroll {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* Smooth scroll track */
.panel-scroll::-webkit-scrollbar       { width: 3px; }
.panel-scroll::-webkit-scrollbar-track { background: transparent; }
.panel-scroll::-webkit-scrollbar-thumb { background: var(--c-surface-4); border-radius: 2px; }

/* ── Parts list wrapper ─────────────────────────────────────── */
.parts-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  animation: partsFadeIn var(--t-entrance);
}
@keyframes partsFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Per-item entrance stagger — 50ms between list items (playbook §1) */
.parts-list .part-card {
  animation: partsFadeIn var(--t-entrance) both;
}
.parts-list .part-card:nth-child(1) { animation-delay: 0s; }
.parts-list .part-card:nth-child(2) { animation-delay: calc(var(--t-stagger) * 1); }
.parts-list .part-card:nth-child(3) { animation-delay: calc(var(--t-stagger) * 2); }
.parts-list .part-card:nth-child(4) { animation-delay: calc(var(--t-stagger) * 3); }
.parts-list .part-card:nth-child(5) { animation-delay: calc(var(--t-stagger) * 4); }
.parts-list .part-card:nth-child(n+6) { animation-delay: calc(var(--t-stagger) * 5); }

/* ── Part card — horizontal split layout ────────────────────── */
.part-card {
  /* Override mv-box radius to be slightly smaller for cards */
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  padding: var(--sp-2);
  cursor: pointer;
  transition:
    border-color var(--t-fast),
    background var(--t-fast),
    transform var(--t-fast),
    box-shadow var(--t-fast);
  overflow: hidden;
}

.part-card:hover {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.part-card + .part-card { border-top: none; }

.part-card.installed {
  border-color: rgba(74, 222, 128, 0.22);
}
.part-card.installed:hover {
  border-color: rgba(74, 222, 128, 0.38);
}

/* ── LEFT: Square thumbnail ─────────────────────────────────── */
.part-card__thumb {
  flex: 0 0 auto;
  width: 48px;
  aspect-ratio: 1 / 1;
  align-self: center;
  border-radius: 6px;
  background: linear-gradient(135deg, #1a1a1a, #111);
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

/* Remove dot-grid texture */
.part-card__thumb::before {
  display: none;
}

.part-card__thumb-icon {
  font-size: 24px;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.part-card__thumb-icon svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
  stroke-width: 1.5;
  fill: none;
}

/* Installed state: faint tint on thumb */
.part-card.installed .part-card__thumb {
  border-color: rgba(74, 222, 128, 0.22);
  background: rgba(74, 222, 128, 0.05);
}

/* ── RIGHT: Info column ─────────────────────────────────────── */
.part-card__body {
  flex: 1;
  min-width: 0;
  padding: var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.part-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1);
}

.part-card__cat-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  font-size: 8px;
  border-radius: 3px;
  background: rgba(255,255,255,0.15);
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.part-card__brand {
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
}

.part-card__name {
  font-size: 14px;
  font-weight: 600;
  color: #e8e8e8;
  line-height: 1.2;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.part-card__desc {
  font-size: 12px;
  color: #555;
  line-height: 1.6; /* premium body line-height (playbook §2 v52/v54) */
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.part-card__price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1);
  margin-top: 2px;
}

.part-card__price {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #e0e0e0;
  letter-spacing: -0.01em;
}

.part-card__perf {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.perf-chip {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
}
.perf-chip--hp     { color: var(--c-hp);     border-color: rgba(224,92,92,0.18); }
.perf-chip--torque { color: var(--c-torque);  border-color: rgba(212,137,74,0.18); }
.perf-chip--weight     { color: var(--c-weight);  border-color: rgba(74,222,128,0.18); }
.perf-chip--weight-neg { color: var(--c-weight);  border-color: rgba(74,222,128,0.18); }
.perf-chip--weight-pos { color: var(--c-error);   border-color: rgba(248,113,113,0.18); }

/* Footer row: difficulty + time + action */
.part-card__footer {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: 2px;
}

.difficulty-dots {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.difficulty-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--c-surface-4);
}
.difficulty-dot.filled { background: var(--c-warning); }

.meta-item {
  font-size: 12px;
  color: var(--c-text-3);
  font-family: var(--font-display);
  flex-shrink: 0;
}

.part-card__action-wrap {
  margin-left: auto;
}

/* Part card install button — gold outline on hover */
.part-card .btn--primary:hover {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: none;
  transform: none;
}

/* Illegal strip — spans full card width via flex-wrap trick */
.illegal-strip {
  flex: 0 0 100%;
  margin-top: var(--sp-1);
  padding: 3px var(--sp-2);
  background: rgba(248,113,113,0.06);
  border: 1px solid rgba(248,113,113,0.18);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--c-error);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* Make part-card wrap so illegal-strip goes full-width below */
.part-card { flex-wrap: wrap; }

/* Exhaust sound preview button */
.btn--sound {
  padding: 3px 6px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #FFFFFF;
  border-radius: 4px;
  margin-left: 4px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn--sound:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
}

/* ── Empty state ────────────────────────────────────────────── */
.parts-empty-msg {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--c-text-3);
  font-size: var(--text-xs);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.parts-empty-msg__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-2);
  opacity: 0.15;
}
.parts-empty-msg__icon svg {
  width: 36px;
  height: 36px;
  stroke: #ffffff;
  stroke-width: 1.5;
  fill: none;
}

.parts-empty-msg__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text-2);
  letter-spacing: 0.02em;
  margin: 0;
}

.parts-empty-msg__hint {
  font-size: 12px;
  color: var(--c-text-3);
  line-height: 1.5;
  max-width: 200px;
  margin: 0;
}

.parts-empty-msg p:first-child {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--c-text-2);
  margin-bottom: var(--sp-2);
  opacity: 0.12;
  letter-spacing: -0.03em;
}

/* ================================================================
   OEM Configurator — BMW Build-Your-Own style
   ================================================================ */

.oem-panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 0;
  flex: 1;
}

/* ── Progress dots ─────────────────────────────────────────── */
.oem-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--sp-3) var(--sp-2);
  background: rgba(17, 17, 17, 0.92);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  
}

.oem-dot {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--r-full);
  transition: background var(--t-fast);
}
.oem-dot:hover { background: rgba(255,255,255,0.05); }

.oem-dot__num {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--c-text-3);
  background: var(--c-surface-3);
  border: 1px solid var(--c-border-mid);
  transition: all var(--t-fast);
  flex-shrink: 0;
}

.oem-dot__label {
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-3);
  transition: color var(--t-fast);
}

.oem-dot.active .oem-dot__num {
  background: var(--c-text);
  color: var(--c-text-inv);
  border-color: var(--c-text);
}
.oem-dot.active .oem-dot__label { color: var(--c-text); }

.oem-dot.done .oem-dot__num {
  background: var(--c-success);
  color: #000;
  border-color: var(--c-success);
}
.oem-dot.done .oem-dot__label { color: var(--c-text-2); }

.oem-dot__line {
  width: 12px;
  height: 1px;
  background: var(--c-border-mid);
  flex-shrink: 0;
}

/* ── Steps container ───────────────────────────────────────── */
.oem-steps {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.oem-step {
  animation: oemFadeIn 0.2s ease;
}
@keyframes oemFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Sub-section pills ─────────────────────────────────────── */
.oem-pills {
  display: flex;
  gap: 4px;
  padding: 0 0 var(--sp-2);
}

.oem-pill {
  padding: 5px 12px;
  border: 1px solid var(--c-border-mid);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--c-text-3);
  font-size: var(--text-2xs);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--t-fast);
}
.oem-pill:hover { border-color: var(--c-border-bright); color: var(--c-text-2); }
.oem-pill.active {
  background: rgba(255,255,255,0.10);
  border-color: var(--c-text-2);
  color: var(--c-text);
}

/* ── Color group ───────────────────────────────────────────── */
.oem-group {
  margin-bottom: var(--sp-3);
}
.oem-group__label {
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-text-3);
  padding: 0 0 var(--sp-1);
}

/* ── Color row ─────────────────────────────────────────────── */
.oem-color-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: 7px 8px;
  border: none;
  border-left: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.oem-color-row:hover { background: rgba(255,255,255,0.04); }
.oem-color-row.selected {
  background: rgba(255,255,255,0.06);
  border-left-color: var(--c-text);
}

.oem-color-swatch {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.oem-color-name {
  flex: 1;
  font-size: var(--text-2xs);
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--c-text-2);
  text-align: left;
}
.oem-color-row.selected .oem-color-name { color: var(--c-text); }

.oem-color-price {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--c-text-3);
  flex-shrink: 0;
}

.oem-detail {
  font-size: 8px;
  color: var(--c-warning);
  font-weight: 600;
}

.oem-tagline {
  padding: var(--sp-2) var(--sp-2);
  font-size: var(--text-2xs);
  font-style: italic;
  color: var(--c-text-3);
  border-top: 1px solid var(--c-border);
  margin-top: var(--sp-1);
}

/* ── Wheel row ─────────────────────────────────────────────── */
.oem-wheel-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: 8px;
  border: 1px solid var(--c-border);
  border-left: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  border-radius: var(--r-md);
  margin-bottom: 4px;
  transition: all var(--t-fast);
}
.oem-wheel-row:hover { background: rgba(255,255,255,0.04); border-color: var(--c-border-mid); }
.oem-wheel-row.selected {
  background: rgba(255,255,255,0.06);
  border-left-color: var(--c-text);
  border-color: var(--c-border-bright);
}

.oem-wheel-thumb {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.oem-wheel-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.oem-wheel-name {
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-text-2);
  line-height: 1.2;
}
.oem-wheel-row.selected .oem-wheel-name { color: var(--c-text); }
.oem-wheel-type {
  font-size: 8px;
  color: var(--c-text-3);
  letter-spacing: 0.02em;
}

.oem-wheel-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.oem-wheel-price {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--c-text-3);
}

/* ── Trim row ──────────────────────────────────────────────── */
.oem-trim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px;
  border: none;
  border-left: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  transition: all var(--t-fast);
}
.oem-trim-row:hover { background: rgba(255,255,255,0.04); }
.oem-trim-row.selected {
  background: rgba(255,255,255,0.06);
  border-left-color: var(--c-text);
}

.oem-trim-name {
  font-size: var(--text-2xs);
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--c-text-2);
}
.oem-trim-row.selected .oem-trim-name { color: var(--c-text); }

.oem-trim-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.oem-trim-price {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--c-text-3);
}

/* ── OEM badge ─────────────────────────────────────────────── */
.oem-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(251,178,78,0.12);
  color: var(--c-warning);
  border: 1px solid rgba(251,178,78,0.20);
}

/* ── Packages grid ─────────────────────────────────────────── */
.oem-pkg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}

.oem-pkg-card {
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t-fast);
}
.oem-pkg-card.added { border-color: rgba(74, 222, 128, 0.22); }

.oem-pkg-img {
  height: 56px;
  border-bottom: 1px solid var(--c-border);
}

.oem-pkg-body {
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.oem-pkg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1);
}

.oem-pkg-name {
  font-size: var(--text-xs);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-text);
}

.oem-pkg-price {
  font-size: var(--text-sm);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--c-text);
}

.oem-pkg-desc {
  font-size: var(--text-2xs);
  color: var(--c-text-3);
  line-height: 1.4;
}

.oem-pkg-dep {
  font-size: 12px;
  color: var(--c-warning);
  font-family: var(--font-display);
  font-weight: 600;
}

.oem-pkg-btn { margin-top: 4px; align-self: flex-start; }

/* ── Summary ───────────────────────────────────────────────── */
.oem-sum-header {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.02em;
  padding-bottom: 2px;
}

.oem-sum-code {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--c-text-3);
  padding-bottom: var(--sp-3);
}

.oem-sum-config {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: var(--sp-3);
}
.oem-sum-item {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-2xs);
  color: var(--c-text-2);
}
.oem-sum-label {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-3);
}

.oem-sum-divider {
  height: 1px;
  background: var(--c-border);
  margin-bottom: var(--sp-3);
}

.oem-sum-breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: var(--sp-2);
}
.oem-sum-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-2xs);
  color: var(--c-text-3);
}

.oem-sum-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--c-text);
  padding: var(--sp-2) 0;
  border-top: 1px solid var(--c-border-mid);
}

.oem-sum-actions {
  display: flex;
  gap: var(--sp-2);
  padding-top: var(--sp-2);
}

/* ── OEM Price breakdown table ─────────────────────────────── */
.oem-price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-2xs);
  color: var(--c-text-2);
  margin-bottom: var(--sp-2);
}
.oem-price-table thead th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-text-3);
  text-align: left;
  padding: var(--sp-1) 0;
  border-bottom: 1px solid var(--c-border);
}
.oem-price-table thead th:last-child { text-align: right; }
.oem-price-row td {
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.oem-price-row--included td { color: var(--c-text-3); }
.oem-price-cell { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.oem-price-total td {
  padding: var(--sp-2) 0;
  border-top: 1px solid var(--c-border-mid);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--c-text);
}
.oem-price-total .oem-price-cell {
  font-size: var(--text-md);
}

/* ── Navigation (Back / Next) ──────────────────────────────── */
.oem-nav {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-2) 0 0;
  flex-shrink: 0;
}
.oem-nav__back { min-width: 70px; }
.oem-nav__next { min-width: 90px; margin-left: auto; }

/* ── Build tab OEM pill ────────────────────────────────────── */
.build-type-pill {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 4px;
}
.build-type-pill--oem {
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
  border: 1px solid rgba(59,130,246,0.20);
}
.build-type-pill--aftermarket {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.20);
}

/* OEM section header in build tab */
.build-section-header {
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-text-3);
  padding: var(--sp-2) 0 var(--sp-1);
}

/* ── Badge overrides (premium colors) ──────────────────────── */
.badge--popular { background: #1e2d1e; color: #4caf50; border: 1px solid #2d4a2d; }
.badge--premium { background: #2d1e0a; color: #e08040; border: 1px solid #4a2d0a; }
.badge--track   { background: #2d1010; color: #e03f3f; border: 1px solid #4a1010; }

/* (spacer picker moved to right panel — see right-panel.css) */

/* ════════════════════════════════════════════════════════════════
   Phase 41 — Slot Detail Panel (click-to-select aftermarket UI)
   ════════════════════════════════════════════════════════════════ */

.slot-detail-panel {
  display: none;
  padding: var(--sp-3);
  overflow-y: auto;
  flex: 1;
  animation: slotPanelIn 0.2s ease-out;
  scroll-behavior: smooth;
}
.slot-detail-panel::-webkit-scrollbar       { width: 3px; }
.slot-detail-panel::-webkit-scrollbar-track  { background: transparent; }
.slot-detail-panel::-webkit-scrollbar-thumb  { background: var(--c-surface-4); border-radius: 2px; }
@keyframes slotPanelIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Staggered card entrance animation — 50ms between list items (playbook §1) */
.slot-detail__list .slot-part-card {
  animation: slotCardIn var(--t-entrance) both;
}
.slot-detail__list .slot-part-card:nth-child(1) { animation-delay: 0s; }
.slot-detail__list .slot-part-card:nth-child(2) { animation-delay: calc(var(--t-stagger) * 1); }
.slot-detail__list .slot-part-card:nth-child(3) { animation-delay: calc(var(--t-stagger) * 2); }
.slot-detail__list .slot-part-card:nth-child(4) { animation-delay: calc(var(--t-stagger) * 3); }
.slot-detail__list .slot-part-card:nth-child(5) { animation-delay: calc(var(--t-stagger) * 4); }
.slot-detail__list .slot-part-card:nth-child(n+6) { animation-delay: calc(var(--t-stagger) * 5); }
@keyframes slotCardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */
.slot-detail__header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.slot-detail__header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.slot-detail__back {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  color: var(--c-text-2);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--t-fast);
}
.slot-detail__back:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.slot-detail__title {
  flex: 1;
  min-width: 0;
}
.slot-detail__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: capitalize;
}
.slot-detail__badge {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4ade80;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.15);
  border-radius: 4px;
  padding: 2px 6px;
  display: inline-block;
  margin-top: 2px;
  transition: all 0.2s;
}
.slot-detail__badge--count {
  color: #ffffff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

.slot-detail__nav {
  display: flex;
  gap: 4px;
}
.slot-detail__prev,
.slot-detail__next {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  color: var(--c-text-2);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--t-fast);
}
.slot-detail__prev:hover,
.slot-detail__next:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.slot-detail__pos {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--c-text-3);
  letter-spacing: 0.05em;
  min-width: 34px;
  text-align: center;
}

/* ── Loading / Empty ── */
.slot-detail__loading {
  text-align: center;
  padding: var(--sp-8) var(--sp-3);
  color: var(--c-text-3);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}
.slot-detail__loading::before {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: slotSpin 0.8s linear infinite;
}
@keyframes slotSpin {
  to { transform: rotate(360deg); }
}

.slot-detail__empty {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--c-text-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.slot-detail__empty-icon {
  font-size: 28px;
  opacity: 0.15;
  margin-bottom: var(--sp-1);
}
.slot-detail__empty p {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--c-text-2);
  margin: 0;
}
.slot-detail__empty span {
  font-size: 12px;
  color: var(--c-text-3);
  line-height: 1.5;
}

/* ── Count row (#A3): metadata line — count + price range + incompat note ── */
.slot-detail__count-row {
  display: flex;
  align-items: center;
  margin-bottom: var(--sp-2);
}
.slot-detail__count {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-3);
}
/* "X not compatible" — informational, not an alarm. Muted, not bright orange. */
.slot-detail__incompat {
  color: var(--c-text-4, rgba(255,255,255,0.38));
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.01em;
}

/* ── Controls strip (#A3): filter (flex) + sort (right) on one tidy row.
   justify-content:flex-end keeps a lone Sort right-aligned when there is no
   filter input; the search input's flex:1 fills the row when present. ── */
.slot-detail__controls-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.slot-detail__sort {
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-sm);
  color: var(--c-text-3);
  font-size: 12px;
  font-family: var(--font-display);
  padding: 4px 8px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.slot-detail__sort:hover { border-color: rgba(255,255,255,0.15); color: var(--c-text-2); }
.slot-detail__sort:focus { border-color: rgba(255,255,255,0.3); }
.slot-detail__sort:focus-visible { outline: 2px solid var(--c-accent-bright); outline-offset: 2px; }
.slot-detail__sort option { background: #0e0e10; color: #ccc; }

/* ── Inline filter input ── */
.slot-detail__search {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-md);
  height: 30px;
  padding: 0 10px;
  color: var(--c-text);
  font-size: 12px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.slot-detail__search::placeholder { color: rgba(255,255,255,0.28); }
.slot-detail__search:focus {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.05);
}
.slot-detail__search:focus-visible { outline: 2px solid var(--c-accent-bright); outline-offset: 2px; }

.slot-detail__no-results {
  text-align: center;
  padding: var(--sp-6) var(--sp-3);
  font-size: 12px;
  color: var(--c-text-3);
  font-style: italic;
}

/* ── Part Card — image-forward, ELEVATED (sits on a lighter solid surface than
   the dark glass panel → real depth, not a flat list item). Layered-grey depth
   + a contact shadow makes each card read as a distinct raised object. ── */
.slot-part-card {
  background: var(--c-surface-2);            /* #181818 — lighter than the panel */
  border: 1px solid var(--c-border-mid);     /* visible edge, not 0.06 */
  border-radius: var(--r-card);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.45);    /* resting contact shadow = lifted */
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s, background 0.18s;
}
.slot-part-card:hover {
  background: var(--c-surface-3);            /* #222 — rises on hover */
  border-color: var(--c-border-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.10);
}
/* Selected = the ONE chosen part → gold accent (money/active role), not white. */
.slot-part-card.selected {
  border-color: var(--c-active);
  box-shadow: 0 0 0 1px var(--c-active-border), 0 10px 26px rgba(0,0,0,0.5), 0 0 28px var(--c-active-glow);
}
.slot-part-card.selected .slot-part__select-btn {
  background: var(--c-active);
  color: var(--c-text-inv);
  border-color: var(--c-active);
}
.slot-part-card.selected .slot-part__cover {
  border-bottom-color: var(--c-active-border);
}

/* ── Cover image (big, full width) ── */
.slot-part__cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1e, #111114);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.slot-part__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.slot-part-card:hover .slot-part__cover-img {
  transform: scale(1.04);
}
.slot-part__cover--fallback {
  background: linear-gradient(160deg, #18181f 0%, #0e0e12 100%);
}
.slot-part__cover-letter {
  font-size: 36px;
  font-weight: 900;
  font-family: var(--font-display);
  text-transform: uppercase;
  user-select: none;
  opacity: 0.6;
}

/* Shimmer while image loads */
.slot-part__cover--loading {
  background: linear-gradient(90deg, #1a1a1e 25%, #222228 50%, #1a1a1e 75%);
  background-size: 200% 100%;
  animation: coverShimmer 1.5s ease-in-out infinite;
}
@keyframes coverShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Cover image cycling nav (left/right arrows + counter) ── */
.slot-part__cover-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #f5f5f5;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  cursor: pointer;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  opacity: 0.55;
  transition: opacity 0.2s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  z-index: 3;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  user-select: none;
}
.slot-part__cover-nav--prev { left: 8px; }
.slot-part__cover-nav--next { right: 8px; }
.slot-part__cover:hover .slot-part__cover-nav,
.slot-part-card:hover .slot-part__cover-nav {
  opacity: 1;
}
/* On touch devices (no hover), keep arrows visible */
@media (hover: none) {
  .slot-part__cover-nav { opacity: 1; }
}
.slot-part__cover-nav:hover {
  background: rgba(255, 255, 255, 0.85);
  color: #0a0a0a;
  border-color: #ffffff;
}
.slot-part__cover-nav:active {
  transform: translateY(-50%) scale(0.92);
}
.slot-part__cover-nav:focus-visible {
  opacity: 1;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.slot-part__cover-counter {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #eaeaea;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-display);
  pointer-events: none;
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.slot-part__cover-idx {
  color: #ffffff;
}

/* Clickable cover cursor hint when we have multiple images or a fullscreen option */
.slot-part__cover-img {
  cursor: zoom-in;
}

/* ── Info block (below image) ── */
.slot-part__info {
  padding: 13px 14px 14px;
}
.slot-part__header {
  flex: 1;
  min-width: 0;
}
.slot-part__brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-3);
  margin-bottom: 2px;
}
.slot-part__name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slot-part__price {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  font-family: var(--font-display);
}
.slot-part__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.slot-part__weight-row {
  margin: 6px 0;
}
.slot-part-card { position: relative; }
.slot-part__buy-link--primary {
  text-decoration: none;
}

/* Finish selector (e.g. ADRO hood: full carbon / painted / painted + carbon vents) */
.slot-part__finish {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.slot-part__finish-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.slot-part__finish-select {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.35);
  color: #e8e8e8;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  cursor: pointer;
}
.slot-part__finish-select:hover { border-color: rgba(255,255,255,0.25); }
.slot-part__finish-select:focus { outline: none; border-color: var(--c-accent, #ffffff); }
/* Keyboard focus ring the :focus rule above suppresses (#A8 / WCAG 2.4.7). */
.slot-part__finish-select:focus-visible { outline: 2px solid var(--c-accent-bright); outline-offset: 2px; }

/* Actions row in info block */
.slot-part__info .slot-part__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: 8px;
  padding-top: 0;
  border-top: none;
}

/* ── Details dropdown toggle ── */
.slot-part__details-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px; /* ≥44px touch target (playbook §7) */
  padding: 6px 12px;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.04);
  background: rgba(255,255,255,0.02);
  color: var(--c-text-3);
  font: 600 9px var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.slot-part__details-toggle:hover {
  background: rgba(255,255,255,0.05);
  color: var(--c-text-2);
}
.slot-part__details-toggle svg {
  transition: transform 0.2s;
}
.slot-part-card.expanded .slot-part__details-toggle svg {
  transform: rotate(180deg);
}
.slot-part-card.expanded .slot-part__details-toggle {
  color: #ffffff;
}

/* ── Details content (collapsed by default) ── */
.slot-part__details {
  display: none;
  padding: 8px 12px 12px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.slot-part-card.expanded .slot-part__details {
  display: block;
  animation: detailsSlideIn 0.2s ease-out;
}
@keyframes detailsSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slot-part__desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--c-text-3);
  margin-bottom: var(--sp-2);
}

/* ── Image Gallery Strip ── */
.slot-part__gallery {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: var(--sp-2) 0;
  margin: var(--sp-1) 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.slot-part__gallery::-webkit-scrollbar { height: 0; transition: height 0.2s; }
.slot-part__gallery:hover::-webkit-scrollbar { height: 3px; }
.slot-part__gallery::-webkit-scrollbar-track { background: transparent; }
.slot-part__gallery::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.slot-part__gallery::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }
.slot-part__gallery-img {
  flex: 0 0 72px;
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.06);
  scroll-snap-align: start;
  cursor: pointer;
  transition: border-color 0.15s, opacity 0.15s;
  opacity: 0.8;
}
.slot-part__gallery-img:hover {
  opacity: 1;
  border-color: rgba(255,255,255,0.35);
}

/* Active thumb = the image currently shown on the cover */
.slot-part__gallery-img--active {
  opacity: 1;
  border-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}

/* Large preview on gallery image click */
.slot-part__gallery-img.previewing {
  border-color: #ffffff;
}
.slot-part__preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: previewFadeIn 0.2s ease-out;
}
@keyframes previewFadeIn { from { opacity: 0; } to { opacity: 1; } }
.slot-part__preview-overlay img {
  max-width: 85vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* ── Reliability Bars ── */
.slot-part__reliability {
  margin: var(--sp-2) 0;
  padding: var(--sp-2) 0;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.slot-part__rel-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.slot-part__rel-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-3);
  width: 52px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.slot-part__rel-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.slot-part__rel-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.slot-part__rel-val {
  font-size: 12px;
  color: var(--c-text-3);
  width: 26px;
  text-align: right;
  flex-shrink: 0;
}

.slot-part__rating-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.slot-part__stars {
  font-size: 12px;
  color: var(--c-active);
  letter-spacing: 1px;
}
.slot-part__review-count {
  font-size: 12px;
  color: var(--c-text-3);
}

/* ── Install Info ── */
.slot-part__install {
  margin: var(--sp-2) 0;
  padding: var(--sp-2) 0;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.slot-part__install-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--c-text-3);
}
.slot-part__install-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
}
.slot-part__install-dots {
  display: flex;
  gap: 3px;
}
.slot-part__install-dots .diff-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}
.slot-part__install-dots .diff-dot.filled {
  background: #ffffff;
  border-color: #ffffff;
}

.slot-part__pro-badge {
  font-size: 12px;
  font-weight: 600;
  color: #e08040;
  background: rgba(224,128,64,0.10);
  border: 1px solid rgba(224,128,64,0.20);
  border-radius: 4px;
  padding: 2px 6px;
  display: inline-block;
  margin-top: 4px;
}

/* ── Fitment Warnings ── */
.slot-part__fitment {
  margin: var(--sp-2) 0;
  padding: var(--sp-2) 0;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.slot-part__fitment-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--c-text-3);
  margin-bottom: 4px;
}
.slot-part__fitment-icon {
  flex-shrink: 0;
  font-size: 12px;
}
.slot-part__fitment-item--incompatible { color: #e05050; }
.slot-part__fitment-item--requires-replacement { color: #e0a040; }
.slot-part__fitment-item--relocation { color: var(--c-text-3); }

/* ── Color Variants ── */
.slot-part__variants {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: var(--sp-2) 0;
  padding-top: var(--sp-2);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.slot-part__variant {
  font-size: 12px;
  color: var(--c-text-3);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 2px 6px;
}

/* ── Actions ── */
.slot-part__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.slot-part__select-btn {
  flex: 1;
}

.slot-part__buy-link {
  font-size: 12px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.7;
  transition: opacity var(--t-fast), color var(--t-fast);
}
.slot-part__buy-link:hover {
  opacity: 1;
  color: var(--c-accent, #ffffff);   /* monochrome — was a stray gold (#dfc06c) */
}
/* "Buy" pill — gives the secondary outbound link real conversion weight (white accent). */
.slot-part__buy-link--gold {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-pill, 999px);
  border: 1px solid var(--c-active-border);
  background: var(--c-active-glow);
  color: var(--c-active);
  opacity: 1;
  min-height: 28px;
}
.slot-part__buy-link--gold:hover {
  background: var(--c-active);
  color: var(--c-text-inv);
  border-color: var(--c-active);
}

/* #A10 — "Find installer" CTA. Neutral CTA-blue affordance so gold stays
   reserved for the Buy action; sits beside Buy for parts that need a shop. */
.slot-part__installer-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-decoration: none;
  border-radius: var(--r-pill, 999px);
  border: 1px solid var(--c-cta-dim, rgba(74,143,212,0.40));
  background: var(--c-cta-glow, rgba(74,143,212,0.10));
  color: var(--c-cta, #4a8fd4);
  min-height: 28px;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.slot-part__installer-link:hover {
  background: var(--c-cta, #4a8fd4);
  color: #ffffff;
  border-color: var(--c-cta, #4a8fd4);
}
.slot-part__installer-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Focus styles for keyboard navigation */
.slot-part__select-btn:focus-visible,
.slot-part__buy-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
.slot-detail__back:focus-visible,
.slot-detail__prev:focus-visible,
.slot-detail__next:focus-visible {
  outline: 2px solid rgba(255,255,255,0.6);
  outline-offset: 1px;
}
.slot-part-card:focus-visible {
  outline: 2px solid rgba(255,255,255,0.7); /* #A8: was 0.4 (~3.6:1) → ~5:1 */
  outline-offset: 1px;
}

/* ════════════════════════════════════════════════════════════════════
   Click-a-part hint — Grouped, searchable category browser (v2)
   See app.js → buildGroupedChipRail() for the JS that drives this.
   ════════════════════════════════════════════════════════════════════ */

.click-part-hint {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-3) var(--sp-6);
  color: var(--c-text-3);
  overflow-y: auto;
  max-height: calc(100vh - 100px);
}
.click-part-hint::-webkit-scrollbar       { width: 4px; }
.click-part-hint::-webkit-scrollbar-track { background: transparent; }
.click-part-hint::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

/* ── Header ──────────────────────────────────────────────────────── */
.cph-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  padding-bottom: var(--sp-1);
}
.cph-icon {
  font-size: 28px;
  opacity: 0.18;
  animation: cphPulse 2.5s ease-in-out infinite;
  margin-bottom: 2px;
}
@keyframes cphPulse {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50%      { opacity: 0.30; transform: scale(1.05); }
}
.cph-title {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--c-text-2);
  letter-spacing: 0.02em;
  margin: 0;
}
.cph-sub {
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-3);
  opacity: 0.55;
  margin: 2px 0 0 0;
}

/* ── Search ──────────────────────────────────────────────────────── */
.cph-search {
  position: relative;
  margin: 2px 0 var(--sp-2);
}
.cph-search-input {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  height: 44px; /* ≥44px touch target (playbook §7) */
  padding: 0 30px 0 30px;
  color: #ddd;
  font-size: 12px;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s, background 0.2s;
}
.cph-search-input::placeholder { color: rgba(255,255,255,0.22); }
.cph-search-input:focus {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.45); /* focus ring ≥3:1 contrast (playbook §7) */
}
.cph-search-icon {
  position: absolute;
  left: 9px; top: 50%;
  transform: translateY(-50%);
  width: 13px; height: 13px;
  color: rgba(255,255,255,0.28);
  pointer-events: none;
}
.cph-search-clear {
  display: none;
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: rgba(255,255,255,0.4);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}
.cph-search-clear:hover { color: #fff; }

/* ── Sections list ───────────────────────────────────────────────── */
.cph-sections {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cph-section {
  border-radius: var(--r-card); /* premium 14–20px band via token (playbook §3) */
  background: var(--c-surface-1);          /* #111 — a real surface, distinct from the panel */
  border: 1px solid var(--c-border);
  overflow: hidden;
  transition: background 0.15s, border-color 0.15s;
}
.cph-section.open {
  background: var(--c-surface-2);          /* opens to a lighter grey = "active group" */
  border-color: var(--c-border-mid);
}
.cph-section--empty,
.cph-section--filtered-out { display: none; }

/* Popular section gets a subtle gold accent */
.cph-section--gold {
  background: rgba(255,255,255, 0.04);
  border-color: rgba(255,255,255, 0.15);
}
.cph-section--gold .cph-section__title { color: var(--c-active); }
.cph-section--gold .cph-section__icon  { filter: drop-shadow(0 0 6px rgba(255,255,255, 0.4)); }

/* ── Section header ──────────────────────────────────────────────── */
.cph-section__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  transition: background 0.12s;
}
.cph-section__head:hover  { background: rgba(255,255,255,0.03); }
.cph-section__head:active { opacity: 0.7; transition-duration: 50ms; }

.cph-section__icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
}
.cph-section__title {
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-1);
}
.cph-section__counter {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-3);
  opacity: 0.6;
  font-family: var(--font-mono);
  margin-left: auto;
}
.cph-section__counter:empty { display: none; }
.cph-section__caret {
  font-size: 12px;
  color: var(--c-text-3);
  opacity: 0.55;
  transition: transform 0.2s ease, color 0.15s;
  margin-left: 4px;
}
.cph-section.open .cph-section__caret {
  transform: rotate(180deg);
  color: var(--c-text-1);
  opacity: 0.9;
}

/* ── Section body (chip grid) ───────────────────────────────────── */
.cph-section__body {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 10px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.25s ease, padding 0.2s ease, opacity 0.2s ease;
}
.cph-section.open .cph-section__body {
  max-height: 600px;
  padding: 4px 10px 12px;
  opacity: 1;
}
/* Search mode forces all matching sections open */
.cph--searching .cph-section:not(.cph-section--filtered-out) .cph-section__body {
  max-height: 600px;
  padding: 4px 10px 12px;
  opacity: 1;
}
.cph--searching .cph-section__caret { transform: rotate(180deg); }

/* ── Chip ────────────────────────────────────────────────────────── */
.cph-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.025);
  color: var(--c-text-2);
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.12s;
}
.cph-chip:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.28);
  color: #ffffff;
  transform: translateY(-1px);
}
.cph-chip:active {
  transform: scale(0.95);
  transition-duration: 60ms;
}
.cph-chip__label { line-height: 1; }

/* ── Count tier badges ──────────────────────────────────────────── */
.cph-chip__count {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
  font-family: var(--font-mono);
}
/* High inventory (20+) — green */
.cph-chip__count--high { background: rgba(74, 222, 128, 0.16); color: #4ade80; }
/* Mid inventory (5-19) — gold */
.cph-chip__count--mid  { background: rgba(255,255,255, 0.16); color: var(--c-active); }
/* Low inventory (1-4) — dim red */
.cph-chip__count--low  { background: rgba(248, 113, 113, 0.14); color: #f87171; }
/* Loading / zero state */
.cph-chip__count--zero { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.25); }

/* ── Catalog footer ──────────────────────────────────────────────── */
.cph-catalog-size {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--c-text-3);
  text-align: center;
  margin-top: var(--sp-2);
  opacity: 0.5;
  letter-spacing: 0.03em;
}

/* ── Hover shimmer (interactive hint on 3D parts) ── */
@keyframes slot-hover-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* ─── Zone-paint chip strip + editor ──────────────────────────────── */

.zone-paint {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}

.zone-paint__row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.zone-paint__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-dim, #888);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 4px;
}

.zone-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--c-border, #333);
  border-radius: 14px;
  background: var(--c-bg-elev1, #1a1a1a);
  color: var(--c-text, #ccc);
  font-size: 12px;
  cursor: pointer;
  transition: background var(--t-fast, 0.15s), border-color var(--t-fast, 0.15s);
}
.zone-chip:hover { background: var(--c-bg-elev2, #222); }
.zone-chip.is-active {
  border-color: var(--c-accent, #3aa2ff);
  background: var(--c-accent-dim, rgba(58, 162, 255, 0.12));
  color: var(--c-text-bright, #fff);
}

.zone-chip__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: var(--zone-swatch-color, #888);
}
.zone-chip__swatch--carbon {
  background: linear-gradient(45deg, #1a1a1a 25%, #2a2a2a 25%, #2a2a2a 50%, #1a1a1a 50%, #1a1a1a 75%, #2a2a2a 75%);
  background-size: 6px 6px;
}

.zone-paint__editor-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--c-border, #333);
  border-radius: 50%;
  background: transparent;
  color: var(--c-text-dim, #888);
  cursor: pointer;
  transition: background var(--t-fast, 0.15s), color var(--t-fast, 0.15s);
}
.zone-paint__editor-toggle:hover { background: var(--c-bg-elev2, #222); color: var(--c-text, #ccc); }
.zone-paint__editor-toggle.is-active {
  background: var(--c-accent-dim, rgba(58, 162, 255, 0.12));
  color: var(--c-accent, #3aa2ff);
  border-color: var(--c-accent, #3aa2ff);
}

.zone-editor {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: var(--c-bg-elev0, #0d0d0d);
  border: 1px solid var(--c-border, #333);
  border-radius: 8px;
}
.zone-editor.is-open { display: flex; }

.zone-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 8px;
}
.zone-row__label {
  font-size: 12px;
  color: var(--c-text-dim, #888);
}
.zone-row__buttons {
  display: flex;
  gap: 4px;
}
.zone-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid var(--c-border, #333);
  border-radius: 4px;
  background: var(--c-bg-elev1, #1a1a1a);
  color: var(--c-text-dim, #888);
  font-size: 12px;
  cursor: pointer;
  transition: background var(--t-fast, 0.15s), border-color var(--t-fast, 0.15s), color var(--t-fast, 0.15s);
}
.zone-btn:hover { background: var(--c-bg-elev2, #222); color: var(--c-text, #ccc); }
.zone-btn.is-active {
  border-color: var(--c-accent, #3aa2ff);
  color: var(--c-accent, #3aa2ff);
}
.zone-btn__swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
}

.zone-btn__color-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ── Aftermarket catalog cards (left-panel) ───────────────────────── */

.aftermarket-section-header {
  list-style: none;
  padding: var(--sp-3) var(--sp-4) var(--sp-2);
  margin-top: var(--sp-3);
  border-top: 1px solid var(--c-border-mid);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 80%);
}
.am-section__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
}
.am-section__label {
  font-family: var(--font-display, sans-serif);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-active, #FFFFFF);
}
.am-section__count {
  font-size: 12px;
  color: var(--c-text-3);
}
.am-section__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
}
.am-filter__group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 2px 6px 2px 0;
}
.am-filter__label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--c-text-3);
  letter-spacing: 0.08em;
  margin-right: 4px;
}
.am-chip {
  font-size: 12px;
  padding: 3px 8px;
  border: 1px solid var(--c-border-mid);
  border-radius: var(--r-full);
  background: var(--c-surface-2);
  color: var(--c-text-2);
  cursor: pointer;
  transition: var(--t-fast);
}
.am-chip:hover { border-color: var(--c-border-bright); color: var(--c-text); }
.am-chip--active {
  background: var(--c-active-glow);
  border-color: var(--c-active-border);
  color: var(--c-active, #FFFFFF);
}
.am-filter__search {
  flex: 1 1 100%;
  font-size: 12px;
  padding: 5px 8px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border-mid);
  border-radius: var(--r-sm);
  color: var(--c-text);
  margin-bottom: var(--sp-1);
}
.am-filter__clear {
  font-size: 12px;
  padding: 3px 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--c-text-3);
  cursor: pointer;
}
.am-filter__clear:hover { color: var(--c-text); }

.am-empty {
  list-style: none;
  padding: var(--sp-4);
  text-align: center;
  font-size: 12px;
  color: var(--c-text-3);
}
.am-empty--no-compat {
  margin: var(--sp-3) var(--sp-2);
  padding: var(--sp-5) var(--sp-4);
  border: 1px dashed var(--c-border);
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.02);
}
.am-empty__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-2);
  letter-spacing: 0.04em;
}
.am-empty__hint {
  margin: 0;
  font-size: 12px;
  color: var(--c-text-3);
  line-height: 1.4;
}

.aftermarket-card {
  position: relative;
}
.am-card__thumb {
  position: relative;
  overflow: hidden;
  background: var(--c-surface-3);
}
.am-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.am-card__thumb.img-fallback .am-card__img,
.am-card__img[data-img-failed] {
  display: none;
}
.am-card__letter {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display, sans-serif);
  font-size: 28px;
  color: var(--c-active, #FFFFFF);
  font-weight: 700;
}
.am-card__thumb .badge {
  position: absolute;
  bottom: 4px; left: 4px;
  font-size: 12px;
  padding: 2px 5px;
}
.badge--glb-ready {
  background: rgba(74,222,128,0.18);
  color: var(--c-success, #4ADE80);
  border: 1px solid rgba(74,222,128,0.35);
}
.badge--2d-only {
  background: rgba(251,178,78,0.18);
  color: var(--c-warning, #FBB24E);
  border: 1px solid rgba(251,178,78,0.35);
}
.am-card__slot {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-3);
}
.am-card__meta {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 12px;
}
.am-card__variant,
.am-card__chip {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  font-size: 12px;
  color: var(--c-text-2);
  background: var(--c-surface-2);
}
.am-card__actions {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
}
.am-card__buy {
  font-size: 12px;
  color: var(--c-active, #FFFFFF);
  text-decoration: none;
  white-space: nowrap;
}
.am-card__buy:hover { text-decoration: underline; }

/* ── Lightbox ─────────────────────────────────────────────────────── */

.am-lightbox {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.am-lightbox__inner {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  cursor: default;
}
.am-lightbox__img {
  max-width: 92vw;
  max-height: 84vh;
  object-fit: contain;
  display: block;
  border-radius: var(--r-md);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.am-lightbox__nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  background: rgba(20,20,20,0.7);
  border: 1px solid var(--c-border-mid);
  border-radius: var(--r-full);
  color: var(--c-text);
  font-size: 22px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--t-fast);
}
.am-lightbox__nav:hover { background: rgba(40,40,40,0.85); }
.am-lightbox__nav--prev { left: -56px; }
.am-lightbox__nav--next { right: -56px; }
.am-lightbox__close {
  position: absolute;
  top: -36px; right: 0;
  width: 28px; height: 28px;
  background: transparent;
  border: 1px solid var(--c-border-mid);
  border-radius: var(--r-full);
  color: var(--c-text);
  font-size: 18px;
  cursor: pointer;
}
.am-lightbox__caption {
  display: flex;
  gap: var(--sp-3);
  align-items: baseline;
  padding-top: var(--sp-2);
  font-size: 12px;
  color: var(--c-text-2);
}
.am-lightbox__brand {
  font-family: var(--font-display, sans-serif);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text);
}
.am-lightbox__counter {
  margin-left: auto;
  color: var(--c-text-3);
}
@media (max-width: 720px) {
  .am-lightbox__nav--prev { left: 8px; }
  .am-lightbox__nav--next { right: 8px; }
}

/* Slot-detail: 2D-only badge + incompat note */
.slot-part__brand .badge--2d-only {
  margin-left: 6px;
  vertical-align: middle;
}
.slot-part__select-btn--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.slot-detail__incompat {
  color: var(--c-warning, #FBB24E);
  font-size: 12px;
}

/* ════════════════════════════════════════════════════════════════════
   Inline DRL color picker (top of DRL slot detail panel)
   See js/click-to-select6.js → buildInlineDRLColorPicker()
   ════════════════════════════════════════════════════════════════════ */
.inline-drl-picker {
  margin: 8px 0 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255,255,255, 0.18);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.inline-drl-picker__head {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.inline-drl-picker__title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-active);
}
.inline-drl-picker__hint {
  font-size: 12px;
  color: var(--c-text-3);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}
.inline-drl-picker__swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.inline-drl-swatch {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, border-color 0.15s, box-shadow 0.15s;
}
.inline-drl-swatch:hover {
  transform: scale(1.10);
  border-color: rgba(255, 255, 255, 0.45);
}
.inline-drl-swatch.is-active {
  border-color: var(--c-active);
  box-shadow: 0 0 0 2px rgba(255,255,255, 0.30);
}
.inline-drl-swatch__check {
  font-size: 12px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.6);
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
  opacity: 0;
  transition: opacity 0.12s;
}
.inline-drl-swatch.is-active .inline-drl-swatch__check { opacity: 1; }

/* Custom color (label wrapping a hidden color input) */
.inline-drl-swatch--custom {
  background: linear-gradient(135deg, #ff0080 0%, #ffff00 33%, #00ff00 66%, #0080ff 100%);
  overflow: hidden;
}
.inline-drl-swatch--custom input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
}
.inline-drl-swatch__plus {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════════════
   Per-card color UI (DRL slot)
   See js/click-to-select6.js → buildPartColorUI()
   ════════════════════════════════════════════════════════════════════ */
.slot-part__color-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  flex-wrap: wrap;
}
.slot-part__color-row--rgb      { border-color: rgba(255,255,255, 0.20); }
.slot-part__color-row--fixed    { border-color: rgba(96, 165, 250, 0.20); }
.slot-part__color-row--presets  { border-color: rgba(74, 222, 128, 0.20); }
.slot-part__color-row--variants { border-color: rgba(0, 132, 255, 0.30); flex-direction: column; align-items: stretch; gap: 6px; }

/* Generic variant-option picker (e.g. wheel spacers: mm thickness + bolt color) */
.slot-part__variants {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}
.slot-part__variant-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.slot-part__variant-label {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-2, #9aa);
}
.slot-part__variant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.slot-part__variant-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--c-text-2, #ccc);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.08s;
}
.slot-part__variant-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.20);
  color: #fff;
}
.slot-part__variant-chip.is-active {
  background: rgba(74, 222, 128, 0.16);
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.50);
}
.slot-part__variant-chip:active { transform: scale(0.96); }
.slot-part__variant-chip-price {
  font-size: 12px;
  opacity: 0.75;
  font-weight: 500;
}

/* OEM Style Laser variant picker — main dropdown + optional sub-row dropdown / RGB swatches */
.slot-part__variant-select,
.slot-part__variant-switch-select {
  width: 100%;
  padding: 6px 28px 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 132, 255, 0.45);
  border-radius: 5px;
  color: var(--c-text-1);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-text-2) 50%),
                    linear-gradient(135deg, var(--c-text-2) 50%, transparent 50%);
  background-position: calc(100% - 14px) center, calc(100% - 9px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: background-color 0.12s, border-color 0.12s;
}
.slot-part__variant-select:hover,
.slot-part__variant-switch-select:hover { background-color: rgba(255, 255, 255, 0.08); border-color: rgba(0, 132, 255, 0.70); }
.slot-part__variant-select option,
.slot-part__variant-switch-select option { background: #14171c; color: #fff; }

.slot-part__variant-sub-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-top: 6px; border-top: 1px dashed rgba(255, 255, 255, 0.10);
}
.slot-part__variant-sub-row--switch .slot-part__variant-switch-select { width: auto; flex: 1; }

.slot-part__color-label {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-3);
}
.slot-part__color-name {
  font-weight: 600;
  color: var(--c-text-1);
  font-size: 12px;
}
.slot-part__color-tag {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--c-text-3);
}
.slot-part__color-row--rgb   .slot-part__color-tag { background: rgba(255,255,255, 0.16); color: var(--c-active); }
.slot-part__color-row--fixed .slot-part__color-tag { background: rgba(96, 165, 250, 0.16); color: #60a5fa; }
.slot-part__color-row--presets .slot-part__color-tag { background: rgba(74, 222, 128, 0.16); color: #4ade80; }

.slot-part__color-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.20);
  flex-shrink: 0;
}

.slot-part__color-swatches {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}
.slot-part__color-swatch {
  position: relative;
  width: 24px;          /* #A8: WCAG 2.2 AA min touch target (was 18px) */
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.20);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, box-shadow 0.15s;
}
.slot-part__color-swatch:hover {
  transform: scale(1.15);
}
.slot-part__color-swatch.is-active {
  box-shadow: 0 0 0 2px rgba(255,255,255, 0.55);
  border-color: var(--c-active);
}
.slot-part__color-swatch--custom {
  background: linear-gradient(135deg, #ff0080 0%, #ffff00 33%, #00ff00 66%, #0080ff 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.slot-part__color-swatch--custom input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
}
.slot-part__color-swatch--custom span {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

/* ── Widebody kit cards ──────────────────────────────────────── */

.widebody-section-header {
  margin-top: 6px;
}
.widebody-section__hint {
  font-size: 12px;
  color: var(--c-text-2, #999);
  padding: 4px 0 2px;
  line-height: 1.4;
}

/* widebody cards now inherit .slot-part-card styling — these rules are kept
   minimal (just for the .installed glow accent and any widebody-only chrome). */
.widebody-kit-card.installed {
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.12);
}
.widebody-card__class-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}
.widebody-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  align-items: center;
  margin: 4px 0 6px;
}
.widebody-card__perm {
  color: #ffb74d;
  font-weight: 600;
}
.widebody-card__rev {
  color: #81c784;
}
.widebody-card__time,
.widebody-card__finish {
  color: var(--c-text-2, #aaa);
}
.widebody-card__children,
.widebody-card__note {
  margin: 6px 0;
  font-size: 12px;
}
.widebody-card__children summary,
.widebody-card__note summary {
  cursor: pointer;
  color: var(--c-cta);
  font-weight: 600;
  padding: 2px 0;
}
.widebody-card__children ul {
  margin: 4px 0 4px 16px;
  padding: 0;
  list-style: disc;
  color: var(--c-text-2, #aaa);
  line-height: 1.6;
}
.widebody-card__note p {
  margin: 4px 0;
  color: var(--c-text-2, #aaa);
  line-height: 1.5;
}
.widebody-card__primary {
  margin-left: auto;
}

/* ── Widebody picker inside the chip rail ─────────────────── */

.cph-inline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.widebody-section__back {
  appearance: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--c-cta);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 6px;
  align-self: flex-start;
}
.widebody-section__back:hover {
  background: rgba(108, 204, 255, 0.1);
}
