@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/vault7/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* =========================================================================
   VAULT7 3D GARAGE BAY — SEAMLESS TURNTABLE VEHICLE SELECTOR
   ========================================================================= */
body.garage-mode {
  overflow: hidden;
  background: #0f1319;
}
body.garage-mode #site-header {
  position: relative;
}
body.garage-mode .v7-products-menu {
  max-height: calc(100dvh - var(--site-header-height));
}

/* Reuse the live #studio + #scene WebGL canvas in garage-mode with zero reload */
body.garage-mode #studio {
  position: relative;
  display: block;
  height: calc(100dvh - var(--site-header-height, 84px));
  min-height: 560px;
  background: radial-gradient(circle at 38% 46%, #1a2330 0%, #0f1319 72%);
}
body.garage-mode #scene {
  position: absolute;
  inset: 58px 0 170px 0;
  transition: inset 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}
body.garage-mode .scene-loading {
  left: calc((100% - 328px) / 2);
  top: calc((100% - 130px) / 2);
  background: rgba(15, 19, 25, 0.9);
  border: 1px solid #2e3846;
  border-radius: 6px;
}

/* Hide regular Studio chrome while in Garage Selection mode */
body.garage-mode #studio > .builder-steps,
body.garage-mode #studio > .view-tools,
body.garage-mode #studio > .paint-swatches,
body.garage-mode #studio > .builder-panel,
body.garage-mode #studio > .show-controls,
body.garage-mode #studio > .preview-caption,
body.garage-mode #studio > #build-message,
body.garage-mode #scene .studio-inspection,
body.garage-mode #scene #product-labels,
body.garage-mode #scene #label-lines,
body.garage-mode #studio #studio-guide-controls,
body.garage-mode #studio #studio-dimensions-label {
  display: none !important;
}

/* Hide Garage overlay when user enters Studio mode */
body.studio-mode #garage-selector {
  display: none !important;
}

/* Align Welcome Dialog with VAULT7 gunmetal + safety orange */
.welcome {
  background: #141a22;
  border: 1px solid #354152;
  border-radius: 10px;
}
.welcome .mint {
  background: #f97316;
  border-color: #f97316;
  color: #140e08;
}
.welcome .mint:hover {
  background: #fb923c;
  border-color: #fb923c;
}

/* =========================================================================
   GARAGE SELECTOR OVERLAY SHELL
   ========================================================================= */
#garage-selector {
  --g-bg: #0f1319;
  --g-surface: rgba(21, 28, 37, 0.9);
  --g-card: #171f2a;
  --g-card-hi: #1f2a38;
  --g-border: #2d3847;
  --g-border-hi: #4a5a6f;
  --g-text: #f1f5f9;
  --g-muted: #9aa7b6;
  --g-ice: #7dd3fc;
  --g-ice-glow: #38bdf8;
  --g-orange: #f97316;
  --g-orange-hi: #fb923c;
  --g-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --g-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  color: var(--g-text);
  font-family: "Open Sans", Roboto, system-ui, sans-serif;
  overflow: hidden;
}

#garage-selector button,
#garage-selector input,
#garage-selector a {
  pointer-events: auto;
}

#garage-selector :where(button, a, input):focus-visible {
  outline: 2px solid var(--g-orange);
  outline-offset: 2px;
}

/* Subtle Oversized Parallax Brand Watermark Behind Top of 3D Stage */
.garage-watermark {
  position: absolute;
  top: 66px;
  left: 28px;
  right: 360px;
  z-index: 1;
  font: 700 clamp(54px, 7vw, 112px) / 0.85 var(--g-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(241, 245, 249, 0.045);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  user-select: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s;
}
.garage-watermark.is-shifting {
  opacity: 0;
  transform: translateX(26px);
}

/* Laser Scan Sweep Line on Vehicle Switch */
.garage-scanline {
  position: absolute;
  top: 58px;
  bottom: 184px;
  left: 0;
  width: 2px;
  z-index: 4;
  background: linear-gradient(180deg, transparent, var(--g-ice-glow), var(--g-orange), transparent);
  box-shadow: 0 0 22px 4px rgba(56, 189, 248, 0.45);
  opacity: 0;
  pointer-events: none;
}
.garage-scanline.is-sweeping {
  animation: garage-sweep 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes garage-sweep {
  0% { left: 0; opacity: 0; }
  18% { opacity: 0.9; }
  85% { opacity: 0.75; }
  100% { left: calc(100% - 344px); opacity: 0; }
}

/* Top Bar */
.garage-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  padding: 0 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(180deg, rgba(15, 19, 25, 0.96) 0%, rgba(15, 19, 25, 0.72) 100%);
  border-bottom: 1px solid rgba(45, 56, 71, 0.8);
  backdrop-filter: blur(10px);
}

.garage-top-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.garage-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 5px;
  border: 1px solid var(--g-border);
  background: rgba(23, 31, 42, 0.8);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.garage-back:hover {
  border-color: var(--g-orange);
  color: #fff;
}

.garage-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.garage-step-tag {
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(249, 115, 22, 0.5);
  background: rgba(249, 115, 22, 0.14);
  color: #fdba74;
  font: 700 10px var(--g-mono);
  letter-spacing: 0.08em;
}
.garage-title-group h1 {
  margin: 0;
  font: 700 22px / 1 var(--g-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.garage-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.garage-search {
  position: relative;
  display: flex;
  align-items: center;
}
.garage-search svg {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--g-muted);
  pointer-events: none;
}
.garage-search input {
  width: 210px;
  height: 34px;
  padding: 0 28px 0 30px;
  border-radius: 5px;
  border: 1px solid var(--g-border-hi);
  background: rgba(15, 19, 25, 0.9);
  color: var(--g-text);
  font-size: 12px;
}
.garage-search input::placeholder {
  color: #7c8b9c;
}
.garage-search kbd {
  position: absolute;
  right: 8px;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--g-border);
  background: #171f2a;
  color: var(--g-muted);
  font: 700 10px var(--g-mono);
  pointer-events: none;
}

.garage-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 5px;
  border: 1px solid rgba(125, 211, 252, 0.45);
  background: rgba(30, 58, 95, 0.45);
  color: #e0f2fe;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.garage-resume-btn:hover {
  border-color: var(--g-ice);
  background: rgba(30, 58, 95, 0.72);
}

/* Stage Turntable Controls (Bottom-left of 3D viewport) */
.garage-stage-hud {
  position: absolute;
  left: 18px;
  bottom: 182px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
}
.garage-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 5px;
  border: 1px solid rgba(45, 56, 71, 0.9);
  background: rgba(15, 19, 25, 0.84);
  backdrop-filter: blur(8px);
  font: 700 10px var(--g-mono);
  color: #cbd5e1;
  letter-spacing: 0.05em;
}
.garage-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--g-ice);
  box-shadow: 0 0 8px var(--g-ice-glow);
}
.garage-spin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 29px;
  padding: 0 10px;
  border-radius: 5px;
  border: 1px solid var(--g-border-hi);
  background: rgba(21, 28, 37, 0.88);
  color: var(--g-text);
  font: 700 10px var(--g-mono);
}
.garage-spin-btn[aria-pressed="true"] {
  border-color: var(--g-ice);
  color: var(--g-ice);
}

/* =========================================================================
   RIGHT FLOATING SPEC & CAB HUD PANEL
   ========================================================================= */
.garage-spec-panel {
  position: absolute;
  top: 66px;
  right: 16px;
  bottom: 182px;
  width: 312px;
  z-index: 9;
  display: flex;
  flex-direction: column;
  padding: 12px 14px 10px;
  border-radius: 8px;
  border: 1px solid rgba(58, 71, 88, 0.85);
  background: rgba(17, 23, 31, 0.84);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  pointer-events: auto;
}

.spec-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: #3a4758 transparent;
}

.spec-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 700 10px var(--g-mono);
  letter-spacing: 0.12em;
  color: var(--g-ice);
}
.spec-index {
  color: var(--g-muted);
}

.spec-model-name {
  margin: 3px 0 0;
  font: 700 28px / 0.95 var(--g-display);
  letter-spacing: 0.01em;
  color: var(--g-text);
}

.spec-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.spec-badges span {
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--g-border-hi);
  background: rgba(15, 19, 25, 0.7);
  font: 700 9px var(--g-mono);
  color: #cbd5e1;
}
.spec-badges span.flagship {
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(249, 115, 22, 0.14);
  color: #fdba74;
}

.spec-block {
  border-top: 1px solid var(--g-border);
  padding-top: 9px;
}
.spec-block-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font: 700 10px var(--g-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g-muted);
}

/* Cab Type Cards with Silhouette Icons */
.cab-options {
  display: grid;
  gap: 5px;
}
.cab-card {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 9px;
  border-radius: 6px;
  border: 1px solid var(--g-border);
  background: var(--g-card);
  text-align: left;
  transition: border-color 0.15s, background-color 0.15s;
}
.cab-card:hover:not(:disabled) {
  border-color: var(--g-border-hi);
  background: var(--g-card-hi);
}
.cab-card[aria-pressed="true"] {
  border-color: var(--g-orange);
  background: rgba(249, 115, 22, 0.12);
}
.cab-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.cab-silhouette {
  width: 44px;
  height: 22px;
  flex: none;
  color: #94a3b8;
}
.cab-card[aria-pressed="true"] .cab-silhouette {
  color: var(--g-orange);
}
.cab-card-copy {
  flex: 1;
  min-width: 0;
}
.cab-card-copy strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--g-text);
}
.cab-card-copy small {
  display: block;
  font-size: 10px;
  color: var(--g-muted);
}
.cab-key-hint {
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--g-border);
  background: #0f1319;
  font: 700 9px var(--g-mono);
  color: var(--g-muted);
}
.cab-card[aria-pressed="true"] .cab-key-hint {
  border-color: var(--g-orange);
  color: #fdba74;
}

/* Dynamic Tray Fitment Ruler */
.tray-ruler {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.tray-tick {
  padding: 6px 2px;
  border-radius: 4px;
  border: 1px solid var(--g-border);
  background: #10151d;
  text-align: center;
  font: 700 10px / 1 var(--g-mono);
  color: #5b697a;
}
.tray-tick.is-fit {
  border-color: rgba(125, 211, 252, 0.55);
  background: rgba(30, 58, 95, 0.42);
  color: var(--g-ice);
}

/* Starting Trim / Preview Preset Pills */
.trim-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.trim-pill {
  padding: 7px 6px;
  border-radius: 5px;
  border: 1px solid var(--g-border);
  background: var(--g-card);
  color: var(--g-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.trim-pill:hover {
  border-color: var(--g-border-hi);
  color: var(--g-text);
}
.trim-pill[aria-pressed="true"] {
  border-color: var(--g-ice);
  background: rgba(30, 58, 95, 0.5);
  color: #e0f2fe;
}

/* Primary Enter Studio CTA — always pinned visible at bottom of HUD panel */
.garage-cta-wrap {
  flex: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--g-border);
  display: grid;
  gap: 6px;
}
.garage-enter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 6px;
  border: 1px solid var(--g-orange);
  background: linear-gradient(180deg, #fb7c24, #ea650c);
  color: #140e08;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.25);
}
.garage-enter-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #fd8f3f, #f97316);
  border-color: var(--g-orange-hi);
}
.garage-kbd-legend {
  margin: 0;
  text-align: center;
  font: 600 10px var(--g-mono);
  color: #7c8b9c;
}

/* =========================================================================
   BOTTOM FORZA-STYLE HORIZONTAL GARAGE DOCK (INFINITE SCALABILITY)
   ========================================================================= */
.garage-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 170px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 8px 18px 10px;
  background: linear-gradient(180deg, rgba(15, 19, 25, 0.94) 0%, #0b0f15 100%);
  border-top: 1px solid var(--g-border);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.dock-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.brand-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.brand-filters::-webkit-scrollbar { display: none; }

.brand-chip {
  flex: none;
  padding: 5px 11px;
  border-radius: 4px;
  border: 1px solid var(--g-border);
  background: rgba(23, 31, 42, 0.8);
  color: var(--g-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.brand-chip:hover {
  border-color: var(--g-border-hi);
  color: var(--g-text);
}
.brand-chip[aria-pressed="true"] {
  border-color: var(--g-orange);
  background: rgba(249, 115, 22, 0.16);
  color: #ffcf9f;
}

.dock-nav-arrows {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.dock-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid var(--g-border-hi);
  background: var(--g-card);
  color: var(--g-text);
  font-size: 15px;
  line-height: 1;
}
.dock-arrow:hover {
  border-color: var(--g-orange);
}

/* Single-Row Scrollable Vehicle Rail */
.garage-rail {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: inline proximity;
  padding: 4px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: #3a4758 transparent;
}
.garage-rail::-webkit-scrollbar { height: 5px; }
.garage-rail::-webkit-scrollbar-thumb { background: #3a4758; border-radius: 99px; }

.truck-tile {
  position: relative;
  flex: none;
  width: 186px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 10px 9px;
  border-radius: 6px;
  border: 1px solid var(--g-border);
  background: linear-gradient(180deg, #1a232f 0%, #131922 100%);
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s, background-color 0.16s;
}
.truck-tile:hover {
  border-color: var(--g-border-hi);
  transform: translateY(-2px);
}
.truck-tile[aria-pressed="true"] {
  border-color: var(--g-orange);
  background: linear-gradient(180deg, #232d3b 0%, #161d27 100%);
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}
/* Non-color active bottom bar */
.truck-tile[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  border-block-end: 3px solid var(--g-orange);
}

.truck-tile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  font: 700 9px var(--g-mono);
  color: #8b99ab;
  letter-spacing: 0.06em;
}
.truck-tile-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
}
.truck-tile[aria-pressed="true"] .truck-tile-dot {
  background: var(--g-ice);
  box-shadow: 0 0 8px var(--g-ice-glow);
}

.truck-tile-thumb {
  height: 50px;
  margin: 3px 0;
  border-radius: 4px;
  background: radial-gradient(circle at 50% 62%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03) 70%);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 3px;
}
.truck-tile-thumb img {
  max-width: 100%;
  max-height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45));
}

.truck-tile-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}
.truck-tile-foot strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--g-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.truck-tile-foot span {
  flex: none;
  font: 700 9px var(--g-mono);
  color: var(--g-muted);
}

/* Trailing "+ Request Your Truck" Expansion Slot */
.truck-request-tile {
  flex: none;
  width: 162px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: 6px;
  border: 1px dashed var(--g-border-hi);
  background: rgba(15, 19, 25, 0.65);
  color: var(--g-muted);
  text-align: center;
  text-decoration: none;
  font-size: 11px;
}
.truck-request-tile:hover {
  border-color: var(--g-orange);
  color: var(--g-text);
}
.truck-request-tile strong {
  color: var(--g-text);
  font-size: 12px;
}
.truck-request-plus {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--g-border-hi);
  color: var(--g-orange);
  font-size: 16px;
  font-weight: 700;
}

.rail-empty {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 12px;
  color: var(--g-muted);
}

@media (forced-colors: active) {
  .truck-tile[aria-pressed="true"]::after {
    border-block-end: 3px solid Highlight;
  }
  .cab-card[aria-pressed="true"],
  .brand-chip[aria-pressed="true"] {
    outline: 2px solid Highlight;
  }
}

@media (prefers-reduced-motion: reduce) {
  .garage-scanline.is-sweeping { animation: none; }
  .garage-watermark, .truck-tile, body.garage-mode #scene { transition: none; }
}

/* Responsive Tablet & Mobile */
@media (max-width: 980px) {
  body.garage-mode #scene {
    inset: 54px 0 365px 0;
  }
  .garage-watermark {
    right: 16px;
    font-size: 48px;
  }
  .garage-stage-hud {
    bottom: 374px;
    left: 12px;
  }
  .garage-spec-panel {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 188px;
    width: auto;
    max-height: 174px;
    padding: 12px;
    gap: 10px;
  }
  .spec-model-name { font-size: 24px; }
  .cab-options { grid-template-columns: repeat(3, 1fr); }
  .cab-silhouette, .cab-key-hint, .garage-kbd-legend, .garage-search { display: none; }
  .garage-dock { height: 180px; padding: 8px 12px 10px; }
  .truck-tile { width: 152px; }
}

@media print {
  #garage-selector { display: none !important; }
}
