/* ── Ventanas emergentes ────────────────────────────────────────────────────
   La ventana que ofrece guardar la cesta o enviar un código de descuento
   («Un detalle para tu cesta», «Te guardamos la cesta») no es del tema: la
   pinta el plugin sgf-core (assets/js/sgf-cart-capture.js) con su propia
   hoja, pensada para valer en cualquier tienda — tarjeta blanca con radio y
   sombra, tipografía del sistema, campos con borde gris, velo negro al 45 %.
   Aquí no hay nada de eso. Sam, 11 nov 2026: «deberíamos dar un buen diseño
   a los pop ups, para que mantengan la estética Le Toy».

   No se toca el plugin: se le pone la piel de la casa por encima.

     · el velo de los cajones: tinta al 12 % y la página desenfocada detrás;
     · el panel de cristal de los cajones, recto, sin sombra;
     · título a 20, texto a 14 en gris, rótulos a 12 en versalitas;
     · campos de una sola línea, como los de «Entrar»;
     · botón negro de 48 con el rótulo en versalitas y «Ahora no» como
       enlace subrayado.

   POR QUÉ `body` DELANTE DE CADA SELECTOR. El plugin inyecta su hoja en el
   <head> al abrir la ventana, o sea DESPUÉS de esta, y con selectores de id.
   A igual peso gana la suya por ir más tarde; con `body` delante gana esta
   sin recurrir a `!important`.

   Se carga en todas las páginas: la ventana puede salir en cualquiera. */

body #sgf-capture-modal {
	padding: var(--ltf-margen, 24px);
	background: rgba(20, 18, 18, .12);
	-webkit-backdrop-filter: blur(20px) saturate(1.2);
	backdrop-filter: blur(20px) saturate(1.2);
}

body #sgf-capture-modal .sgf-capture-card {
	width: 100%;
	max-width: 420px;
	padding: 32px 24px 24px;
	border-radius: 0;
	box-shadow: none;
	background: rgba(251, 251, 250, .86);
	-webkit-backdrop-filter: blur(40px) saturate(1.6);
	backdrop-filter: blur(40px) saturate(1.6);
	color: var(--sgf-color-text, #141212);
	font-family: inherit;
	animation: ltf-emergente-entra .5s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes ltf-emergente-entra {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: none; }
}

body #sgf-capture-modal h2 {
	margin: 0 0 8px;
	font-size: 20px;
	line-height: 1.35;
	font-weight: 400;
	letter-spacing: 0;
}

body #sgf-capture-modal p {
	margin: 0 0 24px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--sgf-color-muted, #65605e);
}

/* El código, si la tienda ha puesto uno: un rótulo en tinta. */
body #sgf-capture-modal .sgf-capture-coupon {
	margin: -8px 0 24px;
	font-size: 12px;
	line-height: 1.3;
	font-weight: 400;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--sgf-color-text, #141212);
}

/* Rótulo y campo, como en «Entrar». */
body #sgf-capture-modal label {
	display: block;
	margin: 0 0 16px;
	font-size: 12px;
	line-height: 1.35;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--sgf-color-muted, #65605e);
}

body #sgf-capture-modal input[type="email"],
body #sgf-capture-modal input[type="tel"] {
	display: block;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-bottom: 1px solid var(--sgf-color-text, #141212);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font: inherit;
	font-size: 14px;
	letter-spacing: 0;
	text-transform: none;
	color: var(--sgf-color-text, #141212);
	-webkit-appearance: none;
	appearance: none;
}
body #sgf-capture-modal input[type="email"]:focus,
body #sgf-capture-modal input[type="tel"]:focus { outline: none; border-bottom-width: 2px; }
body #sgf-capture-modal input:focus-visible { outline: none; }

/* El consentimiento: frase, no rótulo. */
body #sgf-capture-modal .sgf-capture-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 20px 0 0;
	font-size: 12px;
	line-height: 1.5;
	letter-spacing: 0;
	text-transform: none;
	color: var(--sgf-color-muted, #65605e);
}
body #sgf-capture-modal .sgf-capture-consent input {
	flex: none;
	width: 14px;
	height: 14px;
	margin: 2px 0 0;
	border-radius: 0;
	accent-color: var(--sgf-color-text, #141212);
}

body #sgf-capture-modal .sgf-capture-actions {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-top: 24px;
}

body #sgf-capture-modal button {
	border-radius: 0;
	font-family: inherit;
	font-size: 12px;
	line-height: 1.3;
	letter-spacing: .02em;
	text-transform: uppercase;
}

body #sgf-capture-modal .sgf-capture-ok {
	flex: 1;
	height: 48px;
	padding: 0 20px;
	background: var(--sgf-color-text, #141212);
	color: var(--sgf-color-bg, #fbfbfa);
	transition: opacity .15s cubic-bezier(.16, 1, .3, 1);
}
body #sgf-capture-modal .sgf-capture-ok:hover { opacity: .85; }

/* «Ahora no»: el enlace subrayado de la casa (.ltf-lnk). */
body #sgf-capture-modal .sgf-capture-no {
	flex: none;
	padding: 0 0 2px;
	background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
	color: var(--sgf-color-text, #141212);
	transition: background-size .6s cubic-bezier(.16, 1, .3, 1);
}
body #sgf-capture-modal .sgf-capture-no:hover { background-size: 0 1px; background-position: 100% 100%; }

body #sgf-capture-modal button:focus-visible {
	outline: 2px solid var(--sgf-color-text, #141212);
	outline-offset: 3px;
}

/* Móvil: una hoja pegada abajo, a todo el ancho, como la de los filtros. */
@media (max-width: 600px) {
	body #sgf-capture-modal { align-items: flex-end; padding: 0; }
	body #sgf-capture-modal .sgf-capture-card {
		max-width: none;
		padding: 28px var(--ltf-margen, 16px) calc(24px + env(safe-area-inset-bottom, 0px));
	}
}

@media (prefers-reduced-motion: reduce) {
	body #sgf-capture-modal .sgf-capture-card { animation: none; }
	body #sgf-capture-modal .sgf-capture-ok,
	body #sgf-capture-modal .sgf-capture-no { transition: none; }
}


/* ══ La ventana de campaña ════════════════════════════════════════════════════
   inc/emergente-campana.php · js/modules/ltf-emergente.js

   La foto de la campaña llena la caja y encima va una losa de cristal con
   el descuento, el código y el botón. El cristal se luce porque lo que
   tiene detrás es una foto con color y no una página casi blanca: por eso
   la losa va SOBRE la foto y no a su lado.

   Todo recto y sin sombra, como el resto de la casa. Lo único redondo es
   el aspa, que es el mismo botón de cristal de los puntos de compra.

   Capas: por encima de la cabecera y los cajones (1000 y pico) la ventana
   centrada; la tarjeta, entre las cookies (900) y los avisos (950). */

.ltf-emg[hidden] { display: none; }

/* ── Formato «ventana» ──────────────────────────────────────────────────── */
.ltf-emg--ventana {
	position: fixed;
	inset: 0;
	z-index: calc(var(--sgf-z-nav, 1000) + 20);
	display: grid;
	place-items: center;
	padding: var(--ltf-margen, 24px);
}
.ltf-emg__velo {
	position: absolute;
	inset: 0;
	background: rgba(20, 18, 18, .22);
	-webkit-backdrop-filter: blur(28px) saturate(1.3);
	backdrop-filter: blur(28px) saturate(1.3);
	opacity: 0;
	transition: opacity .6s cubic-bezier(.16, 1, .3, 1);
}
.ltf-emg.is-open .ltf-emg__velo { opacity: 1; }

.ltf-emg--ventana .ltf-emg__caja {
	position: relative;
	width: min(440px, 100%);
	aspect-ratio: 3 / 4.3;
	max-height: calc(100dvh - 2 * var(--ltf-margen, 24px));
	overflow: hidden;
	background: var(--sgf-color-bg-alt, #e8e8e6); /* el gris de los marcos de foto, por si la foto tarda */
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .5s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1);
}
.ltf-emg--ventana.is-open .ltf-emg__caja { opacity: 1; transform: none; }
.ltf-emg__caja:focus { outline: none; }

/* La foto: llena la caja y se asienta despacio mientras la ventana entra. */
.ltf-emg--ventana .ltf-emg__foto { position: absolute; inset: 0; }
.ltf-emg__foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ltf-emg--ventana .ltf-emg__foto img {
	object-position: 50% 20%;
	transform: scale(1.08);
	transition: transform 2.4s cubic-bezier(.16, 1, .3, 1);
}
.ltf-emg--ventana.is-open .ltf-emg__foto img { transform: scale(1); }

/* El aspa: el botón de cristal de los puntos de compra. */
.ltf-emg__cerrar {
	all: unset;
	box-sizing: border-box;
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	color: var(--sgf-color-text, #141212);
	background: rgba(251, 251, 250, .55);
	-webkit-backdrop-filter: blur(16px) saturate(1.6);
	backdrop-filter: blur(16px) saturate(1.6);
	box-shadow: inset 0 0 0 1px rgba(251, 251, 250, .7);
	transition: transform .6s cubic-bezier(.16, 1, .3, 1);
}
.ltf-emg__cerrar:hover { transform: rotate(90deg); }
.ltf-emg__cerrar:focus-visible { outline: 2px solid var(--sgf-color-text, #141212); outline-offset: 2px; }

/* La losa de cristal. Entra un poco después que la caja, desde abajo. */
.ltf-emg--ventana .ltf-emg__losa {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 12px;
	z-index: 1;
	padding: 20px 20px 16px;
	color: var(--sgf-color-text, #141212);
	background: rgba(251, 251, 250, .62);
	-webkit-backdrop-filter: blur(28px) saturate(1.7);
	backdrop-filter: blur(28px) saturate(1.7);
	box-shadow: inset 0 0 0 1px rgba(251, 251, 250, .55);
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .6s cubic-bezier(.16, 1, .3, 1) .25s, transform .9s cubic-bezier(.16, 1, .3, 1) .25s;
}
.ltf-emg--ventana.is-open .ltf-emg__losa { opacity: 1; transform: none; }

.ltf-emg__ante {
	margin: 0;
	font-size: 12px;
	line-height: 1.3;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--sgf-color-text, #141212);
}
/* El descuento es lo único grande de toda la web, y a propósito. */
.ltf-emg__titulo {
	margin: 10px 0 0;
	font-size: clamp(40px, 12vw, 56px);
	line-height: .95;
	font-weight: 400;
	letter-spacing: -.03em;
}
.ltf-emg__texto {
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--sgf-color-text, #141212);
}

/* El código, entre dos filetes, con «Copiar» a la derecha. */
.ltf-emg__codigo {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 16px 0 0;
	padding: 12px 0;
	border-block: 1px solid rgba(20, 18, 18, .14);
	font-size: 12px;
	line-height: 1.3;
	text-transform: uppercase;
}
.ltf-emg__clave { letter-spacing: .14em; user-select: all; }
.ltf-emg__copiar,
.ltf-emg__no {
	all: unset;
	cursor: pointer;
	font-size: 12px;
	line-height: 1.3;
	letter-spacing: .02em;
	text-transform: uppercase;
	padding-bottom: 2px;
	background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
	transition: background-size .6s cubic-bezier(.16, 1, .3, 1);
}
.ltf-emg__copiar:hover,
.ltf-emg__no:hover { background-size: 0 1px; background-position: 100% 100%; }
.ltf-emg__copiar:focus-visible,
.ltf-emg__no:focus-visible { outline: 2px solid var(--sgf-color-text, #141212); outline-offset: 3px; }

.ltf-emg__acciones {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-top: 16px;
}
/* El botón: negro; al pasar, se aclara. Las letras ya no se abren: a Sam
   no le gustaba (16 nov 2026), y en ningún botón de la web lo hacen. */
.ltf-emg__ir {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 20px;
	background: var(--sgf-color-text, #141212);
	color: var(--sgf-color-bg, #fbfbfa);
	font-size: 12px;
	line-height: 1;
	letter-spacing: .02em;
	text-transform: uppercase;
	text-decoration: none;
	transition: opacity .3s cubic-bezier(.16, 1, .3, 1);
}
.ltf-emg__ir:hover { opacity: .8; color: var(--sgf-color-bg, #fbfbfa); }
.ltf-emg__ir:focus-visible { outline: 2px solid var(--sgf-color-text, #141212); outline-offset: 3px; }

/* Sin foto, la losa es la ventana. */
.ltf-emg--ventana.ltf-emg--sin-foto .ltf-emg__caja { aspect-ratio: auto; background: none; overflow: visible; }
.ltf-emg--ventana.ltf-emg--sin-foto .ltf-emg__losa { position: relative; inset: auto; padding-top: 48px; background: rgba(251, 251, 250, .86); }

/* Con la ventana centrada abierta, la página no se desliza por detrás. En
   el body y no en <html>: así la cabecera sticky no se va (el porqué, en
   _filters.scss del padre, 12 nov 2026). */
html.ltf-emg-abierta body { overflow: hidden; }

/* ── Formato «tarjeta» ──────────────────────────────────────────────────────
   En la esquina, sin velo: la foto en pequeño a la izquierda y la losa de
   cristal como tarjeta entera. */
.ltf-emg--tarjeta {
	position: fixed;
	z-index: 940;
	right: var(--ltf-margen, 24px);
	bottom: calc(24px + var(--sgf-cookies-alto, 0px) + env(safe-area-inset-bottom, 0px));
	width: min(380px, calc(100vw - 2 * var(--ltf-margen, 24px)));
}
.ltf-emg--tarjeta .ltf-emg__caja {
	position: relative;
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	color: var(--sgf-color-text, #141212);
	background: rgba(251, 251, 250, .66);
	-webkit-backdrop-filter: blur(28px) saturate(1.7);
	backdrop-filter: blur(28px) saturate(1.7);
	box-shadow: inset 0 0 0 1px rgba(20, 18, 18, .08);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .5s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1);
}
.ltf-emg--tarjeta.is-open .ltf-emg__caja { opacity: 1; transform: none; }
.ltf-emg--tarjeta.ltf-emg--sin-foto .ltf-emg__caja { grid-template-columns: minmax(0, 1fr); }
.ltf-emg--tarjeta .ltf-emg__foto { min-height: 100%; background: var(--sgf-color-bg-alt, #e8e8e6); }
.ltf-emg--tarjeta .ltf-emg__foto img { object-position: 50% 20%; }
.ltf-emg--tarjeta .ltf-emg__losa { padding: 16px 44px 14px 16px; }
.ltf-emg--tarjeta .ltf-emg__ante { color: var(--sgf-color-muted, #65605e); }
.ltf-emg--tarjeta .ltf-emg__titulo { margin-top: 6px; font-size: 28px; line-height: 1; letter-spacing: -.02em; }
.ltf-emg--tarjeta .ltf-emg__texto { margin-top: 6px; font-size: 13px; color: var(--sgf-color-muted, #65605e); }
.ltf-emg--tarjeta .ltf-emg__codigo { margin-top: 12px; padding: 10px 0; }
.ltf-emg--tarjeta .ltf-emg__acciones { margin-top: 12px; }
/* Aquí el botón es un enlace: una tarjeta pequeña no lleva un bloque negro. */
.ltf-emg--tarjeta .ltf-emg__ir {
	flex: none;
	height: auto;
	padding: 0 0 2px;
	background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
	color: var(--sgf-color-text, #141212);
	transition: background-size .6s cubic-bezier(.16, 1, .3, 1);
}
.ltf-emg--tarjeta .ltf-emg__ir:hover { letter-spacing: .02em; color: var(--sgf-color-text, #141212); background-size: 0 1px; background-position: 100% 100%; }
/* «Ahora no» sobra: ya está el aspa. */
.ltf-emg--tarjeta .ltf-emg__no { display: none; }
.ltf-emg--tarjeta .ltf-emg__cerrar {
	top: 8px;
	right: 8px;
	background: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	box-shadow: none;
}

/* ── Móvil ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
	/* La ventana, como hoja pegada abajo: foto arriba, losa encima de ella. */
	.ltf-emg--ventana { place-items: end center; padding: 0; }
	.ltf-emg--ventana .ltf-emg__caja {
		width: 100%;
		aspect-ratio: auto;
		height: min(82dvh, 620px);
		max-height: none;
		transform: translateY(40px);
	}
	.ltf-emg--ventana .ltf-emg__losa {
		left: 8px;
		right: 8px;
		bottom: calc(8px + env(safe-area-inset-bottom, 0px));
		padding: 18px 16px 14px;
	}
	.ltf-emg--tarjeta { right: var(--ltf-margen, 16px); bottom: calc(16px + var(--sgf-cookies-alto, 0px) + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
	.ltf-emg__velo,
	.ltf-emg .ltf-emg__caja,
	.ltf-emg .ltf-emg__losa,
	.ltf-emg .ltf-emg__foto img,
	.ltf-emg__cerrar,
	.ltf-emg__ir,
	.ltf-emg__copiar,
	.ltf-emg__no { transition: none; }
	.ltf-emg--ventana .ltf-emg__foto img { transform: none; }
}
