/* Ficha de producto: foto, compra (precio, presentación, cantidad y botón en la primera pantalla del móvil),
   garantías, ficha técnica, descripción, preguntas, relacionados y barra de compra fija en el móvil. */

.vvt-woo__migas {
	padding-top: 24px;
}

.vvt-woo__avisos:empty {
	display: none;
}

.vvt-woo__avisos .woocommerce-message,
.vvt-woo__avisos .woocommerce-error,
.vvt-woo__avisos .woocommerce-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 20px;
	margin: 0 0 20px;
	padding: 14px 18px;
	border: 1px solid var(--vvt-oro);
	border-radius: var(--vvt-r-tarjeta);
	background: var(--vvt-blanco);
	list-style: none;
}

.vvt-woo__avisos .woocommerce-message .button {
	order: 2;
	font-weight: 600;
}

div.product.vvt-ficha {
	display: grid;
	grid-template-columns: minmax(0, 11fr) minmax(0, 10fr);
	column-gap: clamp(28px, 5vw, 72px);
	width: 100%;
	max-width: calc(var(--vvt-ancho) + 2 * var(--vvt-medianil));
	margin-inline: auto;
	padding-inline: var(--vvt-medianil);
}

.vvt-ficha__foto {
	position: relative;
	display: grid;
	grid-template: minmax(0, 1fr) / minmax(0, 1fr);
	place-items: center;
	overflow: hidden;
	align-self: start;
	aspect-ratio: 1;
	padding: clamp(20px, 4vw, 48px);
	border-radius: var(--vvt-r-bloque);
	background: var(--vvt-blanco);
}

.vvt-ficha__img {
	width: 100%;
	height: 100%;
	min-height: 0;
	max-height: 560px;
	object-fit: contain;
	transition: opacity 200ms ease;
}

.vvt-ficha__img[data-vvt-cambiando] {
	opacity: 0.35;
}

.vvt-ficha .summary {
	min-width: 0;
	padding-top: 4px;
}

.vvt-ficha .product_title {
	margin-bottom: 10px;
	font-family: var(--vvt-serifa);
	font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
	font-weight: 500;
	line-height: 1.12;
	letter-spacing: -0.01em;
}

.vvt-ficha__datos {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0 0 18px;
	font-family: var(--vvt-mono);
	font-size: var(--vvt-t-dato);
	color: var(--vvt-musgo);
}

.vvt-ficha .summary > .price {
	margin: 0;
	font-family: var(--vvt-mono);
	font-size: var(--vvt-t-precio);
	font-weight: 500;
	line-height: 1.2;
	color: var(--vvt-bosque);
}

.vvt-ficha .summary > .price del {
	font-size: 0.7em;
	color: var(--vvt-musgo);
}

.vvt-ficha .summary > .price ins {
	text-decoration: none;
}

.vvt-ficha__iva {
	margin: 2px 0 16px;
	font-size: var(--vvt-t-dato);
	color: var(--vvt-musgo);
}

.vvt-ficha .woocommerce-product-details__short-description {
	margin-bottom: 20px;
	color: var(--vvt-musgo);
}

.vvt-ficha .woocommerce-product-details__short-description p:last-child {
	margin-bottom: 0;
}

.vvt-ficha__stock {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-size: var(--vvt-t-pequeno);
	font-weight: 500;
	color: var(--vvt-acento);
}

.vvt-ficha .stock.out-of-stock {
	display: inline-block;
	margin: 0 0 16px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--vvt-lino);
	font-weight: 600;
}

/* Formulario de compra estándar de WooCommerce */
.vvt-ficha form.cart {
	margin: 0 0 16px;
}

.vvt-ficha table.variations {
	width: 100%;
	margin-bottom: 8px;
	border-collapse: collapse;
}

.vvt-ficha table.variations tr {
	display: grid;
	gap: 8px;
	margin-bottom: 14px;
}

.vvt-ficha table.variations th,
.vvt-ficha table.variations td {
	padding: 0;
	text-align: left;
}

.vvt-ficha table.variations th label {
	font-family: var(--vvt-mono);
	font-size: var(--vvt-t-dato);
	font-weight: 400;
	letter-spacing: 0.04em;
	color: var(--vvt-musgo);
}

.vvt-ficha table.variations select {
	width: 100%;
	max-width: 360px;
}

.vvt-js .vvt-ficha .reset_variations {
	display: none !important;
}

/* Las presentaciones como botones de opción (con JS); el <select> real queda oculto pero vivo */
.vvt-opciones {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.vvt-ficha table.variations td {
	position: relative;
}

.vvt-js .vvt-opciones[data-vvt-listo] + select {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
	min-height: 0;
	padding: 0;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

.vvt-opcion {
	position: relative;
}

.vvt-opcion input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}

.vvt-opcion > span {
	font-family: var(--vvt-sans);
	color: var(--vvt-bosque);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid var(--vvt-borde-campo);
	border-radius: 999px;
	background: var(--vvt-blanco);
	font-size: var(--vvt-t-pequeno);
	font-weight: 500;
	transition: background-color var(--vvt-d-estado) ease, border-color var(--vvt-d-estado) ease, color var(--vvt-d-estado) ease;
}

.vvt-opcion input:checked + span {
	border-color: var(--vvt-bosque);
	background: var(--vvt-bosque);
	color: var(--vvt-hueso);
	font-weight: 600;
}

.vvt-opcion input:focus-visible + span {
	outline: 2px solid var(--vvt-foco);
	outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
	.vvt-opcion input:not(:checked):not(:disabled):hover + span {
		border-color: var(--vvt-bosque);
	}
}

.vvt-opcion--agotada > span {
	color: var(--vvt-musgo);
	background: transparent;
	cursor: not-allowed;
}

.vvt-opcion--agotada .vvt-opcion__nombre {
	text-decoration: line-through;
}

.vvt-opcion--agotada small {
	font-size: 0.8125rem;
}

.vvt-ficha .single_variation_wrap .woocommerce-variation-price {
	display: none;
}

.vvt-ficha .woocommerce-variation-availability .stock {
	margin: 0 0 12px;
	font-size: var(--vvt-t-pequeno);
}

.vvt-ficha .woocommerce-variation-add-to-cart,
.vvt-ficha form.cart:not(.variations_form) {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.vvt-ficha .quantity {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	height: 52px;
	margin: 0;
	border: 1px solid var(--vvt-borde-campo);
	border-radius: 999px;
	background: var(--vvt-blanco);
}

.vvt-ficha .quantity .qty {
	width: 52px;
	min-height: 0;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: center;
	font-family: var(--vvt-mono);
	font-size: 1.0625rem;
	-moz-appearance: textfield;
}

.vvt-ficha .quantity .qty::-webkit-inner-spin-button,
.vvt-ficha .quantity .qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.vvt-cantidad__boton {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--vvt-bosque);
	cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
	.vvt-cantidad__boton:hover {
		background: var(--vvt-lino);
	}
}

.vvt-ficha .single_add_to_cart_button {
	flex: 1;
	min-width: 200px;
	height: 52px;
	min-height: 52px;
	line-height: 1;
	padding: 12px 28px;
	border: 1px solid var(--vvt-oro);
	border-radius: 999px;
	background: var(--vvt-oro);
	color: var(--vvt-bosque);
	font-size: 1.0625rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color var(--vvt-d-estado) ease, transform var(--vvt-d-pulsar) var(--vvt-ease-salida);
}

.vvt-ficha .single_add_to_cart_button:active {
	transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
	.vvt-ficha .single_add_to_cart_button:not(.disabled):hover {
		background: var(--vvt-oro-hover);
		border-color: var(--vvt-oro-hover);
	}
}

.vvt-ficha .single_add_to_cart_button.disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.vvt-ficha__consulta {
	margin: 0 0 20px;
}

.vvt-garantias {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 20px;
	margin: 0 0 24px;
	padding: 18px 0;
	list-style: none;
	border-block: var(--vvt-filete);
	font-size: var(--vvt-t-pequeno);
}

.vvt-garantias li {
	display: flex;
	gap: 10px;
	line-height: 1.4;
}

.vvt-garantias .vvt-icono {
	margin-top: 1px;
	color: var(--vvt-acento);
}

.vvt-garantias strong {
	display: block;
}

.vvt-garantias span {
	color: var(--vvt-musgo);
}

.vvt-garantias strong {
	color: var(--vvt-bosque);
}

.vvt-ficha__etiqueta {
	margin-bottom: 8px;
}

/* Debajo de la compra */
.vvt-ficha__detalle {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: clamp(28px, 5vw, 72px);
	align-items: start;
	margin-top: clamp(48px, 7vw, 88px);
	padding-top: clamp(32px, 5vw, 56px);
	border-top: 1px solid var(--vvt-bosque);
}

.vvt-ficha__descripcion h2:first-child {
	margin-top: 0;
}

.vvt-ficha__compra {
	position: sticky;
	top: calc(var(--vvt-alto-cabecera) + 24px);
	max-height: calc(100dvh - var(--vvt-alto-cabecera) - 48px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 28px;
	border-radius: var(--vvt-r-bloque);
	background: var(--vvt-lino);
}

.vvt-ficha__compra h2 {
	font-size: var(--vvt-t-titulo);
}

.vvt-ficha .related {
	grid-column: 1 / -1;
	margin-top: clamp(48px, 7vw, 88px);
	padding-bottom: var(--vvt-seccion);
}

.vvt-ficha .related > h2 {
	margin-bottom: 28px;
	font-size: var(--vvt-t-titulo);
}

/* Barra de compra fija en el móvil */
.vvt-barra {
	position: fixed;
	inset: auto 0 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px var(--vvt-medianil) calc(10px + env(safe-area-inset-bottom));
	border-top: var(--vvt-filete);
	background: rgba(250, 247, 238, 0.96);
	box-shadow: var(--vvt-sombra-flotante);
	transform: translateY(110%);
	transition: transform var(--vvt-d-panel) var(--vvt-ease-cajon);
}

.vvt-barra[data-vvt-visible] {
	transform: none;
}

.vvt-barra__datos {
	display: grid;
	min-width: 0;
}

.vvt-barra__nombre {
	overflow: hidden;
	font-size: var(--vvt-t-dato);
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--vvt-musgo);
}

.vvt-barra__precio {
	font-family: var(--vvt-mono);
	font-weight: 500;
}

.vvt-barra .vvt-boton {
	flex: none;
	padding-inline: 22px;
}

@media (min-width: 900px) {
	.vvt-barra {
		display: none;
	}
}

@media (max-width: 899px) {
	div.product.vvt-ficha {
		grid-template-columns: 1fr;
	}

	.vvt-ficha__foto {
		aspect-ratio: 4 / 3;
		margin-bottom: 20px;
	}

	.vvt-ficha__img {
		max-height: 320px;
	}

	.vvt-ficha__detalle {
		grid-template-columns: 1fr;
	}

	.vvt-ficha__compra {
		position: static;
		max-height: none;
		overflow: visible;
	}
}

@media (max-width: 479px) {
	.vvt-garantias {
		grid-template-columns: 1fr;
	}

	.vvt-ficha .single_add_to_cart_button {
		min-width: 0;
	}



	.vvt-ficha__img {
		max-height: 100%;
	}
}

/* Valoraciones de compradores (inc/valoraciones.php): a todo el ancho, debajo de la descripción y las preguntas */
.vvt-ficha__valoraciones {
	grid-column: 1 / -1;
	max-width: 46rem;
	padding-top: clamp(32px, 5vw, 56px);
	border-top: var(--vvt-filete);
}

.woocommerce-Reviews-title,
#reply-title {
	margin: 0 0 20px;
	font-size: var(--vvt-t-titulo);
}

.woocommerce-Reviews .commentlist {
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.woocommerce-Reviews .commentlist li {
	padding: 20px 0;
	border-bottom: var(--vvt-filete);
}

.woocommerce-Reviews .comment-text .meta {
	margin: 6px 0;
	color: var(--vvt-musgo);
	font: 400 var(--vvt-t-dato) / 1.4 var(--vvt-mono);
}

.woocommerce-Reviews .comment-text .meta strong {
	color: var(--vvt-bosque);
	font: 600 var(--vvt-t-pequeno) / 1.4 var(--vvt-sans);
}

.woocommerce-Reviews .comment-text .description p:last-child {
	margin-bottom: 0;
}

.woocommerce-noreviews,
.woocommerce-verification-required {
	color: var(--vvt-musgo);
}

/* Estrellas de WooCommerce sin su hoja ni su fuente de iconos, por máscara (el marcado lo pone WooCommerce) */
.star-rating {
	--vvt-estrella: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 L14.5 8.5 21 9.3 16 14.1 17.3 20.7 12 17.5 6.7 20.7 8 14.1 3 9.3 9.5 8.5z'/%3E%3C/svg%3E");
	position: relative;
	display: inline-block;
	width: 90px;
	height: 16px;
	overflow: hidden;
	background: rgba(28, 27, 22, 0.2);
	color: transparent;
	font-size: 16px;
	line-height: 1;
	-webkit-mask: var(--vvt-estrella) 0 0 / 18px 16px repeat-x;
	mask: var(--vvt-estrella) 0 0 / 18px 16px repeat-x;
}

.star-rating span {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	overflow: hidden;
	padding-top: 1.5em;
	background: var(--vvt-oro);
}

#review_form .comment-form {
	display: grid;
	gap: 16px;
}

#review_form .comment-form p {
	margin: 0;
}

#review_form label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

#review_form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--vvt-borde-campo);
	border-radius: var(--vvt-r-campo);
	background: var(--vvt-blanco);
	font: inherit;
}

#review_form .form-submit input,
#review_form .submit {
	min-height: 48px;
	padding: 12px 28px;
	border: 1px solid var(--vvt-oro);
	border-radius: 999px;
	background: var(--vvt-oro);
	color: var(--vvt-bosque);
	font: 600 1rem / 1.2 var(--vvt-sans);
	cursor: pointer;
}

/* Estrellas para valorar (las crea el guion de WooCommerce sobre el select) */
p.stars {
	margin: 4px 0 0;
}

p.stars span {
	display: inline-flex;
	gap: 4px;
}

p.stars a {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 44px;
	overflow: hidden;
	color: transparent;
	text-decoration: none;
}

p.stars a::before {
	content: "\2606";
	position: absolute;
	inset: 0;
	color: var(--vvt-acento);
	font: 400 30px / 44px "Segoe UI Symbol", "Apple Symbols", sans-serif;
	text-align: center;
}

p.stars:hover a::before,
p.stars.selected a.active::before,
p.stars.selected a:not(.active)::before {
	content: "\2605";
}

p.stars a:hover ~ a::before,
p.stars.selected a.active ~ a::before {
	content: "\2606";
}

/* La foto del envase tiene fondo gris: a sangre en escritorio; en el móvil, entera sobre su mismo degradado */
@media (min-width: 900px) {
	.vvt-ficha__foto {
		aspect-ratio: 4 / 5;
		padding: 0;
	}

	.vvt-ficha__img {
		max-height: none;
		object-fit: cover;
		object-position: 50% 60%;
	}

	.vvt-ficha .related {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
		column-gap: var(--vvt-hueco);
		align-items: start;
	}

	.vvt-ficha .related ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 899px) {
	.vvt-ficha__foto {
		height: auto;
		padding: 0;
		aspect-ratio: 1;
	}

	.vvt-ficha__img {
		max-height: none;
		object-fit: cover;
		object-position: 50% 60%;
	}
}
