/*
 * MÈRE — base.
 * 1) Tokens de marca (un solo lugar para colores, tipografías y sombras).
 * 2) Estilos para el contenido que genera WordPress (entradas, comentarios,
 *    formularios, paginación). Todo con :where(): especificidad 0, así nunca
 *    le gana al CSS de un plugin (el checkout de Mercado Pago sigue intacto)
 *    ni a las clases de marca.
 */

/* ---------- 1. Tokens ---------- */

:root {
	--radius: 1.25rem;

	/* Paleta */
	--amarillo: #F5C242;
	--naranja: #E8942F;
	--terracota: #C4441F;
	--verde: #4FAFA4;
	--verde-claro: #5FBDB0;
	--azul-oscuro: #2C6E8F;
	--crema: #F6EFE2;
	--blanco: #FFFFFF;

	--background: var(--crema);
	--foreground: #2b2118;
	--card: #ffffff;
	--card-foreground: #2b2118;
	--muted: #efe6d5;
	--muted-foreground: #6b6055;
	--border: #e2d7c4;
	--input: #e2d7c4;
	--ring: var(--naranja);
	--primary: var(--terracota);
	--primary-foreground: #ffffff;

	/* Tipografías sustitutas (Google Fonts) */
	--fuente-protagonista: "Poppins", sans-serif; /* original: Lovelo */
	--fuente-serif: "Yeseva One", serif; /* original: TAN Tangkiwood */
	--fuente-cuerpo: "Raleway", sans-serif;
	--fuente-conector: "Montserrat", sans-serif; /* itálica */
	--fuente-firma: "Caveat Brush", cursive; /* original: Feeling Passionate */

	--sombra-suave: 0 18px 40px -22px rgba(44, 110, 143, 0.45);
	--sombra-tarjeta: 0 24px 60px -30px rgba(43, 33, 24, 0.4);

	/* Tema de Tailwind v4 que usa el reinicio y las utilidades compatibles */
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	--default-font-family: var(--font-sans);
	--default-mono-font-family: var(--font-mono);
	--default-transition-duration: 0.15s;
	--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
	--spacing: 0.25rem;
	--color-white: #fff;
	--color-foreground: var(--foreground);
	--color-border: var(--border);
	--color-crema: var(--crema);
	--text-xs: 0.75rem;
	--text-xs--line-height: calc(1 / 0.75);
	--text-sm: 0.875rem;
	--text-sm--line-height: calc(1.25 / 0.875);
	--text-base: 1rem;
	--text-base--line-height: calc(1.5 / 1);
	--text-lg: 1.125rem;
	--text-lg--line-height: calc(1.75 / 1.125);
	--text-xl: 1.25rem;
	--text-xl--line-height: calc(1.75 / 1.25);
	--text-2xl: 1.5rem;
	--text-2xl--line-height: calc(2 / 1.5);
	--text-3xl: 1.875rem;
	--text-3xl--line-height: calc(2.25 / 1.875);
	--text-4xl: 2.25rem;
	--text-4xl--line-height: calc(2.5 / 2.25);
	--text-5xl: 3rem;
	--text-5xl--line-height: 1;
	--text-7xl: 4.5rem;
	--text-7xl--line-height: 1;
	--leading-tight: 1.25;
	--leading-snug: 1.375;
	--leading-relaxed: 1.625;

	/* Alto de la cabecera pegajosa (anuncio 31 + barra 68 + trazo 10) */
	--mere-alto-cabecera: 109px;

	/* Presets del editor de bloques (los estilos globales de WP no se cargan) */
	--wp--preset--color--amarillo: var(--amarillo);
	--wp--preset--color--naranja: var(--naranja);
	--wp--preset--color--terracota: var(--terracota);
	--wp--preset--color--verde: var(--verde);
	--wp--preset--color--azul-oscuro: var(--azul-oscuro);
	--wp--preset--color--crema: var(--crema);
	--wp--preset--color--blanco: var(--blanco);
	--wp--preset--color--tinta: var(--foreground);
	--wp--preset--font-size--pequeno: 0.875rem;
	--wp--preset--font-size--normal: 1.0625rem;
	--wp--preset--font-size--grande: 1.375rem;
	--wp--preset--font-size--enorme: 2rem;
	--wp--preset--spacing--20: 0.44rem;
	--wp--preset--spacing--30: 0.67rem;
	--wp--preset--spacing--40: 1rem;
	--wp--preset--spacing--50: 1.5rem;
	--wp--preset--spacing--60: 2.25rem;
	--wp--preset--spacing--70: 3.38rem;
	--wp--preset--spacing--80: 5.06rem;
	--wp--style--block-gap: 1.25rem;
}

/* ---------- 2. Documento ---------- */

:where(html) {
	/* Las anclas (#resenas, #comentarios) no quedan debajo de la cabecera pegajosa. */
	scroll-padding-top: calc(var(--mere-alto-cabecera) + var(--wp-admin--admin-bar--height, 0px) + 12px);
}

::selection {
	background-color: var(--amarillo);
	color: var(--foreground);
}

:where(button:not(:disabled), [role="button"]:not([aria-disabled="true"]), summary, label[for], select:not(:disabled)) {
	cursor: pointer;
}

:where(button:disabled, input:disabled, select:disabled, textarea:disabled) {
	cursor: not-allowed;
	opacity: 0.55;
}

/* Accesibilidad: texto solo para lectores de pantalla. */
.screen-reader-text,
.sr-only {
	clip-path: inset(50%);
	white-space: nowrap;
	border-width: 0;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	position: absolute;
	overflow: hidden;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip-path: none;
	width: auto;
	height: auto;
	margin: 0;
	white-space: normal;
}

/* Enlace para saltar al contenido. */
.skip-link.screen-reader-text:focus {
	position: fixed;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 12px);
	left: 12px;
	z-index: 100000;
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
	background-color: var(--terracota);
	color: #fff;
	padding: 0.75rem 1.5rem;
	font-family: var(--fuente-cuerpo);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.025em;
	text-decoration: none;
	box-shadow: var(--sombra-tarjeta);
}

:where(.mere-main:focus) {
	outline: none;
}

/* ---------- 3. Formularios ---------- */
/* Mismo trazo que los campos del checkout de Lovable. Se excluye todo lo que
   vive dentro de Mercado Pago y la barra de administración. */

:where(
	input:is([type="text"], [type="email"], [type="tel"], [type="url"], [type="password"], [type="search"], [type="number"], [type="date"], [type="datetime-local"], [type="time"], [type="month"], [type="week"]),
	select,
	textarea
):where(:not(.mp-checkout-container *, #wpadminbar *)) {
	width: 100%;
	border-radius: 16px;
	border: 1px solid var(--border);
	background-color: #fff;
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	line-height: calc(1.25 / 0.875);
	color: var(--foreground);
	outline-style: none;
	transition: border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

:where(input[type="search"]):where(:not(.mp-checkout-container *, #wpadminbar *)) {
	border-radius: 999px;
	padding-inline: 1.25rem;
}

:where(
	input:is([type="text"], [type="email"], [type="tel"], [type="url"], [type="password"], [type="search"], [type="number"], [type="date"], [type="datetime-local"], [type="time"], [type="month"], [type="week"]),
	select,
	textarea
):where(:focus):where(:not(.mp-checkout-container *, #wpadminbar *)) {
	border-color: var(--naranja);
}

:where(
	input:is([type="text"], [type="email"], [type="tel"], [type="url"], [type="password"], [type="search"], [type="number"]),
	select,
	textarea
):where([aria-invalid="true"]):where(:not(.mp-checkout-container *, #wpadminbar *)) {
	border-color: var(--terracota);
}

:where(textarea):where(:not(.mp-checkout-container *, #wpadminbar *)) {
	min-height: 8rem;
}

::placeholder {
	color: #6b605599;
}

:where(input[type="checkbox"], input[type="radio"]):where(:not(.mp-checkout-container *, #wpadminbar *)) {
	width: 1.05rem;
	height: 1.05rem;
	accent-color: var(--terracota);
	vertical-align: -0.15em;
	margin-inline-end: 0.4em;
}

/* Botones de formularios genéricos de WordPress y WooCommerce: cápsula terracota. */
:where(
	input:is([type="submit"], [type="button"], [type="reset"]),
	.wp-element-button,
	.wp-block-button__link,
	.wp-block-search__button,
	.button
):where(:not(.mp-checkout-container *, #wpadminbar *)) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border-radius: 999px;
	background-color: var(--terracota);
	color: #fff;
	padding: 0.875rem 1.75rem;
	font-family: var(--fuente-cuerpo);
	font-size: 0.875rem;
	line-height: calc(1.25 / 0.875);
	font-weight: 600;
	letter-spacing: 0.025em;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
	:where(
		input:is([type="submit"], [type="button"], [type="reset"]),
		.wp-element-button,
		.wp-block-button__link,
		.wp-block-search__button,
		.button
	):where(:hover):where(:not(.mp-checkout-container *, #wpadminbar *)) {
		filter: brightness(110%);
	}
}

:where(fieldset):where(:not(.mp-checkout-container *)) {
	min-width: 0;
}

:where(legend):where(:not(.mp-checkout-container *)) {
	padding-inline: 0.5rem;
	font-family: var(--fuente-serif);
	font-size: 1.25rem;
	line-height: calc(1.75 / 1.25);
	color: var(--terracota);
}

/* Etiquetas de formularios de WordPress: pequeñas, espaciadas, en mayúscula. */
:where(
	.comment-form label,
	.post-password-form label,
	.mere-form label,
	.wp-block-search__label
):where(:not([for="wp-comment-cookies-consent"])) {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 10px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--muted-foreground);
}

/* ---------- 4. Prosa: contenido de entradas y páginas ---------- */

:where(.prosa) {
	max-width: 44rem;
	font-family: var(--fuente-cuerpo);
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--foreground);
	overflow-wrap: break-word;
}

:where(.prosa) > :where(* + *) {
	margin-top: 1.25em;
}

:where(.prosa) :where(h1, h2, h3, h4, h5, h6) {
	color: var(--terracota);
	scroll-margin-top: calc(var(--mere-alto-cabecera) + 16px);
}

:where(.prosa) > :where(h1, h2, h3, h4, h5, h6) {
	margin-top: 2em;
}

:where(.prosa) > :where(h1, h2, h3, h4, h5, h6) + * {
	margin-top: 0.75em;
}

:where(.prosa) :where(h1, h2) {
	font-family: var(--fuente-protagonista);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: -0.01em;
	line-height: 0.95;
}

:where(.prosa) :where(h1) {
	font-size: clamp(28px, 5.5vw, 46px);
}

:where(.prosa) :where(h2) {
	font-size: clamp(24px, 4vw, 34px);
}

:where(.prosa) :where(h3) {
	font-family: var(--fuente-serif);
	font-weight: 400;
	font-size: 1.5rem;
	line-height: 1.25;
}

:where(.prosa) :where(h4) {
	font-family: var(--fuente-protagonista);
	font-weight: 700;
	font-size: 1.125rem;
	line-height: 1.375;
	color: var(--foreground);
}

:where(.prosa) :where(h5, h6) {
	font-family: var(--fuente-cuerpo);
	font-weight: 700;
	font-size: 0.75rem;
	line-height: 1.5;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--muted-foreground);
}

:where(.prosa) :where(a:not(.mere-boton, .wp-block-button__link, .wp-element-button, .button, .mere-capsula)) {
	color: var(--terracota);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

:where(.prosa) :where(a:not(.mere-boton, .wp-block-button__link, .wp-element-button, .button, .mere-capsula):hover) {
	color: var(--naranja);
}

:where(.prosa) :where(strong, b) {
	font-weight: 700;
}

:where(.prosa) :where(em, i, cite) {
	font-style: italic;
}

:where(.prosa) :where(mark) {
	background-color: var(--amarillo);
	color: var(--foreground);
	border-radius: 4px;
	padding-inline: 0.2em;
}

:where(.prosa) :where(small) {
	font-size: 0.875em;
}

/* Listas: viñetas redondas naranja y números en serif. */
:where(.prosa) :where(ul, ol) {
	padding-left: 1.5em;
}

:where(.prosa) :where(ul) {
	list-style: none;
}

:where(.prosa) :where(ul > li) {
	position: relative;
}

:where(.prosa) :where(ul > li)::before {
	content: "";
	position: absolute;
	left: -1.1em;
	top: 0.72em;
	width: 0.45em;
	height: 0.45em;
	border-radius: 999px;
	background-color: var(--naranja);
}

:where(.prosa) :where(ol) {
	list-style: decimal;
}

:where(.prosa) :where(ol > li)::marker {
	font-family: var(--fuente-serif);
	color: var(--naranja);
}

:where(.prosa) :where(li + li, li > ul, li > ol) {
	margin-top: 0.5em;
}

:where(.prosa) :where(dl) :where(dt) {
	font-weight: 700;
	color: var(--terracota);
}

:where(.prosa) :where(dd) {
	margin-left: 1.25em;
}

/* Citas: como el bloque editorial de testimonios. */
:where(.prosa) :where(blockquote, .wp-block-quote) {
	position: relative;
	padding: 0.25em 0 0.25em 1.25em;
	border-left: 4px solid var(--amarillo);
	font-family: var(--fuente-serif);
	font-size: 1.25rem;
	line-height: 1.45;
	color: var(--foreground);
}

:where(.prosa) :where(blockquote, .wp-block-quote) :where(p + p) {
	margin-top: 0.75em;
}

:where(.prosa) :where(blockquote cite, .wp-block-quote cite, blockquote footer) {
	display: block;
	margin-top: 0.75em;
	font-family: var(--fuente-firma);
	font-size: 1.5rem;
	font-style: normal;
	line-height: 1.2;
	color: var(--terracota);
}

:where(.prosa) :where(.wp-block-pullquote) {
	padding: 2rem 1.5rem;
	border-radius: 24px;
	background-color: #fff;
	box-shadow: var(--sombra-tarjeta);
	text-align: center;
}

:where(.prosa) :where(.wp-block-pullquote blockquote) {
	border: 0;
	padding: 0;
	font-size: clamp(22px, 3.4vw, 32px);
}

/* Código. */
:where(.prosa) :where(code, kbd, samp) {
	border-radius: 6px;
	background-color: var(--muted);
	padding: 0.1em 0.35em;
	font-size: 0.875em;
}

:where(.prosa) :where(pre) {
	overflow-x: auto;
	border-radius: 16px;
	background-color: var(--foreground);
	color: var(--crema);
	padding: 1.25rem 1.5rem;
	font-size: 0.875rem;
	line-height: 1.7;
}

:where(.prosa) :where(pre code) {
	background: none;
	padding: 0;
	color: inherit;
}

/* Separador: trazo de pincel naranja. */
:where(.prosa) :where(hr, .wp-block-separator) {
	height: 10px;
	max-width: 14rem;
	margin: 2.5em auto;
	border: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 22' preserveAspectRatio='none'%3E%3Cpath fill='%23E8942F' d='M3 15c58-9 96 3 150-2s112-11 168-3c22 3 55 2 76 6-38 4-90-1-131 2-63 5-114 8-166 5S37 18 3 15z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* Tablas: tarjeta blanca con encabezados espaciados. */
:where(.prosa) :where(table) {
	width: 100%;
	overflow: hidden;
	border-radius: 20px;
	background-color: #fff;
	font-size: 0.9375rem;
	line-height: 1.5;
	box-shadow: 0 20px 50px -34px rgba(43, 33, 24, 0.6);
}

:where(.prosa) :where(.wp-block-table) {
	overflow-x: auto;
}

:where(.prosa) :where(th, td) {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
}

:where(.prosa) :where(th) {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--muted-foreground);
}

:where(.prosa) :where(tr:last-child > td) {
	border-bottom: 0;
}

:where(.prosa) :where(caption, figcaption, .wp-element-caption, .wp-caption-text, .gallery-caption) {
	margin-top: 0.75em;
	font-family: var(--fuente-conector);
	font-style: italic;
	font-weight: 500;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--muted-foreground);
	text-align: center;
}

/* Imágenes y figuras. */
:where(.prosa) :where(img) {
	border-radius: 20px;
}

:where(.prosa) :where(figure, .wp-caption) {
	max-width: 100%;
}

:where(.prosa) :where(.wp-block-image img, .wp-caption img) {
	margin-inline: auto;
}

/* Alineaciones de WordPress. */
:where(.prosa) :where(.alignleft) {
	float: left;
	margin: 0.35em 1.5em 1em 0;
	max-width: 50%;
}

:where(.prosa) :where(.alignright) {
	float: right;
	margin: 0.35em 0 1em 1.5em;
	max-width: 50%;
}

:where(.prosa) :where(.aligncenter) {
	margin-inline: auto;
	text-align: center;
}

:where(.prosa) :where(img.aligncenter) {
	display: block;
}

:where(.prosa) :where(.alignwide) {
	width: min(100vw - 2 * clamp(24px, 6vw, 72px), 60rem);
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}

:where(.prosa) :where(.alignfull) {
	width: 100vw;
	max-width: none;
	margin-left: 50%;
	transform: translateX(-50%);
}

:where(.prosa) :where(.alignfull img) {
	border-radius: 0;
}

:where(.prosa)::after {
	content: "";
	display: table;
	clear: both;
}

@media (max-width: 639px) {
	:where(.prosa) :where(.alignleft, .alignright) {
		float: none;
		max-width: 100%;
		margin: 1.25em 0;
	}
}

/* Galerías (bloque y shortcode clásico). */
:where(.prosa) :where(.wp-block-gallery, .gallery) {
	display: grid;
	grid-template-columns: repeat(var(--mere-columnas, 3), minmax(0, 1fr));
	gap: 0.75rem;
	padding: 0;
}

:where(.prosa) :where(.wp-block-gallery.columns-1, .gallery-columns-1) { --mere-columnas: 1; }
:where(.prosa) :where(.wp-block-gallery.columns-2, .gallery-columns-2) { --mere-columnas: 2; }
:where(.prosa) :where(.wp-block-gallery.columns-3, .gallery-columns-3) { --mere-columnas: 3; }
:where(.prosa) :where(.wp-block-gallery.columns-4, .gallery-columns-4) { --mere-columnas: 4; }
:where(.prosa) :where(.wp-block-gallery.columns-5, .gallery-columns-5) { --mere-columnas: 5; }
:where(.prosa) :where(.wp-block-gallery.columns-6, .gallery-columns-6) { --mere-columnas: 6; }

@media (max-width: 639px) {
	:where(.prosa) :where(.wp-block-gallery, .gallery) {
		--mere-columnas: 2 !important;
	}
}

:where(.prosa) :where(.wp-block-gallery > figure, .gallery-item) {
	margin: 0;
}

:where(.prosa) :where(.wp-block-gallery > figure, .gallery-item)::before {
	content: none;
}

:where(.prosa) :where(.wp-block-gallery img, .gallery-item img) {
	width: 100%;
	height: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 16px;
}

/* Incrustados responsivos (YouTube, Vimeo…). */
:where(.prosa) :where(iframe, embed, object, video) {
	max-width: 100%;
}

:where(.prosa) :where(video) {
	border-radius: 20px;
}

:where(.prosa) :where(.wp-block-embed__wrapper) {
	position: relative;
}

:where(.prosa) :where(.wp-has-aspect-ratio .wp-block-embed__wrapper)::before {
	content: "";
	display: block;
	padding-top: 56.25%;
}

:where(.prosa) :where(.wp-embed-aspect-4-3 .wp-block-embed__wrapper)::before { padding-top: 75%; }
:where(.prosa) :where(.wp-embed-aspect-1-1 .wp-block-embed__wrapper)::before { padding-top: 100%; }
:where(.prosa) :where(.wp-embed-aspect-9-16 .wp-block-embed__wrapper)::before { padding-top: 177.78%; }
:where(.prosa) :where(.wp-embed-aspect-21-9 .wp-block-embed__wrapper)::before { padding-top: 42.85%; }

:where(.prosa) :where(.wp-has-aspect-ratio .wp-block-embed__wrapper iframe) {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border-radius: 20px;
}

/* Botones, columnas y grupos del editor de bloques. */
:where(.prosa) :where(.wp-block-buttons, .is-layout-flex) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	padding-left: 0;
}

:where(.prosa) :where(.is-content-justification-center) {
	justify-content: center;
}

:where(.prosa) :where(.is-content-justification-right) {
	justify-content: flex-end;
}

:where(.prosa) :where(.is-content-justification-space-between) {
	justify-content: space-between;
}

:where(.prosa) :where(.is-vertical) {
	flex-direction: column;
	align-items: flex-start;
}

:where(.prosa) :where(.wp-block-button.is-style-outline .wp-block-button__link) {
	background-color: transparent;
	color: var(--terracota);
	box-shadow: inset 0 0 0 2px currentColor;
}

:where(.prosa) :where(.wp-block-columns) {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem 2rem;
}

:where(.prosa) :where(.wp-block-column) {
	flex: 1 1 0;
	min-width: min(100%, 14rem);
}

:where(.prosa) :where(.wp-block-column > * + *, .wp-block-group > * + *, .is-layout-constrained > * + *, .is-layout-flow > * + *) {
	margin-top: 1em;
}

:where(.prosa) :where(.is-layout-grid) {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr));
	gap: 1.25rem;
}

:where(.prosa) :where(.wp-block-group.has-background, .wp-block-columns.has-background) {
	border-radius: 24px;
	padding: 1.5rem;
}

:where(.prosa) :where(.wp-block-cover, .wp-block-cover-image) {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 22rem;
	overflow: hidden;
	border-radius: 24px;
	padding: 2rem;
	color: #fff;
}

:where(.prosa) :where(.wp-block-cover__image-background, .wp-block-cover__video-background) {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

:where(.prosa) :where(.wp-block-cover__background) {
	position: absolute;
	inset: 0;
	background-color: #2b2118;
	opacity: 0.45;
}

:where(.prosa) :where(.wp-block-cover__inner-container) {
	position: relative;
	z-index: 1;
	width: 100%;
}

:where(.prosa) :where(.wp-block-media-text) {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 1.5rem;
}

@media (max-width: 639px) {
	:where(.prosa) :where(.wp-block-media-text) {
		grid-template-columns: 1fr;
	}
}

:where(.prosa) :where(details) {
	border-radius: 20px;
	background-color: #fff;
	padding: 1rem 1.25rem;
}

:where(.prosa) :where(summary) {
	font-weight: 700;
	color: var(--terracota);
}

:where(.prosa) :where(.wp-block-file) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

/* Colores y tamaños del editor (paleta de la marca). */
:where(.has-text-align-center) { text-align: center; }
:where(.has-text-align-right) { text-align: right; }
:where(.has-text-align-left) { text-align: left; }
:where(.has-amarillo-color) { color: var(--amarillo); }
:where(.has-naranja-color) { color: var(--naranja); }
:where(.has-terracota-color) { color: var(--terracota); }
:where(.has-verde-color) { color: var(--verde); }
:where(.has-azul-oscuro-color) { color: var(--azul-oscuro); }
:where(.has-crema-color) { color: var(--crema); }
:where(.has-blanco-color) { color: #fff; }
:where(.has-tinta-color) { color: var(--foreground); }
:where(.has-amarillo-background-color) { background-color: var(--amarillo); }
:where(.has-naranja-background-color) { background-color: var(--naranja); }
:where(.has-terracota-background-color) { background-color: var(--terracota); }
:where(.has-verde-background-color) { background-color: var(--verde); }
:where(.has-azul-oscuro-background-color) { background-color: var(--azul-oscuro); }
:where(.has-crema-background-color) { background-color: var(--crema); }
:where(.has-blanco-background-color) { background-color: #fff; }
:where(.has-tinta-background-color) { background-color: var(--foreground); }
:where(.has-pequeno-font-size) { font-size: var(--wp--preset--font-size--pequeno); }
:where(.has-normal-font-size) { font-size: var(--wp--preset--font-size--normal); }
:where(.has-grande-font-size) { font-size: var(--wp--preset--font-size--grande); }
:where(.has-enorme-font-size) { font-size: var(--wp--preset--font-size--enorme); line-height: 1.2; }

/* Página protegida con contraseña. */
:where(.post-password-form) {
	display: grid;
	gap: 1rem;
	max-width: 28rem;
}

:where(.post-password-form p:has(input[type="password"])) {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem;
}

:where(.post-password-form label) {
	flex: 1 1 14rem;
}

:where(.post-password-form input[type="password"]) {
	margin-top: 0.5rem;
}

/* Páginas partidas con <!--nextpage-->. */
:where(.mere-paginas-entrada) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: 2.5rem;
	font-size: 0.875rem;
}

:where(.mere-paginas-entrada .espaciado) {
	margin-right: 0.5rem;
	font-size: 10px;
	color: var(--muted-foreground);
}

:where(.mere-paginas-entrada a, .mere-paginas-entrada > span:not(.espaciado)) {
	display: inline-grid;
	place-items: center;
	min-width: 2.25rem;
	height: 2.25rem;
	border-radius: 999px;
	padding-inline: 0.75rem;
	text-decoration: none;
}

:where(.mere-paginas-entrada a) {
	border: 1px solid var(--border);
	background-color: #fff;
	color: var(--foreground);
}

:where(.mere-paginas-entrada > span:not(.espaciado)) {
	background-color: var(--naranja);
	color: #fff;
}

/* ---------- 5. Paginación de listados ---------- */

:where(.navigation.pagination) {
	margin-top: 3.5rem;
}

:where(.navigation.pagination .nav-links) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

:where(.navigation.pagination .page-numbers) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	border: 1px solid var(--border);
	background-color: #fff;
	padding-inline: 0.9em;
	font-size: 0.875rem;
	color: var(--foreground);
	transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

:where(.navigation.pagination .page-numbers.current) {
	border-color: var(--naranja);
	background-color: var(--naranja);
	color: #fff;
}

:where(.navigation.pagination .page-numbers.dots) {
	border-color: transparent;
	background: none;
}

@media (hover: hover) {
	:where(.navigation.pagination a.page-numbers:hover) {
		color: var(--terracota);
	}
}

/* Navegación entre entradas y entre páginas de comentarios. */
:where(.post-navigation .nav-links, .comment-navigation .nav-links) {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
	gap: 1rem;
}

:where(.post-navigation .nav-next, .comment-navigation .nav-next) {
	text-align: right;
}

:where(.post-navigation a) {
	display: block;
	height: 100%;
	border-radius: 24px;
	background-color: #fff;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 20px 50px -34px rgba(43, 33, 24, 0.6);
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
	:where(.post-navigation a:hover) {
		transform: translateY(-4px);
	}
}

:where(.comment-navigation a) {
	font-family: var(--fuente-conector);
	font-style: italic;
	font-weight: 500;
	color: var(--azul-oscuro);
}

/* ---------- 6. Comentarios ---------- */

:where(.comment-list) {
	display: grid;
	gap: 1.25rem;
}

:where(.comment-list .children) {
	display: grid;
	gap: 1rem;
	margin-top: 1rem;
	padding-left: clamp(1rem, 4vw, 2.5rem);
	border-left: 3px solid var(--amarillo);
}

:where(.comment-body, .mere-comentario__tarjeta) {
	border-radius: 24px;
	background-color: #fff;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 20px 50px -34px rgba(43, 33, 24, 0.6);
}

:where(.comment-meta, .mere-comentario__cabeza) {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

:where(.comment-author .avatar, .mere-comentario__avatar) {
	width: 48px;
	height: 48px;
	flex-shrink: 0;
	border-radius: 999px;
	border: 3px solid var(--amarillo);
	object-fit: cover;
}

:where(.comment-author .fn, .mere-comentario__autora) {
	font-family: var(--fuente-protagonista);
	font-weight: 700;
	font-style: normal;
	font-size: 1rem;
	line-height: 1.25;
	color: var(--foreground);
}

:where(.comment-author .says) {
	display: none;
}

:where(.comment-metadata, .mere-comentario__fecha) {
	margin-top: 0.15rem;
	font-size: 10px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--muted-foreground);
}

:where(.comment-content, .mere-comentario__texto) {
	margin-top: 0.75rem;
	font-size: 0.9375rem;
	line-height: 1.65;
}

:where(.comment-content, .mere-comentario__texto) :where(p + p) {
	margin-top: 0.75em;
}

:where(.comment-content a, .mere-comentario__texto a) {
	color: var(--terracota);
	text-decoration: underline;
	text-underline-offset: 3px;
}

:where(.comment-awaiting-moderation, .mere-comentario__moderacion) {
	margin-top: 0.75rem;
	font-family: var(--fuente-conector);
	font-style: italic;
	font-size: 0.875rem;
	color: var(--azul-oscuro);
}

:where(.reply, .mere-comentario__acciones) {
	display: flex;
	gap: 1rem;
	margin-top: 0.75rem;
	font-family: var(--fuente-conector);
	font-style: italic;
	font-weight: 500;
	font-size: 0.8125rem;
}

:where(.comment-reply-link, .comment-edit-link) {
	color: var(--azul-oscuro);
	text-decoration: underline;
	text-underline-offset: 4px;
}

:where(.pingback .comment-body, .trackback .comment-body) {
	font-size: 0.875rem;
}

/* Formulario de comentarios: tarjeta blanca como los fieldsets del checkout. */
:where(.comment-respond) {
	border-radius: 24px;
	background-color: #fff;
	padding: clamp(1.25rem, 3vw, 2rem);
	box-shadow: 0 20px 50px -34px rgba(43, 33, 24, 0.6);
}

:where(.comment-list .comment-respond) {
	margin-top: 1rem;
}

:where(.comment-reply-title) {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1rem;
}

:where(.comment-reply-title small) {
	font-family: var(--fuente-conector);
	font-style: italic;
	font-weight: 500;
	font-size: 0.875rem;
	letter-spacing: 0;
	text-transform: none;
}

:where(.comment-reply-title small a) {
	color: var(--azul-oscuro);
	text-decoration: underline;
	text-underline-offset: 4px;
}

:where(.comment-form) {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
	margin-top: 1.25rem;
}

:where(.comment-form > *) {
	grid-column: 1 / -1;
}

@media (min-width: 640px) {
	:where(.comment-form-author, .comment-form-email) {
		grid-column: span 1;
	}
}

:where(.comment-notes, .logged-in-as, .comment-form-cookies-consent) {
	font-size: 0.875rem;
	color: var(--muted-foreground);
}

:where(.logged-in-as a) {
	color: var(--terracota);
	text-decoration: underline;
	text-underline-offset: 3px;
}

:where(.comment-form-cookies-consent) {
	display: flex;
	align-items: flex-start;
	gap: 0.25rem;
}

:where(.comment-form .required) {
	color: var(--terracota);
}

:where(.form-submit) {
	display: flex;
	justify-content: flex-start;
}

/* ---------- 7. Buscador genérico de WordPress ---------- */

:where(.search-form) {
	position: relative;
	display: flex;
	align-items: center;
	max-width: 28rem;
}

:where(.wp-block-search__inside-wrapper) {
	display: flex;
	gap: 0.5rem;
}
