/* Garage tipo vitrina — ver inc/garage-vitrina.php y assets/js/garage-vitrina.js.
   --hdr lo mide el JS (borde inferior real del header, incluye la barra de admin). */
:root { --hdr: 76px; }
html:has(body.gx-page), body.gx-page { height: 100%; overflow: hidden; overscroll-behavior: none; }
.gx {
	--bg: #222; --ink: #fff;
	position: relative;
	height: calc(100dvh - var(--hdr));
	min-height: 520px;
	background: var(--bg);
	color: var(--ink);
	overflow: hidden;
	transition: background-color .7s ease, color .7s ease;
	font-family: inherit;
	user-select: none;
}
.gx::after { /* viñeta suave para dar profundidad al color plano */
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(120% 90% at 30% 55%, transparent 40%, rgba(0,0,0,.28) 100%);
}

/* ---------- Moto ---------- */
.gx-bikes { position: absolute; left: 0; top: 0; bottom: 0; width: 48%; z-index: 1; }
.gx-bike {
	position: absolute; inset: 6% 0 14% 4%;
	display: flex; align-items: center; justify-content: center;
	opacity: 0; transform: translateY(60px) scale(.96);
	transition: opacity .55s ease, transform .7s cubic-bezier(.2,.7,.2,1);
	pointer-events: none;
}
.gx-bike.is-up { transform: translateY(-60px) scale(.96); }
.gx-bike.is-active { opacity: 1; transform: none; pointer-events: auto; }
.gx-bike { text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gx-bike img { transition: transform .45s cubic-bezier(.2,.7,.2,1);
	width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;
}

/* ---------- Lista de nombres ---------- */
.gx-names {
	position: absolute; left: 50%; top: 0; bottom: 70px; right: 330px; z-index: 2;
	-webkit-mask-image: linear-gradient(transparent 0, #000 30%, #000 72%, transparent 100%);
	        mask-image: linear-gradient(transparent 0, #000 30%, #000 72%, transparent 100%);
}
.gx-names ul {
	list-style: none; margin: 0; padding: 0;
	position: absolute; left: 0; right: 0; top: 50%;
	transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
.gx-names li { height: var(--row, 1.45em); font-size: clamp(30px, 3.3vw, 58px); display: flex; align-items: center; }
.gx-names a {
	all: unset; cursor: pointer; font-size: 1em; text-decoration: none !important;
	font-family: Oswald, "Arial Narrow", sans-serif; font-weight: 600;
	font-size: clamp(30px, 3.3vw, 58px); line-height: 1; text-transform: uppercase;
	letter-spacing: -.01em; white-space: nowrap;
	color: var(--ink) !important; opacity: .16;
	transition: opacity .4s ease;
}
.gx-names a:hover { opacity: .4; }
.gx-names li.is-active a { opacity: 1; }
.gx-names small {
	font-size: .38em; font-weight: 500; margin-left: .35em; opacity: .9; letter-spacing: .02em;
}
.gx-names li.is-hidden { display: none; }

/* ---------- Datos ---------- */
.gx-info {
	position: absolute; width: 190px; right: 120px; top: calc(50% - 35px); z-index: 2;
	transform: translateY(-50%);
}
.gx-specs { display: flex; flex-direction: column; gap: 22px; }
.gx-spec { flex: 1; min-width: 0; }
.gx-spec__val { display: flex; align-items: flex-start; gap: 6px; }
.gx-spec__num {
	font-family: Oswald, "Arial Narrow", sans-serif; font-weight: 600;
	font-size: clamp(30px, 3vw, 46px); line-height: 1;
}
.gx-spec__unit {
	writing-mode: vertical-rl; transform: rotate(180deg);
	font-family: Oswald, sans-serif; font-weight: 600; font-size: 12px; letter-spacing: .08em;
	text-transform: uppercase; margin-top: 2px;
}
.gx-spec__bar { position: relative; height: 3px; margin: 12px 0 10px; background: color-mix(in srgb, var(--ink) 25%, transparent); }
.gx-spec__bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); width: 0; transition: width .8s cubic-bezier(.2,.7,.2,1) .15s; }
.gx-spec__lbl { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.gx-specs.is-swap .gx-spec__num { animation: gx-num .5s ease; }
@keyframes gx-num { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.gx-cta {
	position: absolute; right: 120px; bottom: 96px; z-index: 3;
	display: inline-flex; align-items: center; gap: 14px;
	font-family: Oswald, sans-serif; font-weight: 600; font-size: 22px; letter-spacing: .04em;
	text-transform: uppercase; color: var(--ink) !important; text-decoration: none !important;
}
.gx-cta svg { width: 30px; transition: transform .25s ease; }
.gx-cta:hover svg { transform: translateX(6px); }

/* ---------- Flechas estilo YouTube ---------- */
.gx-arrows {
	position: absolute; right: 28px; top: 50%; transform: translateY(-50%); z-index: 4;
	display: flex; flex-direction: column; gap: 16px; align-items: center;
}
.gx-arrow {
	all: unset; cursor: pointer; width: 56px; height: 56px; border-radius: 50%;
	background: #f2f2f2; color: #0f0f0f;
	display: grid; place-items: center;
	box-shadow: 0 2px 10px rgba(0,0,0,.18);
	transition: background .2s ease, opacity .2s ease, transform .15s ease;
}
.gx-arrow:hover { background: #e5e5e5; }
.gx-arrow:active { transform: scale(.94); }
.gx-arrow:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.gx-arrow[disabled] { opacity: .35; cursor: default; }
.gx-arrow svg { width: 26px; height: 26px; }
.gx-count { font-family: Oswald, sans-serif; font-size: 13px; letter-spacing: .1em; opacity: .85; }

/* ---------- Chips estilo YouTube ---------- */
.gx-chips {
	position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 4;
	display: flex; gap: 10px; max-width: calc(100% - 32px);
	overflow-x: auto; scrollbar-width: none; padding: 4px;
}
.gx-chips::-webkit-scrollbar { display: none; }
.gx-chip {
	all: unset; cursor: pointer; flex: none;
	padding: 0 14px; height: 34px; line-height: 34px; border-radius: 8px;
	font-size: 14px; font-weight: 500; white-space: nowrap;
	background: rgba(255,255,255,.16); color: var(--ink) !important; text-decoration: none !important;
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
	transition: background .2s ease, color .2s ease;
}
.gx.ink-dark .gx-chip { background: rgba(0,0,0,.12); }
.gx-chip:hover { background: rgba(255,255,255,.28); }
.gx-chip[aria-current="page"] { background: #f1f1f1; color: #0f0f0f !important; }
.gx.ink-dark .gx-chip[aria-current="page"] { background: #0f0f0f; color: #fff !important; }
.gx-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Celular ---------- */
@media (max-width: 991px) {
	/* Celular: columna flexible. La moto toma el espacio que sobre; lo demás se apila abajo.
	   Así funciona igual con la barra de Safari visible u oculta y en cualquier alto. */
	.gx {
		display: grid;
		grid-template-columns: 1fr auto;
		grid-template-rows: minmax(0, 1fr) auto auto auto auto;
		grid-template-areas: "bikes bikes" "names names" "info info" "cta arrows" "chips chips";
		min-height: 0;
	}
	.gx-bikes { grid-area: bikes; position: relative; width: auto; height: auto; overflow: hidden; container-type: size; }
	.gx-bike { inset: 0; align-items: flex-end; justify-content: center; padding-bottom: 2px; }
	/* el lienzo trae ~20% de aire arriba: se limita por ancho o por alto, lo que llegue primero */
	.gx-bike img { width: min(108cqw, 168cqh); max-width: none; max-height: none; height: auto; flex: none; }
	.gx-names {
		grid-area: names; position: relative; left: auto; right: auto; top: auto; bottom: auto;
		width: auto; height: 118px; margin: 0 20px;
		-webkit-mask-image: linear-gradient(transparent 0, #000 22%, #000 78%, transparent 100%);
		        mask-image: linear-gradient(transparent 0, #000 22%, #000 78%, transparent 100%);
	}
	.gx-names li { justify-content: center; font-size: 30px; }
	.gx-info { grid-area: info; position: relative; left: auto; right: auto; top: auto; width: auto; transform: none; margin: 4px 20px 0; }
	.gx-specs { flex-direction: row; gap: 16px; }
	.gx-spec__num { font-size: 26px; }
	.gx-spec__unit { font-size: 9px; }
	.gx-spec__bar { height: 2px; margin: 8px 0 6px; }
	.gx-spec__lbl { font-size: 10px; letter-spacing: .1em; }
	.gx-cta { grid-area: cta; position: relative; left: auto; right: auto; bottom: auto; align-self: center; margin: 18px 0 0 20px; font-size: 18px; }
	.gx-arrows { grid-area: arrows; position: relative; top: auto; right: auto; bottom: auto; transform: none; flex-direction: row; gap: 10px; margin: 18px 16px 0 0; }
	.gx-arrow { width: 44px; height: 44px; }
	.gx-arrow svg { width: 20px; height: 20px; }
	.gx-count { display: none; }
	.gx-chips { grid-area: chips; position: relative; left: auto; bottom: auto; transform: none; max-width: 100%; padding: 12px 16px 14px; }
}
@media (max-width: 991px) and (max-height: 620px) {
	.gx-names { height: 100px; }
	.gx-names li { font-size: 26px; }
	.gx-cta, .gx-arrows { margin-top: 10px; }
}
@media (hover: hover) {
	.gx-bike.is-active:hover img { transform: scale(1.035) translateX(8px); }
	.gx-names li.is-active a { cursor: pointer; }
	.gx-names li.is-active a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
	.gx-info:hover .gx-spec__lbl { text-decoration: underline; }
}
.gx-info { cursor: pointer; }
.gx.is-dragging, .gx.is-dragging .gx-bike, .gx.is-dragging .gx-names ul { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
	.gx, .gx-bike, .gx-names ul, .gx-spec__bar i { transition: none; }
}

/* Sin botón de WhatsApp en el garage (el del tema y el de Social Chat). */
.gx-page .ms-wa, .gx-page .qlwapp { display: none !important; }
.gx-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font-size: 20px; }
