/* VFG – Detalle de producto ([vfg_detalle_producto]) */
.vfg-detalle {
	--vfg-rojo: #c8102e;
	--vfg-verde: #00a650;
	--vfg-texto: #111827;
	--vfg-gris: #6b7280;
	--vfg-linea: #eceef1;
	position: relative;
	overflow: hidden;
	padding-bottom: 48px;
	background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 55%, #e9ebef 100%);
	color: var(--vfg-texto);
	font-family: inherit;
}
.vfg-detalle *,
.vfg-detalle *::before,
.vfg-detalle *::after {
	box-sizing: border-box;
}
.vfg-detalle__contenedor {
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 20px;
	padding-bottom: 40px;
}

/* ---------- Miga de pan ---------- */
.vfg-migas {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-top: 18px;
	font-size: 11px;
	line-height: 1.4;
	color: var(--vfg-gris);
}
.vfg-migas a {
	color: var(--vfg-gris);
	text-decoration: none;
}
.vfg-migas a:hover {
	color: var(--vfg-rojo);
}
.vfg-migas__actual {
	color: var(--vfg-rojo);
	font-weight: 600;
}

/* ---------- Escena + slider ----------
 */
.vfg-detalle__escena {
	position: relative;
}
.vfg-slider {
	--vfg-slide: 64;
	--vfg-foco: 18;
	--vfg-img-h: 300px;
	--vfg-pad-top: 36px;
	--vfg-pad-bottom: 64px;
	--vfg-prev: max(8px, calc(var(--vfg-foco) * 1% - 18px));
	--vfg-next: max(8px, calc((100 - var(--vfg-foco) - var(--vfg-slide)) * 1% - 18px));
	position: relative;
}
.vfg-slider__track {
	position: relative;
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-padding-left: calc(var(--vfg-foco) * 1%);
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding: var(--vfg-pad-top) 0 var(--vfg-pad-bottom);
	outline: none;
}
.vfg-slider__track::-webkit-scrollbar {
	display: none;
}
.vfg-slider__track::before,
.vfg-slider__track::after {
	content: "";
	flex: 0 0 auto;
}
.vfg-slider__track::before {
	width: calc(var(--vfg-foco) * 1%);
}
.vfg-slider__track::after {
	width: calc((100 - var(--vfg-foco) - var(--vfg-slide)) * 1%);
}
.vfg-slider__track:focus-visible {
	box-shadow: inset 0 0 0 2px var(--vfg-rojo);
}
.vfg-slider__slide {
	flex: 0 0 calc(var(--vfg-slide) * 1%);
	height: var(--vfg-img-h);
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	scroll-snap-align: start;
	opacity: 0.28;
	filter: grayscale(1);
	transform: scale(0.86);
	transition: opacity 0.45s ease, filter 0.45s ease, transform 0.45s ease;
	cursor: pointer;
}
.vfg-slider__slide.is-active {
	opacity: 1;
	filter: none;
	transform: none;
	cursor: default;
}
.vfg-slider__slide img {
	display: block;
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
}
.vfg-slider--unica .vfg-slider__slide {
	cursor: default;
}
.vfg-slider__sombra {
	position: absolute;
	left: calc((var(--vfg-foco) + var(--vfg-slide) / 2) * 1%);
	bottom: calc(var(--vfg-pad-bottom) - 34px);
	width: calc(var(--vfg-slide) * 0.7%);
	height: 26px;
	transform: translateX(-50%);
	background: radial-gradient(ellipse at center, rgba(17, 24, 39, 0.2) 0%, rgba(17, 24, 39, 0) 70%);
	pointer-events: none;
}
.vfg-slider__nav {
	position: absolute;
	top: calc(var(--vfg-pad-top) + var(--vfg-img-h) / 2);
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--vfg-texto);
	box-shadow: 0 4px 14px rgba(17, 24, 39, 0.14);
	transform: translateY(-50%);
	cursor: pointer;
	transition: color 0.2s ease, box-shadow 0.2s ease;
}
.vfg-slider__nav:hover,
.vfg-slider__nav:focus-visible {
	color: var(--vfg-rojo);
	background: #fff;
	box-shadow: 0 6px 18px rgba(17, 24, 39, 0.2);
}
.vfg-slider__nav--prev {
	left: var(--vfg-prev);
}
.vfg-slider__nav--next {
	right: var(--vfg-next);
}

/* ---------- Marca de agua (capa encima de cada imagen) ---------- */
.vfg-slider__slide {
	position: relative;
}
.vfg-capa {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	overflow: hidden;
	background: transparent;
}
.vfg-capa--marca::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--vfg-marca-url);
	background-position: center;
	pointer-events: none;
}
.vfg-capa--original::before {
	filter: none;
}
.vfg-capa--abajo-derecha::before {
	background-position: right 6% bottom 6%;
}
.vfg-capa--mosaico::before {
	inset: -50%;
	background-repeat: repeat;
	background-position: 0 0;
	background-size: var(--vfg-marca-tamano, 140px) auto;
	transform: rotate(-18deg);
}

/* ---------- Protección contra descarga (proteger="si") ---------- */
.vfg-detalle--protegida .vfg-slider {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
}
.vfg-detalle--protegida .vfg-slider__slide img {
	pointer-events: none; 
	-webkit-user-drag: none;
	user-drag: none;
}

/* ---------- Ficha ---------- */
.vfg-ficha {
	position: relative;
	z-index: 4;
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
	overflow: hidden;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 14px 40px rgba(17, 24, 39, 0.12), 0 2px 6px rgba(17, 24, 39, 0.06);
}
.vfg-ficha__cabecera {
	padding: 18px 20px 14px;
	border-bottom: 1px solid var(--vfg-linea);
}
.vfg-ficha__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.vfg-ficha__etiqueta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--vfg-rojo);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}
.vfg-ficha__etiqueta::before {
	content: "";
	width: 18px;
	height: 1px;
	background: currentColor;
}
.vfg-ficha__ref {
	flex-shrink: 0;
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--vfg-rojo);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}
.vfg-ficha__titulo {
	margin: 8px 0 0;
	color: var(--vfg-texto);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.22;
}
.vfg-ficha__cuerpo {
	padding: 14px 20px 16px;
}
.vfg-ficha__subtitulo {
	margin: 0 0 6px;
	color: var(--vfg-texto);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
}
.vfg-ficha__datos {
	margin: 0;
}
.vfg-ficha__fila {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	border-bottom: 1px solid var(--vfg-linea);
	font-size: 11.5px;
	line-height: 1.35;
}
.vfg-ficha__fila:last-child {
	border-bottom: 0;
}
.vfg-ficha__fila dt {
	color: #4b5563;
	font-weight: 400;
}
.vfg-ficha__fila dd {
	margin: 0;
	color: var(--vfg-texto);
	font-weight: 700;
	text-align: right;
}
.vfg-ficha__fila dd.is-vacio {
	color: var(--vfg-gris);
}
.vfg-ficha__pie {
	padding: 14px 20px 18px;
	background: #f6f7f9;
}
.vfg-ficha__wa {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 10px 16px;
	border-radius: 10px;
	background: var(--vfg-verde);
	color: #fff !important;
	text-decoration: none !important;
	transition: filter 0.2s ease, transform 0.2s ease;
}
.vfg-ficha__wa:hover,
.vfg-ficha__wa:focus-visible {
	filter: brightness(0.93);
	transform: translateY(-1px);
}
.vfg-ficha__wa-textos {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
	text-align: center;
}
.vfg-ficha__wa-textos strong {
	font-size: 14px;
	font-weight: 700;
}
.vfg-ficha__wa-textos small {
	font-size: 10px;
	font-weight: 400;
	opacity: 0.92;
}

/* ---------- Escritorio: ficha a la izquierda sobre el escenario ---------- */
@media (min-width: 1025px) {
	.vfg-slider {
		--vfg-slide: 58;
		--vfg-foco: 38;
		--vfg-img-h: 440px;
		--vfg-pad-top: 40px;
		--vfg-pad-bottom: 90px;
		--vfg-prev: calc(var(--vfg-foco) * 1% - 6px);
		--vfg-next: 24px;
	}
	.vfg-detalle__capa-ficha {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		display: flex;
		align-items: flex-start;
		padding-top: 24px;
		pointer-events: none;
	}
	.vfg-ficha {
		width: 340px;
		max-width: none;
		margin: 0;
		pointer-events: auto;
	}
	.vfg-ficha__titulo {
		font-size: 21px;
	}
}

/* ---------- Tablet ---------- */
@media (min-width: 768px) and (max-width: 1024px) {
	.vfg-slider {
		--vfg-slide: 64;
		--vfg-foco: 18;
		--vfg-img-h: 300px;
	}
	.vfg-detalle__capa-ficha {
		margin-top: -8px;
	}
	.vfg-ficha {
		max-width: 480px;
	}
}

/* ---------- Móvil ---------- */
@media (max-width: 767px) {
	.vfg-detalle {
		padding-bottom: 28px;
	}
	.vfg-detalle__contenedor {
		padding: 0 16px;
	}
	.vfg-migas {
		padding-top: 14px;
		font-size: 10px;
	}
	.vfg-slider {
		--vfg-slide: 76;
		--vfg-foco: 12;
		--vfg-img-h: 170px;
		--vfg-pad-top: 24px;
		--vfg-pad-bottom: 48px;
		--vfg-prev: 8px;
		--vfg-next: 8px;
	}
	.vfg-slider__nav {
		width: 30px;
		height: 30px;
	}
	.vfg-ficha {
		border-radius: 14px;
	}
	.vfg-ficha__cabecera {
		padding: 16px 18px 12px;
	}
	.vfg-ficha__cuerpo {
		padding: 12px 18px 14px;
	}
	.vfg-ficha__pie {
		padding: 12px 18px 16px;
	}
	.vfg-ficha__titulo {
		font-size: 18px;
	}
	.vfg-ficha__etiqueta {
		font-size: 9px;
		letter-spacing: 0.14em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vfg-slider__track {
		scroll-behavior: auto;
	}
	.vfg-slider__slide,
	.vfg-ficha__wa {
		transition: none;
	}
}
