/* Base: reinicio, tipografía, superficies del navegador y las piezas que comparten todas las plantillas. */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--vvt-alto-cabecera) + 16px);
	scrollbar-color: var(--vvt-musgo) var(--vvt-lino);
	interpolate-size: allow-keywords;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 1ms !important;
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
	}
}

body {
	margin: 0;
	background: var(--vvt-hueso);
	color: var(--vvt-bosque);
	font-family: var(--vvt-sans);
	font-size: var(--vvt-t-cuerpo);
	font-weight: 400;
	line-height: 1.6;
	font-synthesis: none;
	/* Lora trae cifras alineadas de serie; se fija por si otra fuente entra de respaldo */
	font-variant-numeric: lining-nums;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	caret-color: var(--vvt-acento);
	overflow-x: clip;
}

::selection {
	background: var(--vvt-bosque);
	color: var(--vvt-hueso);
}

img,
svg,
video,
picture,
iframe {
	display: block;
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 0.5em;
	font-family: var(--vvt-serifa);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.01em;
	font-variant-numeric: lining-nums;
	text-wrap: balance;
	color: inherit;
}

h1 {
	font-size: var(--vvt-t-pagina);
	line-height: 1.05;
}

h2 {
	font-size: var(--vvt-t-titular);
}

h3 {
	font-size: var(--vvt-t-titulo);
	font-weight: 600;
	line-height: 1.2;
}

h4 {
	font-family: var(--vvt-sans);
	font-size: 1.1875rem;
	font-weight: 600;
	letter-spacing: 0;
}

h1 em,
h2 em {
	font-style: italic;
	font-weight: 500;
	color: var(--vvt-oro-hover);
}

p,
ul,
ol,
dl,
blockquote,
figure,
address {
	margin: 0 0 1em;
}

address {
	font-style: normal;
}

p {
	text-wrap: pretty;
}

strong,
b {
	font-weight: 600;
}

a {
	color: var(--vvt-acento);
	text-decoration-line: underline;
	text-decoration-color: rgba(126, 98, 39, 0.35);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	transition: color var(--vvt-d-estado) ease, text-decoration-color var(--vvt-d-estado) ease;
}

@media (hover: hover) and (pointer: fine) {
	a:hover {
		color: var(--vvt-bosque);
		text-decoration-color: currentColor;
	}
}

:focus-visible {
	outline: 2px solid var(--vvt-foco);
	outline-offset: 3px;
	border-radius: 2px;
}

input,
select,
textarea,
button {
	font: inherit;
	color: inherit;
}

input[type="search"],
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid var(--vvt-borde-campo);
	border-radius: var(--vvt-r-campo);
	background: var(--vvt-blanco);
	font-size: 1rem;
}

input::placeholder,
textarea::placeholder {
	color: var(--vvt-musgo);
	opacity: 1;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	border-color: var(--vvt-acento);
	outline-offset: 1px;
}

/* Lo que no se ve pero se lee (la clase del tema y la de WordPress y WooCommerce) */
.screen-reader-text:not(:focus),
.vvt-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.vvt-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

.vvt-icono {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

.vvt-main:focus {
	outline: none;
}

/* Contenedores y secciones */
.vvt-contenedor {
	width: 100%;
	max-width: calc(var(--vvt-ancho) + 2 * var(--vvt-medianil));
	margin-inline: auto;
	padding-inline: var(--vvt-medianil);
}

/* Contenedor de texto: en el eje de la página (a la izquierda), con la medida de lectura en su contenido */
.vvt-contenedor--texto > * {
	max-width: var(--vvt-ancho-texto);
}

.vvt-seccion {
	padding-block: var(--vvt-seccion);
}

.vvt-seccion--sin-arriba {
	padding-top: 0;
}

.vvt-seccion--lino {
	background: var(--vvt-lino);
}

/* Bloques estrechos (preguntas): en el eje de la página, a la izquierda, con medida de lectura */
.vvt-seccion--estrecha > .vvt-contenedor > *,
.vvt-contenedor.vvt-seccion--estrecha > * {
	max-width: 52rem;
}

.vvt-oscuro {
	--vvt-foco: var(--vvt-hueso);
	position: relative;
	background: var(--vvt-noche);
	color: var(--vvt-hueso);
	isolation: isolate;
	overflow: hidden;
}

.vvt-oscuro a:not(.vvt-boton) {
	color: var(--vvt-hueso);
	text-decoration-color: rgba(250, 247, 238, 0.45);
}

.vvt-oscuro h1 em,
.vvt-oscuro h2 em {
	color: var(--vvt-oro);
}

.vvt-oscuro p {
	color: var(--vvt-hueso-atenuado);
}

/* Encabezado de sección: el titular manda; el texto, debajo y en tinta atenuada sólida */
.vvt-encabezado {
	max-width: 46rem;
	margin-bottom: clamp(28px, 4vw, 48px);
}

.vvt-encabezado > p {
	color: var(--vvt-musgo);
	font-size: var(--vvt-t-entradilla);
	margin-bottom: 0;
}

.vvt-oscuro .vvt-encabezado > p {
	color: var(--vvt-hueso-atenuado);
}

.vvt-encabezado h2 {
	margin-bottom: 0.35em;
}

.vvt-encabezado h2::after {
	content: "";
	display: block;
	width: 56px;
	height: 1px;
	margin-top: 0.45em;
	background: var(--vvt-oro);
}

.vvt-encabezado--centro {
	margin-inline: auto;
	text-align: center;
}

.vvt-encabezado--centro h2::after {
	margin-inline: auto;
}

.vvt-encabezado--fila {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 40px;
	max-width: none;
}

.vvt-encabezado--fila > div {
	max-width: 44rem;
}

.vvt-encabezado--fila > div > p {
	color: var(--vvt-musgo);
	font-size: var(--vvt-t-entradilla);
	margin: 0;
}

.vvt-entradilla {
	max-width: 44rem;
	font-size: var(--vvt-t-entradilla);
	line-height: 1.55;
	color: var(--vvt-musgo);
}

/* Botones: píldora de 48 px, se hunden al pulsar */
.vvt-boton,
.wp-element-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 12px 28px;
	border: 1px solid var(--vvt-oro);
	border-radius: 999px;
	background: var(--vvt-oro);
	color: var(--vvt-bosque);
	font-family: var(--vvt-sans);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--vvt-d-estado) ease, border-color var(--vvt-d-estado) ease, color var(--vvt-d-estado) ease, transform var(--vvt-d-pulsar) var(--vvt-ease-salida);
}

.vvt-boton .vvt-icono {
	width: 1.15em;
	height: 1.15em;
}

.vvt-boton:active,
.wp-element-button:active {
	transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
	.vvt-boton:hover,
	.wp-element-button:hover,
	.wp-block-button__link:hover {
		background: var(--vvt-oro-hover);
		border-color: var(--vvt-oro-hover);
		color: var(--vvt-bosque);
	}
}

.vvt-boton--contorno {
	background: transparent;
	border-color: var(--vvt-bosque);
	color: var(--vvt-bosque);
}

@media (hover: hover) and (pointer: fine) {
	.vvt-boton--contorno:hover {
		background: var(--vvt-lino);
		border-color: var(--vvt-bosque);
		color: var(--vvt-bosque);
	}
}

.vvt-boton--contorno-claro {
	background: transparent;
	border-color: rgba(250, 247, 238, 0.7);
	color: var(--vvt-hueso);
}

@media (hover: hover) and (pointer: fine) {
	.vvt-boton--contorno-claro:hover {
		background: rgba(250, 247, 238, 0.12);
		border-color: var(--vvt-hueso);
		color: var(--vvt-hueso);
	}
}

.vvt-enlace-flecha {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	font-weight: 600;
	text-decoration: none;
}

.vvt-enlace-flecha .vvt-icono {
	width: 1.1em;
	height: 1.1em;
	transition: transform var(--vvt-d-estado) var(--vvt-ease-salida);
}

@media (hover: hover) and (pointer: fine) {
	.vvt-enlace-flecha:hover .vvt-icono {
		transform: translateX(4px);
	}
}

/* Migas: siempre en una línea; lo que no cabe se acorta con puntos suspensivos en la última miga visible
   (partidas, la barra quedaba al principio de una línea y la categoría de la ficha ocupaba tres en el móvil) */
.vvt-migas ol {
	display: flex;
	flex-wrap: nowrap;
	gap: 4px 0;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
	font-family: var(--vvt-mono);
	font-size: var(--vvt-t-dato);
	color: var(--vvt-musgo);
}

.vvt-migas li {
	flex: none;
	min-width: 0;
	white-space: nowrap;
}

.vvt-migas li:last-child {
	flex: 0 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* El anillo de foco por dentro: la miga acortada recorta lo que sale de su caja */
.vvt-migas a:focus-visible {
	outline-offset: -2px;
}

.vvt-migas li + li::before {
	content: "/";
	margin-inline: 10px;
	color: var(--vvt-musgo);
}

.vvt-migas a {
	color: var(--vvt-musgo);
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.vvt-migas a:hover {
		color: var(--vvt-acento);
		text-decoration: underline;
	}
}

.vvt-migas [aria-current] {
	color: var(--vvt-bosque);
}

/* En el móvil, sin la última miga cuando hay más de dos: es el titular que va justo debajo */
@media (max-width: 639px) {
	.vvt-migas li:nth-child(n + 3):last-child {
		display: none;
	}

	.vvt-migas li:nth-child(n + 3):nth-last-child(2) {
		flex: 0 1 auto;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

/* Ficha técnica: los datos como en la etiqueta del envase */
.vvt-etiqueta {
	margin: 0;
	border-top: 1px solid var(--vvt-bosque);
}

.vvt-etiqueta > div {
	display: grid;
	grid-template-columns: minmax(8rem, 40%) 1fr;
	align-items: baseline;
	gap: 16px;
	padding: 12px 0;
	border-bottom: var(--vvt-filete);
}

.vvt-etiqueta dt {
	font-family: var(--vvt-mono);
	font-size: var(--vvt-t-dato);
	letter-spacing: 0.04em;
	color: var(--vvt-musgo);
}

.vvt-etiqueta dd {
	margin: 0;
	font-weight: 500;
}

/* Preguntas desplegables */
.vvt-preguntas {
	border-top: 1px solid var(--vvt-bosque);
}

.vvt-pregunta {
	border-bottom: var(--vvt-filete);
}

.vvt-pregunta summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 56px;
	padding: 16px 0;
	font-family: var(--vvt-sans);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	list-style: none;
}

.vvt-pregunta summary::-webkit-details-marker {
	display: none;
}

.vvt-pregunta__signo {
	width: 22px;
	height: 22px;
	color: var(--vvt-acento);
	transition: transform var(--vvt-d-estado) var(--vvt-ease-salida);
}

.vvt-pregunta[open] .vvt-pregunta__signo {
	transform: rotate(45deg);
}

@media (hover: hover) and (pointer: fine) {
	.vvt-pregunta summary:hover .vvt-pregunta__texto {
		color: var(--vvt-acento);
	}
}

.vvt-pregunta::details-content {
	block-size: 0;
	overflow: clip;
	transition: block-size var(--vvt-d-panel) var(--vvt-ease-salida), content-visibility var(--vvt-d-panel) allow-discrete;
}

.vvt-pregunta[open]::details-content {
	block-size: auto;
}

.vvt-pregunta__respuesta {
	max-width: 44rem;
	padding: 0 40px 20px 0;
	color: var(--vvt-musgo);
}

.vvt-pregunta__respuesta p:last-child {
	margin-bottom: 0;
}

/* Estrellas dibujadas */
.vvt-estrellas {
	position: relative;
	display: inline-flex;
	color: var(--vvt-acento);
	line-height: 0;
}

.vvt-estrellas__fondo {
	display: inline-flex;
	color: rgba(28, 27, 22, 0.2);
}

.vvt-estrellas__nota {
	position: absolute;
	inset: 0 auto 0 0;
	display: inline-flex;
	overflow: hidden;
	white-space: nowrap;
}

.vvt-estrellas .vvt-icono {
	width: 18px;
	height: 18px;
}

/* Datos de compra */
.vvt-hechos {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 28px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
	font-size: var(--vvt-t-pequeno);
	color: var(--vvt-musgo);
}

.vvt-hechos li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.vvt-hechos .vvt-icono {
	color: var(--vvt-acento);
}

/* Sello sobre la foto de un producto */
.vvt-sello {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--vvt-bosque);
	color: var(--vvt-hueso);
	font-family: var(--vvt-mono);
	font-size: var(--vvt-t-dato);
}

.vvt-sello--agotado {
	background: var(--vvt-lino);
	color: var(--vvt-bosque);
}

/* La rama grabada en la banda oscura y la banda de ayuda */
.vvt-camino__rama {
	position: absolute;
	right: -40px;
	bottom: -30px;
	width: min(440px, 70vw);
	color: var(--vvt-hueso);
	opacity: 0.07;
	z-index: -1;
	pointer-events: none;
}

.vvt-camino__rama .vvt-icono {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
}

.vvt-ayuda__dentro {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px 48px;
}

.vvt-ayuda h2 {
	font-size: var(--vvt-t-titulo);
	margin-bottom: 0.3em;
}

.vvt-ayuda p {
	margin: 0;
	color: var(--vvt-musgo);
}

.vvt-ayuda__acciones {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* Paginación */
.pagination .nav-links,
.woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 40px 0 0;
	padding: 0;
	list-style: none;
}

.pagination .page-numbers,
.woocommerce-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border: var(--vvt-filete);
	border-radius: 999px;
	text-decoration: none;
}

.pagination .page-numbers.current {
	background: var(--vvt-bosque);
	border-color: var(--vvt-bosque);
	color: var(--vvt-hueso);
}

/* Texto largo (legales, descripciones, entradas) */
.vvt-prosa {
	max-width: var(--vvt-ancho-texto);
}

.vvt-prosa h2 {
	margin-top: 1.6em;
	font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem);
}

.vvt-prosa h3 {
	margin-top: 1.4em;
	font-size: clamp(1.375rem, 1.25rem + 0.6vw, 1.75rem);
}

.vvt-prosa > :first-child {
	margin-top: 0;
}

.vvt-prosa ul,
.vvt-prosa ol {
	padding-left: 1.3em;
}

.vvt-prosa li {
	margin-bottom: 0.4em;
}

.vvt-prosa li::marker {
	color: var(--vvt-oro);
}

.vvt-prosa blockquote {
	margin-inline: 0;
	padding-left: 20px;
	border-left: 1px solid var(--vvt-oro);
	font-family: var(--vvt-serifa);
	font-size: 1.375rem;
	font-style: italic;
}

.vvt-prosa table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--vvt-t-pequeno);
	font-variant-numeric: tabular-nums;
}

.vvt-prosa th,
.vvt-prosa td {
	padding: 10px 12px;
	border-bottom: var(--vvt-filete);
	text-align: left;
	vertical-align: top;
}

.vvt-prosa .wp-block-table {
	margin-inline: 0;
	overflow-x: auto;
}

/* La hoja de bloques pone borde oscuro en cada celda y 3 px bajo la cabecera: aquí solo filetes horizontales */
.vvt-prosa .wp-block-table th,
.vvt-prosa .wp-block-table td {
	padding: 10px 12px;
	border: 0;
	border-bottom: var(--vvt-filete);
}

.vvt-prosa .wp-block-table thead {
	border-bottom: 1px solid var(--vvt-bosque);
}

.vvt-prosa .wp-block-table th {
	font-weight: 600;
}

.vvt-prosa img {
	border-radius: var(--vvt-r-tarjeta);
}

.vvt-vacio {
	padding: 32px 0;
	font-size: var(--vvt-t-entradilla);
	color: var(--vvt-musgo);
}

/* Llegadas: lo que está bajo la primera pantalla se posa al llegar (cabecera.js). Sin JS, todo visible. */
.vvt-por-ver {
	opacity: 0;
	transform: translateY(14px);
}

.vvt-visto {
	opacity: 1;
	transform: none;
	transition: opacity 600ms var(--vvt-ease-salida), transform 700ms var(--vvt-ease-salida);
}
