/*
 * Le Toy Factory — Portada: Shared base + B01 Hero
 * Rejilla, utilidades comunes y sección hero.
 */

/* ── Contenedor ─────────────────────────────────────────────────────────── */

.ltf-home {
	/* Sube bajo la cabecera (su alto y su filete). El margen va aquí y no en
	   la portada porque este contenedor recorta lo que se le sale. */
	/* `--ltf-cab-alto` lo mide ltf-menu.js: con un aviso bajo la navegación
	   la cabecera es más alta. */
	margin-top: calc(-1 * var(--ltf-cab-alto, calc(1px + var(--sgf-nav-height, 60px))));
	overflow-x: hidden;
	background: #FBFBFA;
	color: #141212;
}

/* ── Sistema de rejilla 12 col ───────────────────────────────────────────── */

.ltf-g12 {
	display: grid;
	grid-template-columns: repeat(var(--ltf-cols), minmax(0, 1fr));
	column-gap: var(--ltf-medianil);
	padding-inline: var(--ltf-margen);
}

/* ── Sección: padding-top 160 px ─────────────────────────────────────────── */

.ltf-sec {
	padding-top: 160px;
}

/* ── Cabecera de sección (label + enlace) ────────────────────────────────── */

.ltf-head {
	grid-column: 1 / -1;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 16px;
}

/* ── Etiqueta .d: 12 px uppercase ────────────────────────────────────────── */

.ltf-d {
	font-size: 12px;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: .02em;
}

/* ── Pie de foto .cap ────────────────────────────────────────────────────── */

.ltf-cap {
	margin: 10px 0 0;
	max-width: none; /* el padre limita los párrafos a un ancho de lectura */
	font-family: inherit; /* y pone los pies de foto en monoespaciada */
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 12px;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: .02em;
}

/* ── Enlace subrayado .lnk ───────────────────────────────────────────────── */
/* Tablero v5: underline animado — se borra hacia la derecha en hover. */

.ltf-lnk {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .02em;
	text-decoration: none;
	background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
	padding-bottom: 2px;
	color: inherit;
	transition: background-size .6s cubic-bezier(.16, 1, .3, 1);
}

.ltf-lnk:hover {
	background-size: 0 1px;
	background-position: 100% 100%;
}

/* ── Contenedor de foto .ph ──────────────────────────────────────────────── */

.ltf-ph {
	background: #E8E8E6;
	overflow: hidden;
	position: relative;
}

.ltf-ph img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 1.2s cubic-bezier(.16, 1, .3, 1);
}

a:hover .ltf-ph img {
	transform: scale(1.015);
}

/* ── Clases de span en rejilla ───────────────────────────────────────────── */

.ltf-m2 {
	grid-column: span 2;
	display: block;
	min-width: 0;
	text-decoration: none;
	color: inherit;
}

.ltf-m3 {
	grid-column: span 3;
	display: block;
	min-width: 0;
	text-decoration: none;
	color: inherit;
}

/* ── Mosaico 2×2 ─────────────────────────────────────────────────────────── */

.ltf-mosaic {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 2px;
	overflow: hidden;
	background: #E8E8E6;
}

.ltf-mosaic span {
	overflow: hidden;
	display: block;
}

.ltf-mosaic span img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── B01. HERO ───────────────────────────────────────────────────────────── */

/* Tablero Main: 880 desde arriba del todo, con la cabecera encima. Aquí la
   cabecera va delante en el flujo, así que la portada sube por debajo de
   ella (su alto) y mide 880 menos la barra de avisos. La foto ocupa lo que
   queda bajo la cabecera, centrada y fundida a los lados. */
.ltf-hero {
	position: relative;
	height: calc(880px - var(--ltf-avisos-alto, 30px));
	overflow: hidden;
	background: linear-gradient(90deg, #CDCFCE 0%, #D5D7D7 50%, #DADCDD 100%);
}

.ltf-hero__img {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0 auto;
	height: calc(100% - var(--ltf-cab-alto, calc(1px + var(--sgf-nav-height, 60px))));
	width: auto;
	max-width: none;
	display: block;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}

.ltf-hero__bottom {
	position: absolute;
	bottom: 24px;
	left: 0;
	right: 0;
	align-items: end;
	z-index: 2;
}

.ltf-hero__title {
	grid-column: 1 / span 6;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
	/* R4 (delta 03b): es un `h1` y heredaba el interletrado negativo que el
	   padre da a los títulos grandes (−0,42 px). Aquí es una frase a 14. */
	letter-spacing: normal;
	margin: 0;
	max-width: none;
	color: #141212;
}

.ltf-hero__actions {
	grid-column: 7 / span 6;
	justify-self: end;
	align-self: end;
}

/* Botón píldora de cristal */
.ltf-pill {
	display: inline-flex;
	align-items: center;
	height: 36px;
	padding: 0 16px;
	background: rgba(251, 251, 250, .6);
	backdrop-filter: blur(24px) saturate(1.6);
	-webkit-backdrop-filter: blur(24px) saturate(1.6);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .02em;
	text-decoration: none;
	color: #141212;
	white-space: nowrap;
	transition: opacity .3s cubic-bezier(.16, 1, .3, 1), background-color .4s cubic-bezier(.16, 1, .3, 1);
}

.ltf-pill:hover {
	background: rgba(251, 251, 250, .82);
}

/* Placeholder cuando falta la imagen del cliente */
.ltf-hero__placeholder {
	position: absolute;
	inset: 0;
	background: #f0ede8;
}

/* ── Responsive: tablet / móvil ──────────────────────────────────────────── */

@media (max-width: 1100px) {
	.ltf-hero {
		height: 680px;
	}
}

@media (min-width: 601px) and (max-width: 900px) {
	.ltf-g12 {
		grid-template-columns: repeat(var(--ltf-cols), minmax(0, 1fr));
		column-gap: var(--ltf-medianil);
		padding-inline: var(--ltf-margen);
	}

	/* Todo a ancho completo por defecto */
	.ltf-g12 > * {
		grid-column: 1 / -1 !important;
	}

	/* Excepción: tarjetas de modelo y selección (span 2 en 4 col = 2 por fila) */
	.ltf-m2 {
		grid-column: span 2 !important;
	}

	.ltf-m3 {
		grid-column: span 2 !important;
	}

	/* Sección: menos padding arriba en móvil */
	.ltf-sec {
		padding-top: 80px;
	}

	/* Hero: altura adaptativa */
	.ltf-hero {
		height: 100svh;
		min-height: 480px;
	}

	.ltf-hero__img {
		left: 50%;
		right: auto;
		transform: translateX(-50%);
		width: 100%;
		height: 100%;
		object-fit: cover;
		-webkit-mask-image: none;
		mask-image: none;
	}

	.ltf-hero__title {
		grid-column: 1 / -1;
	}

	.ltf-hero__actions {
		grid-column: 1 / -1;
		justify-self: start;
		margin-top: 12px;
	}
}

/* ── Pies de foto de la portada, en tinta (R1, delta 03b) ───────────────────
   El padre pinta todo `figcaption` en gris. En el tablero los pies de foto
   van en tinta (#141212); el gris se queda para los contadores («3», «18»),
   que no son `figcaption`. Un selector para los catorce. */
.ltf-home figcaption.ltf-cap { color: var(--sgf-color-text, #141212); }

/* ── Zonas táctiles de 44 px en móvil (R7, delta 03b) ───────────────────────
   «Ver» de la portada y los «Ver todo» / «Ver las 18» de cada rótulo miden
   14–16 px de alto: se leen bien y cuesta acertarles con el dedo. No cambian
   de tamaño; se les amplía la zona con un `::before`. Por abajo solo 12 px,
   que es lo que hay hasta la primera foto: más y pisaría su enlace. */
@media (max-width: 900px) {
	.ltf-home .ltf-hero__ver,
	.ltf-home .ltf-head .ltf-lnk { position: relative; }
	.ltf-home .ltf-hero__ver::before,
	.ltf-home .ltf-head .ltf-lnk::before {
		content: "";
		position: absolute;
		inset: -16px -11px -12px;
	}
	/* «Ver» mide 14, no 16, y no tiene nada debajo: 15 por cada lado. */
	.ltf-home .ltf-hero__ver::before { inset: -15px -11px; }
}

/* ── Vídeo de fondo (0.9.54) ────────────────────────────────────────────────
   Si el bloque Apertura lleva vídeo (inc/ltf-portada-secciones.php), cubre
   el hero entero, anclado abajo para no cortar los pies; la foto es su
   `poster`. Al lado del botón, la pausa: un cuadrado de 36 con el mismo
   cristal que la píldora; dos barras, o un triángulo si está parado. */
.ltf-hero__video {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 100%;
}

.ltf-hero--video .ltf-hero__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ltf-hero__pausa {
	position: relative;
	flex: none;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(251, 251, 250, .6);
	backdrop-filter: blur(24px) saturate(1.6);
	-webkit-backdrop-filter: blur(24px) saturate(1.6);
	color: #141212;
	cursor: pointer;
}

.ltf-hero__pausa:hover { background: rgba(251, 251, 250, .82); }
.ltf-hero__pausa:focus-visible { outline: 2px solid #141212; outline-offset: 2px; }

.ltf-hero__pausa::before,
.ltf-hero__pausa::after {
	content: "";
	position: absolute;
	top: 12px;
	width: 3px;
	height: 12px;
	background: currentColor;
}
.ltf-hero__pausa::before { left: 13px; }
.ltf-hero__pausa::after { left: 20px; }

.ltf-hero__pausa.is-pausado::before {
	top: 11px;
	left: 14px;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 7px 0 7px 11px;
	border-color: transparent transparent transparent currentColor;
	background: none;
}
.ltf-hero__pausa.is-pausado::after { display: none; }
