/**
 * Culture Racing — Hero Aside Drawer
 *
 * Componente drawer lateral (panel deslizante desde la derecha) disparado por
 * un trigger del hero. Backdrop + panel con hero-image, stats, secciones,
 * ubicación, share y footer sticky con CTAs. Standalone: usa var(--cr-*, fallback).
 *
 * ─────────────────────────────────────────────────────────────────────────
 * ÍNDICE
 *   §1  Trigger          → button.zenth-hero-aside (botón que abre el drawer)
 *   §2  Drawer root      → .zenth-hero-drawer (+ .is-open)
 *   §3  Backdrop         → .zenth-hero-drawer__backdrop
 *   §4  Panel            → .zenth-hero-drawer__panel
 *   §5  Close button     → .zenth-hero-drawer__close
 *   §6  Body scroll      → .zenth-hero-drawer__body (+ scrollbar)
 *   §7  Hero             → __hero / __scroll-hint / __hero-image / __hero-overlay
 *                          / __hero-content / __hero-top  (incl. @keyframes bounce)
 *   §8  Status pills     → __status (+ live/soldout/finished/soon, @keyframes pulse)
 *   §9  Title/subtitle   → __title / __subtitle
 *   §10 Content          → __content (wrapper debajo del hero)
 *   §11 Stats grid       → __stats / __stat / __stat-label / __stat-value
 *   §12 Section          → __section / __section-title / __description / __items
 *   §13 Location         → __location (+ icon / text)
 *   §14 Share            → __share (+ __share-btn)
 *   §15 Footer + CTAs    → __footer / __btn (+ --primary / --secondary)
 *   §16 Body scroll lock → body.zenth-hero-drawer-open
 *   §17 Responsive       → @media de tamaño + a11y consolidados acá
 * ─────────────────────────────────────────────────────────────────────────
 * BREAKPOINTS usados acá:  640 (mobile)
 *   + 1 media de accesibilidad (prefers-reduced-motion). Ambos en §17.
 *   Hay 2 @keyframes (bounce, pulse) que NO son @media: viven junto a su
 *   componente (§7 hero, §8 status), igual que en global.css.
 * ─────────────────────────────────────────────────────────────────────────
 */


/* ═══════════════════════════════════════════════════════════════════════
   §1 · TRIGGER — button.zenth-hero-aside
   ═══════════════════════════════════════════════════════════════════════ */

button.zenth-hero-aside,
.zenth-hero-aside--trigger {
	-webkit-appearance: none !important;
	appearance: none !important;
	border: 0 !important;
	font: inherit;
	cursor: pointer !important;
}

button.zenth-hero-aside:focus,
.zenth-hero-aside--trigger:focus {
	outline: none;
}

button.zenth-hero-aside:focus-visible,
.zenth-hero-aside--trigger:focus-visible {
	outline: 2px solid var(--cr-color-white);
	outline-offset: 2px;
}


/* ═══════════════════════════════════════════════════════════════════════
   §2 · DRAWER ROOT — .zenth-hero-drawer (+ .is-open)
   ═══════════════════════════════════════════════════════════════════════ */

.zenth-hero-drawer {
	position: fixed;
	inset: 0;
	z-index: 9999;
	pointer-events: none;
	visibility: hidden;
	transition: visibility 0ms linear 320ms;
}

.zenth-hero-drawer.is-open {
	pointer-events: auto;
	visibility: visible;
	transition-delay: 0ms;
}


/* ═══════════════════════════════════════════════════════════════════════
   §3 · BACKDROP — .zenth-hero-drawer__backdrop
   ═══════════════════════════════════════════════════════════════════════ */

.zenth-hero-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 320ms ease;
	cursor: pointer;
}

.zenth-hero-drawer.is-open .zenth-hero-drawer__backdrop {
	opacity: 1;
}


/* ═══════════════════════════════════════════════════════════════════════
   §4 · PANEL — .zenth-hero-drawer__panel
   ═══════════════════════════════════════════════════════════════════════ */

.zenth-hero-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(520px, 100vw);
	/* Panel de drawer — elevación sobre bg negro: usa --cr-color-darker (#0f0f0f). */
	background: var(--cr-color-darker, #0f0f0f);
	color: var(--cr-color-white, #fff);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateX(100%);
	transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: -16px 0 60px rgba(0, 0, 0, 0.6);
}

.zenth-hero-drawer.is-open .zenth-hero-drawer__panel {
	transform: translateX(0);
}


/* ═══════════════════════════════════════════════════════════════════════
   §5 · CLOSE BUTTON — .zenth-hero-drawer__close (floating)
   ═══════════════════════════════════════════════════════════════════════ */

.zenth-hero-drawer__close {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 3;
	-webkit-appearance: none;
	appearance: none;
	background: rgba(0, 0, 0, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: var(--cr-color-white, #fff);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 200ms ease, transform 200ms ease, border-color 200ms ease;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.zenth-hero-drawer__close:hover {
	background: var(--cr-color-primary, #e8001d);
	border-color: var(--cr-color-primary, #e8001d);
	transform: rotate(90deg);
}

.zenth-hero-drawer__close:focus-visible {
	outline: 2px solid var(--cr-color-primary, #e8001d);
	outline-offset: 2px;
}


/* ═══════════════════════════════════════════════════════════════════════
   §6 · BODY SCROLL — .zenth-hero-drawer__body (+ scrollbar)
   ═══════════════════════════════════════════════════════════════════════ */

.zenth-hero-drawer__body {
	flex-grow: 1;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.zenth-hero-drawer__body::-webkit-scrollbar {
	width: 6px;
}
.zenth-hero-drawer__body::-webkit-scrollbar-track {
	background: transparent;
}
.zenth-hero-drawer__body::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.12);
	border-radius: 3px;
}


/* ═══════════════════════════════════════════════════════════════════════
   §7 · HERO — imagen + overlay + scroll-hint + hero-content
   ═══════════════════════════════════════════════════════════════════════ */

/* HERO con imagen + overlay */
.zenth-hero-drawer__hero {
	position: relative;
	aspect-ratio: 16 / 9;
	max-height: 38vh;
	background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 100%);
	overflow: hidden;
	flex-shrink: 0;
}

/* Scroll hint: chevron animado en el borde inferior del hero */
.zenth-hero-drawer__scroll-hint {
	position: absolute;
	bottom: 8px;
	left: 50%;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: rgba(255, 255, 255, 0.7);
	pointer-events: none;
	animation: zenth-hero-drawer-bounce 1.8s ease-in-out infinite;
	transition: opacity 240ms ease;
	z-index: 2;
}

.zenth-hero-drawer.is-scrolled .zenth-hero-drawer__scroll-hint {
	opacity: 0;
}

@keyframes zenth-hero-drawer-bounce {
	0%, 100% { transform: translateX(-50%) translateY(0); }
	50% { transform: translateX(-50%) translateY(4px); }
}

.zenth-hero-drawer__hero--no-image {
	aspect-ratio: auto;
	min-height: 140px;
}

.zenth-hero-drawer__hero-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Overlay: gradiente negro de abajo hacia arriba + halo rojo sutil top-left */
.zenth-hero-drawer__hero-overlay {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(0,0,0,0.25) 0%, transparent 30%, rgba(0,0,0,0.55) 65%, rgba(5,5,5,0.95) 100%),
		linear-gradient(160deg, rgba(232,0,29,0.25) 0%, transparent 45%);
	pointer-events: none;
}

.zenth-hero-drawer__hero-content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 18px 24px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Top row del hero: eyebrow a la izq + status a la derecha */
.zenth-hero-drawer__hero-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-right: 56px; /* deja espacio al botón X */
}

.zenth-hero-drawer__eyebrow {
	font-family: var(--cr-font-body, inherit);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--cr-color-primary, #e8001d);
}


/* ═══════════════════════════════════════════════════════════════════════
   §8 · STATUS PILLS — __status (+ live/soldout/finished/soon)
   ═══════════════════════════════════════════════════════════════════════ */

/* Status pill */
.zenth-hero-drawer__status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: var(--cr-color-white, #fff);
}

.zenth-hero-drawer__status-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}

.zenth-hero-drawer__status--live {
	color: #22c55e;
	border-color: rgba(34, 197, 94, 0.45);
}
.zenth-hero-drawer__status--live .zenth-hero-drawer__status-dot {
	box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
	animation: zenth-pulse 1.6s ease-in-out infinite;
}

.zenth-hero-drawer__status--soldout {
	color: #f59e0b;
	border-color: rgba(245, 158, 11, 0.45);
}

.zenth-hero-drawer__status--finished {
	color: rgba(255, 255, 255, 0.6);
	border-color: rgba(255, 255, 255, 0.2);
}

.zenth-hero-drawer__status--soon {
	color: var(--cr-color-primary, #e8001d);
	border-color: rgba(232, 0, 29, 0.45);
}

@keyframes zenth-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}


/* ═══════════════════════════════════════════════════════════════════════
   §9 · TITLE / SUBTITLE — encima del overlay
   ═══════════════════════════════════════════════════════════════════════ */

/* Título y subtítulo encima del overlay */
.zenth-hero-drawer__title {
	font-family: var(--cr-font-display, sans-serif);
	font-size: clamp(28px, 4.5vw, 40px);
	font-weight: 400;
	line-height: 1;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--cr-color-white, #fff);
	margin: 0;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.zenth-hero-drawer__subtitle {
	font-family: var(--cr-font-body, inherit);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
}


/* ═══════════════════════════════════════════════════════════════════════
   §10 · CONTENT — .zenth-hero-drawer__content (wrapper debajo del hero)
   ═══════════════════════════════════════════════════════════════════════ */

/* CONTENIDO debajo del hero */
.zenth-hero-drawer__content {
	padding: 20px 24px 24px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}


/* ═══════════════════════════════════════════════════════════════════════
   §11 · STATS GRID — __stats / __stat / __stat-label / __stat-value
   ═══════════════════════════════════════════════════════════════════════ */

/* Stats grid (3 cards horizontales) */
.zenth-hero-drawer__stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
	gap: 8px;
}

.zenth-hero-drawer__stat {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	padding: 10px 8px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-align: center;
	min-width: 0;
}

.zenth-hero-drawer__stat-label {
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5);
}

.zenth-hero-drawer__stat-value {
	font-family: var(--cr-font-display, sans-serif);
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	color: var(--cr-color-white, #fff);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.zenth-hero-drawer__stat-value--small {
	font-size: 16px;
}

.zenth-hero-drawer__stat-value small {
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
	font-family: var(--cr-font-body, inherit);
	line-height: 1.2;
}


/* ═══════════════════════════════════════════════════════════════════════
   §12 · SECTION — __section / __section-title / __description / __items
   ═══════════════════════════════════════════════════════════════════════ */

/* Section (description, items, location, share) */
.zenth-hero-drawer__section {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.zenth-hero-drawer__section-title {
	font-family: var(--cr-font-body, inherit);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--cr-color-primary, #e8001d);
	margin: 0;
}

/* Descripción */
.zenth-hero-drawer__description {
	font-family: var(--cr-font-body, inherit);
	font-size: 14px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
}

/* Lista de items */
.zenth-hero-drawer__items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.zenth-hero-drawer__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--cr-color-white, #fff);
}

.zenth-hero-drawer__item-icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	color: #22c55e;
	background: rgba(34, 197, 94, 0.12);
	border-radius: 50%;
}


/* ═══════════════════════════════════════════════════════════════════════
   §13 · LOCATION — .zenth-hero-drawer__location (+ icon / text)
   ═══════════════════════════════════════════════════════════════════════ */

/* Ubicación */
.zenth-hero-drawer__location {
	display: flex;
	gap: 12px;
	padding: 14px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
}

.zenth-hero-drawer__location-icon {
	flex-shrink: 0;
	color: var(--cr-color-primary, #e8001d);
	margin-top: 2px;
}

.zenth-hero-drawer__location-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 13px;
	line-height: 1.4;
}

.zenth-hero-drawer__location-text strong {
	color: var(--cr-color-white, #fff);
	font-weight: 700;
}

.zenth-hero-drawer__location-text span {
	color: rgba(255, 255, 255, 0.65);
}


/* ═══════════════════════════════════════════════════════════════════════
   §14 · SHARE — .zenth-hero-drawer__share (+ __share-btn)
   ═══════════════════════════════════════════════════════════════════════ */

/* Share */
.zenth-hero-drawer__share {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.zenth-hero-drawer__share-btn {
	-webkit-appearance: none;
	appearance: none;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	color: var(--cr-color-white, #fff);
	padding: 10px 12px;
	font-family: var(--cr-font-body, inherit);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.zenth-hero-drawer__share-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.22);
	color: var(--cr-color-white, #fff);
}

.zenth-hero-drawer__share-btn.is-copied {
	background: rgba(34, 197, 94, 0.12);
	border-color: rgba(34, 197, 94, 0.4);
	color: #22c55e;
}


/* ═══════════════════════════════════════════════════════════════════════
   §15 · FOOTER + CTAs — __footer / __btn (+ --primary / --secondary)
   ═══════════════════════════════════════════════════════════════════════ */

/* Footer sticky con CTAs */
.zenth-hero-drawer__footer {
	display: flex;
	flex-direction: row;
	gap: 10px;
	padding: 16px 24px 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	/* Panel de drawer — elevación sobre bg negro: usa --cr-color-darker (#0f0f0f). */
	background: var(--cr-color-darker, #0f0f0f);
	flex-shrink: 0;
}

.zenth-hero-drawer__btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
	padding: 14px 18px;
	font-family: var(--cr-font-body, inherit);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 999px;
	border: 2px solid transparent;
	transition: background 200ms ease, transform 200ms ease, border-color 200ms ease, color 200ms ease;
	cursor: pointer;
	white-space: nowrap;
}

.zenth-hero-drawer__btn--primary {
	background: var(--cr-color-primary, #e8001d);
	color: #fff;
	flex: 1.4;
}

.zenth-hero-drawer__btn--primary:hover {
	background: var(--cr-color-primary-hover, #c00018);
	color: #fff;
	transform: translateY(-1px);
}

.zenth-hero-drawer__btn--secondary {
	background: transparent;
	color: var(--cr-color-white, #fff);
	border-color: rgba(255, 255, 255, 0.22);
}

.zenth-hero-drawer__btn--secondary:hover {
	border-color: var(--cr-color-white, #fff);
	color: var(--cr-color-white, #fff);
	background: rgba(255, 255, 255, 0.06);
}


/* ═══════════════════════════════════════════════════════════════════════
   §16 · BODY SCROLL LOCK — body.zenth-hero-drawer-open
   ═══════════════════════════════════════════════════════════════════════ */

body.zenth-hero-drawer-open {
	overflow: hidden;
}


/* ═══════════════════════════════════════════════════════════════════════
   §17 · RESPONSIVE — @media de tamaño + a11y
   ───────────────────────────────────────────────────────────────────────
   Único tier de tamaño: Mobile (≤640). Al final, accesibilidad
   (prefers-reduced-motion), que NO es un breakpoint de tamaño.
   ═══════════════════════════════════════════════════════════════════════ */

/* ───────────────────────── MOBILE · max-width: 640px ──────────────────── */
@media (max-width: 640px) {
	/* §4 · Panel: full-width en mobile */
	.zenth-hero-drawer__panel {
		width: 100vw;
	}

	/* §7 · Hero: mantiene 16/9 */
	.zenth-hero-drawer__hero {
		aspect-ratio: 16 / 9;
	}

	/* §7 · Hero-content: padding reducido */
	.zenth-hero-drawer__hero-content {
		padding: 18px 18px 16px;
	}

	/* §10 · Content: padding + gap ajustados */
	.zenth-hero-drawer__content {
		padding: 18px;
		gap: 20px;
	}

	/* §15 · Footer: padding reducido */
	.zenth-hero-drawer__footer {
		padding: 14px 18px 18px;
	}

	/* §11 · Stat-value: tamaños un poco mayores en mobile */
	.zenth-hero-drawer__stat-value {
		font-size: 24px;
	}

	.zenth-hero-drawer__stat-value--small {
		font-size: 17px;
	}

	/* §14 · Share: pasa a una sola columna */
	.zenth-hero-drawer__share {
		grid-template-columns: 1fr;
	}
}


/* ─────────────────── ACCESIBILIDAD · prefers-reduced-motion ───────────── */
@media (prefers-reduced-motion: reduce) {
	.zenth-hero-drawer,
	.zenth-hero-drawer__backdrop,
	.zenth-hero-drawer__panel,
	.zenth-hero-drawer__close,
	.zenth-hero-drawer__btn,
	.zenth-hero-drawer__status--live .zenth-hero-drawer__status-dot {
		transition: none !important;
		animation: none !important;
	}
}
