/* G&K Location — /garage interactive showroom (Gran Turismo-style layout in the G&K garage). */
html.route-garage main, html.route-garage .stage, html.route-garage .nav, html.route-garage .hud, html.route-garage [data-site-footer] { visibility: hidden; }
html.route-garage, html.route-garage body { overflow: hidden; }

.garage { position: fixed; inset: 0; z-index: 50; background: #000; color: var(--ink); overflow: hidden; }
.garage.is-entering .garage__top, .garage.is-entering .garage__panel, .garage.is-entering .garage__carousel { opacity: 0; }
.garage__top, .garage__panel, .garage__carousel { transition: opacity .6s ease .1s; }

/* The scene is a 16:9 frame cover-fitted to its box, exactly like the entry video, so the
   last video frame and the interactive showroom line up without a jump. */
.garage__scene { position: absolute; inset: 0; overflow: hidden; }
.garage__frame { position: absolute; left: 50%; top: 50%; width: max(100%, calc(var(--box-h, 100vh) * 16 / 9)); aspect-ratio: 16 / 9; transform: translate(-50%, -50%); }
/* the "camera": starts on the entry clip's exact framing, then settles (see Garage.show) */
.garage__cam { position: absolute; inset: 0; transform-origin: 0 0; }
.garage__cam.is-settling { transition: transform .9s cubic-bezier(.25,.8,.25,1); }
.garage__plate, .garage__vehicle { position: absolute; inset: 0; width: 100%; height: 100%; }
.garage__plate { object-fit: cover; max-width: none; }
.garage__vehicle img, .garage__vehicle .garage__placeholder { position: absolute; inset: 0; width: 100%; height: 100%; }
.garage__vehicle img { object-fit: contain; transition: opacity .32s ease, transform .42s cubic-bezier(.2,.7,.2,1); }
/* the outgoing vehicle leaves opposite to the travel direction in the carousel (vars set by JS) */
.garage__vehicle img.is-out { opacity: 0; transform: translateX(var(--out-x, -2.5%)); }
.garage__vehicle img.is-in-start { opacity: 0; transform: translateX(var(--in-x, 2.5%)); transition: none; }
/* first presentation after the entry clip: the selected vehicle is revealed by a light sweep */
.garage__vehicle img.is-reveal { animation: veh-reveal 1.1s cubic-bezier(.2,.7,.2,1) both; }
@keyframes veh-reveal { 0% { opacity: 0; filter: brightness(2.2) contrast(.8); } 45% { opacity: 1; } 100% { opacity: 1; filter: none; } }
.garage__sweep { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; background: linear-gradient(100deg, transparent 35%, rgba(255,238,215,.75) 48%, rgba(255,238,215,.0) 60%) no-repeat; background-size: 300% 100%; animation: sweep 1.1s ease-out both; }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: 0% 0; opacity: 0; } }
.garage__scene::after { /* readability: darken the right side under the panel and the carousel strip */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to left, rgba(0,0,0,.78), rgba(0,0,0,.35) 34%, transparent 52%), linear-gradient(to top, rgba(0,0,0,.8), transparent 26%), linear-gradient(to bottom, rgba(0,0,0,.6), transparent 16%);
}
.garage__placeholder { display: grid; place-items: center; }
.garage__placeholder svg { width: 46%; height: auto; margin-top: 12%; color: rgba(242,237,228,.5); }
.garage__placeholder span { position: absolute; left: 50%; top: 73%; transform: translateX(-50%); font: 600 12px/1 var(--text); letter-spacing: .3em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }

.garage__top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 22px; padding: 18px var(--gutter); }
.garage__logo { height: 28px; width: auto; }
.garage__info-btn { margin-left: auto; min-height: 40px; padding: 0 14px; background: rgba(5,5,5,.45); border: 1px solid var(--line); cursor: pointer; font: 500 11px/1 var(--text); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.garage__info-btn .sm { display: none; }
/* the quote button is the tab on top of the selected vehicle's card; the panel keeps one only on mobile */
.gp__cta { display: none; }
.garage__info-btn:hover, .garage__info-btn[aria-expanded="true"] { color: var(--ink); border-color: rgba(242,237,228,.4); }
.garage__info { position: absolute; z-index: 4; top: 66px; right: var(--gutter); width: min(320px, calc(100vw - 32px)); padding: 18px 20px; background: rgba(8,8,8,.94); border: 1px solid var(--line); font-size: 14px; }
.garage__info h2 { margin: 0 0 10px; font: 700 12px/1 var(--text); letter-spacing: .2em; text-transform: uppercase; }
.garage__info ul { list-style: none; margin: 0 0 14px; padding: 0; }
.garage__info a { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; color: var(--ink-2); text-decoration: none; }
.garage__info a:hover { color: var(--ink); }
.garage__info svg { width: 16px; height: 16px; color: var(--red); }

/* brand block (desktop): logo then brand name, top left of the showroom image */
.garage__brand { position: absolute; z-index: 2; top: 84px; left: var(--gutter); display: flex; align-items: center; gap: 16px; pointer-events: none; }
/* every logo is in the page; only the active one takes space and shows (instant switch) */
.garage__logos { position: relative; display: block; }
.garage__logos img { display: block; height: 52px; width: auto; max-width: 110px; object-fit: contain; filter: drop-shadow(0 4px 18px rgba(0,0,0,.6)); }
.garage__logos img:not(.is-active) { position: absolute; left: 0; top: 0; opacity: 0; }
.garage__logos img.is-mono { filter: brightness(0) invert(1) drop-shadow(0 4px 18px rgba(0,0,0,.6)); }
.garage__brand-name { font: 800 clamp(32px, 2.6vw, 44px)/1 var(--display); letter-spacing: .04em; text-transform: uppercase; text-shadow: 0 4px 24px rgba(0,0,0,.6); }

/* gallery: left column under the brand, same language as the details panel */
.garage__gallery { position: absolute; z-index: 2; top: 156px; left: var(--gutter); bottom: calc(var(--carousel-h, 190px) + 34px); width: min(300px, 21vw); display: flex; flex-direction: column; overflow: hidden; }
.gg__title span { margin-left: .5em; color: var(--ink-2); }
.gg__title { margin: 0 0 10px; padding-top: 14px; border-top: 1px solid var(--line); font: 600 11px/1 var(--text); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
.gg__tour { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 10px; padding: 10px 12px; background: rgba(10,10,10,.72); border: 1px solid rgba(201,162,92,.45); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .25s ease, background .25s ease; }
.gg__tour:hover { border-color: rgba(201,162,92,.9); background: rgba(201,162,92,.1); }
.gg__tour-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(201,162,92,.6); color: #e2c58f; }
.gg__tour-icon svg { width: 20px; height: 20px; }
.gg__tour-text strong { display: block; font: 700 15px/1.1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.gg__tour-text small { display: block; margin-top: 2px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.gg__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.garage__gallery .gg__grid, .garage__gallery .gg__empty { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 8px; background: rgba(8,8,8,.55); border: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: rgba(242,237,228,.25) transparent; }
.gg__item { position: relative; display: block; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; background: #0d0d0d; border: 1px solid var(--line); cursor: zoom-in; transition: border-color .25s ease; }
.gg__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.gg__item:hover { border-color: rgba(215,15,20,.7); }
.gg__item:hover img { transform: scale(1.05); }
.gg__item--video { cursor: pointer; }
.gg__play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(5,5,5,.6); border: 1px solid rgba(242,237,228,.6); color: var(--ink); }
.gg__play svg { width: 16px; height: 16px; margin-left: 2px; }
.gg__empty { margin: 0; font-size: 13px; color: var(--ink-3); }
.gp__gallery { display: none; }


.garage__panel { position: absolute; z-index: 2; top: 76px; right: var(--gutter); bottom: calc(var(--carousel-h, 190px) + 34px); width: min(400px, 31vw); overflow-x: hidden; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: rgba(242,237,228,.25) transparent; }
.gp__cat { margin: 0 0 6px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); }
.gp__name { margin: 0; font: 800 clamp(40px, 3.6vw, 64px)/.9 var(--display); text-transform: uppercase; }
.gp__brand-inline { display: none; }
.gp__colors { margin: 16px 0 0; }
.gp__colors-label { margin: 0 0 8px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
.gp__colors-label span { margin-left: 8px; letter-spacing: .08em; color: var(--ink); text-transform: none; font-size: 13px; }
.gp__swatches { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 0 4px 4px; } /* room for the selection ring: the scrolling panel clips its edges */
.gp__swatch { width: 46px; height: 26px; padding: 0; cursor: pointer; background: var(--swatch); border: 1px solid rgba(242,237,228,.35); border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); transition: transform .2s ease, outline-color .2s ease; outline: 1px solid transparent; outline-offset: 2px; }
.gp__swatch:hover { transform: translateY(-2px); }
.gp__swatch[aria-pressed="true"] { outline-color: rgba(242,237,228,.85); }
.gp__packages--one { grid-template-columns: 1fr; }
.gp__note { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.gp__sub { margin: 6px 0 0; font: 600 14px/1 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.gp__desc { margin: 16px 0 18px; color: var(--ink-2); font-weight: 300; }
.gp__block { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.gp__block h3 { margin: 0 0 10px; font: 600 11px/1 var(--text); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
.gp__specs { margin: 0; display: grid; gap: 6px; }
.gp__specs div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.gp__specs dt { color: var(--ink-3); }
.gp__specs dd { margin: 0; text-align: right; }
.gp__packages { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gp__pack { padding: 12px 12px 10px; background: rgba(12,12,12,.8); border: 1px solid var(--line); }
.gp__pack small { display: block; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.gp__pack strong { display: block; margin: 6px 0 4px; font: 800 30px/1 var(--display); }
.gp__pack span { font-size: 12.5px; color: var(--ink-2); }
.gp__quote-note { margin: 0; font: 800 28px/1 var(--display); text-transform: uppercase; }
.gp__cond { margin: 0; display: grid; gap: 4px; font-size: 13px; }
.gp__cond div { display: flex; justify-content: space-between; gap: 12px; }
.gp__cond dt { color: var(--ink-3); }
.gp__cond dd { margin: 0; text-align: right; color: var(--ink-2); }
/* the quote CTA stays reachable at the bottom of the panel, whatever the panel's scroll */
.gp__cta { position: sticky; bottom: 0; margin-top: 16px; box-shadow: 0 -18px 24px rgba(0,0,0,.55); }

.garage__carousel { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 var(--gutter) 22px; }
.garage__track { display: flex; align-items: flex-end; gap: 12px; justify-content: safe center; overflow-x: auto; scroll-snap-type: x proximity; padding: 30px 4px 2px; scrollbar-width: none; }
.garage__track::-webkit-scrollbar { display: none; }
.gslot { position: relative; flex: 0 0 auto; scroll-snap-align: start; transition: transform .25s ease; }
.gslot.is-selected { transform: translateY(-4px); }
.gslot__quote { position: absolute; left: 0; right: 0; bottom: 100%; display: flex; align-items: center; justify-content: center; height: 22px; background: var(--red); color: var(--ink); font: 600 10px/1 var(--text); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; white-space: nowrap; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .25s ease, transform .25s ease, background .2s ease; }
.gslot.is-selected .gslot__quote { opacity: 1; transform: none; pointer-events: auto; }
.gslot__quote:hover { background: #ec1a20; }
.gslot__quote:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* edge arrows, shown only when more vehicles than the space can show */
.garage__arrow { position: absolute; top: 50%; z-index: 3; display: grid; place-items: center; width: 40px; height: 64px; margin-top: -42px; padding: 0; background: rgba(5,5,5,.7); border: 1px solid var(--line); color: var(--ink); cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.garage__arrow svg { width: 24px; height: 24px; }
.garage__arrow:hover { border-color: rgba(215,15,20,.7); }
.garage__arrow--prev { left: 8px; }
.garage__arrow--next { right: 8px; }
.gthumb { position: relative; flex: 0 0 auto; width: clamp(140px, 13vw, 210px); padding: 10px 10px 12px; background: rgba(10,10,10,.72); border: 1px solid var(--line); cursor: pointer; text-align: left; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color .25s ease, background .25s ease, transform .25s ease; }
.gthumb:hover { border-color: rgba(242,237,228,.4); }
.gthumb[aria-selected="true"] { border-color: var(--red); background: rgba(215,15,20,.12); }
.gthumb[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--red); }
/* the picture is fitted inside the frame whatever its shape (a tall one, like the bike, is not cropped) */
.gthumb__img { position: relative; aspect-ratio: 16 / 8; display: grid; place-items: center; overflow: hidden; }
.gthumb__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.gthumb__img svg { width: 80%; color: rgba(242,237,228,.45); }
.gthumb__name { display: block; margin-top: 8px; font: 700 18px/1.1 var(--display); letter-spacing: .03em; text-transform: uppercase; text-align: center; }

/* ---------- Mobile: vehicle above the swipeable carousel, then specs (also a phone held
   sideways: too short for the side-by-side layout) ---------- */
@media (max-width: 860px), (orientation: landscape) and (max-height: 500px) {
  .garage { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; }
  .garage__scene { order: 1; flex: none; }
  .garage__carousel { order: 2; }
  .garage__panel { order: 3; }
  .garage__info-btn .lg { display: none; }
  .garage__info-btn .sm { display: inline; }
  .garage__brand { display: none; }          /* mobile unchanged: brand stays in the panel title */
  .garage__gallery { display: none; }
  .gp__gallery { display: block; }
  .gp__gallery .gg__title { border-top: 0; padding-top: 0; }
  .gp__gallery .gg__grid { grid-template-columns: repeat(3, 1fr); }
  .gp__brand-inline { display: inline; }
  .garage__arrow { margin-top: -38px; width: 34px; height: 56px; }
  .garage__scene { position: relative; inset: auto; height: calc(100vw / 1.08); max-height: 62vh; margin-top: 56px; }
  .garage__scene::after { background: linear-gradient(to top, #000, transparent 22%), linear-gradient(to bottom, #000, transparent 14%); }
  .garage__top { position: fixed; padding: 10px 14px; background: linear-gradient(to bottom, rgba(0,0,0,.85), transparent); }
  .garage__logo { height: 20px; }
  .garage__info-btn { padding: 0 10px; font-size: 10px; }
  .garage__info { position: fixed; top: 58px; right: 14px; }
  .garage__carousel { position: relative; padding: 4px 0 6px; }
  .garage__track { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 12px; scrollbar-width: none; }
  .garage__track::-webkit-scrollbar { display: none; }
  .gthumb { width: 46vw; }
  .gslot { scroll-snap-align: center; }
  .garage__track { padding-top: 30px; }
  .garage__panel { position: relative; inset: auto; width: auto; overflow: visible; padding: 8px 16px calc(32px + env(safe-area-inset-bottom)); }
  .gp__cta { display: flex; position: static; margin-top: 20px; box-shadow: none; }
  .gp__specs dd, .gp__cond dd { overflow-wrap: anywhere; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .gthumb { width: min(28vw, 240px); }
}
@media (prefers-reduced-motion: reduce) {
  .garage__vehicle img, .garage__top, .garage__panel, .garage__carousel, .gthumb { transition: opacity .2s ease !important; transform: none !important; }
}

/* ---------- viewer: gallery (arrows, counter) or virtual tour (gold frame, no arrows) ---------- */
.lightbox { width: min(1180px, calc(100vw - 48px)); max-width: none; height: min(780px, calc(100vh - 48px)); max-height: none; padding: 0; background: #070707; color: var(--ink); border: 1px solid var(--line); overflow: visible; }
.lightbox::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(6px); }
.lightbox__frame { position: relative; display: flex; flex-direction: column; height: 100%; }
.lightbox__head { display: flex; align-items: center; gap: 14px; padding: 12px 56px 12px 18px; border-bottom: 1px solid var(--line); min-height: 52px; }
.lightbox__badge { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 10px; font: 600 10.5px/1 var(--text); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); background: var(--red); }
.lightbox__badge svg { width: 16px; height: 16px; }
.lightbox__title { flex: 1; min-width: 0; margin: 0; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox__count { margin: 0; font: 700 16px/1 var(--display); letter-spacing: .06em; color: var(--ink-2); }
.lightbox__close { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; background: transparent; border: 1px solid var(--line); color: var(--ink); cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.lightbox__close:hover { border-color: var(--red); background: rgba(215,15,20,.2); }
.lightbox__close svg { width: 20px; height: 20px; }
.lightbox__stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 14px 32px; background: #000; touch-action: pan-y; container-type: size; }
/* one 16:9 frame for photos, videos and tours: same size whatever the item */
.lightbox__media { position: relative; width: min(100cqw, calc(100cqh * 16 / 9)); aspect-ratio: 16 / 9; background: #050505; outline: 1px solid var(--line); }
.lightbox__media img, .lightbox__media video, .lightbox__media iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border: 0; display: block; background: #050505; }
.lightbox__nav { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 46px; height: 76px; margin-top: -12px; padding: 0; background: rgba(5,5,5,.72); border: 1px solid var(--line); color: var(--ink); cursor: pointer; transform: translateY(-50%); transition: border-color .2s ease, background .2s ease; }
.lightbox__nav:hover { border-color: var(--red); background: rgba(215,15,20,.25); }
.lightbox__nav svg { width: 26px; height: 26px; }
.lightbox__nav--prev { left: -23px; }
.lightbox__nav--next { right: -23px; }
.lightbox__hint { margin: 0; padding: 8px 18px; min-height: 32px; font-size: 12px; letter-spacing: .06em; color: var(--ink-3); border-top: 1px solid var(--line); }
.lightbox__seek { position: absolute; top: 50%; z-index: 3; padding: 10px 16px; font: 800 22px/1 var(--display); color: var(--ink); background: rgba(5,5,5,.7); border: 1px solid var(--line); border-radius: 999px; opacity: 0; pointer-events: none; transform: translateY(-50%); }
.lightbox__seek[data-side="left"] { left: 12%; }
.lightbox__seek[data-side="right"] { right: 12%; }
.lightbox__seek.is-on { animation: seek-pop .7s ease both; }
@keyframes seek-pop { 0% { opacity: 0; transform: translateY(-50%) scale(.9); } 20% { opacity: 1; transform: translateY(-50%) scale(1); } 100% { opacity: 0; transform: translateY(-50%) scale(1); } }
.lightbox__soon { display: grid; justify-items: center; gap: 14px; max-width: 34ch; text-align: center; color: var(--ink-2); }
.lightbox__soon svg { width: 54px; height: 54px; color: #e2c58f; }
/* the virtual tour is a separate window: gold frame and badge, no arrows, no counter */
.lightbox.is-tour { border-color: rgba(201,162,92,.7); box-shadow: 0 0 0 1px rgba(201,162,92,.25), 0 30px 80px rgba(0,0,0,.6); }
.lightbox.is-tour .lightbox__badge { background: transparent; color: #e2c58f; border: 1px solid rgba(201,162,92,.7); }
.lightbox.is-tour .lightbox__head { border-bottom-color: rgba(201,162,92,.3); }
@media (max-width: 860px) {
  .lightbox { width: 100vw; height: 100dvh; max-height: none; border: 0; }
  .lightbox__nav { width: 38px; height: 60px; }
  .lightbox__stage { padding: 10px 0; }
  .lightbox__nav--prev { left: 6px; }
  .lightbox__nav--next { right: 6px; }
  .lightbox__head { padding-left: 12px; }
}
