/* Inicio: carrusel de banners, marcas y bloque editorial. */

/* ---------- Carrusel ---------- */
.vw-carousel {
	position: relative;
	background: var(--vw-color-ink, var(--vw-color-footer-bg));
}

.vw-carousel__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.vw-carousel__track::-webkit-scrollbar {
	display: none;
}

.vw-slide {
	position: relative;
	display: flex;
	flex: 0 0 100%;
	flex-direction: column;
	scroll-snap-align: start;
	background: var(--vw-color-footer-bg);
	color: var(--vw-color-on-image);
}

.vw-slide__media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.vw-slide__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* En móvil el texto va debajo de la imagen para que el botón siempre se vea y se lea. */
.vw-slide__text {
	padding: var(--vw-space-5) var(--vw-gutter) var(--vw-space-8);
	background: var(--vw-color-footer-bg);
}

.vw-slide__heading {
	margin-bottom: var(--vw-space-2);
	color: var(--vw-color-on-image);
	font-size: var(--vw-text-2xl);
}

.vw-slide__body {
	margin-bottom: var(--vw-space-4);
	color: var(--vw-color-footer-text);
}

.vw-slide .vw-btn {
	--vw-color-focus: var(--vw-color-focus-inverse);
}

/* Puntos: único control del carrusel; solo existen con JavaScript. Centrados abajo, con área táctil de 44 px.
   El punto visible es pequeño: el banner actual es más ancho (no depende solo del color) y todos llevan borde claro
   y relleno oscuro para leerse sobre cualquier foto. */
.vw-carousel__dots {
	display: none;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vw-carousel.is-enhanced .vw-carousel__dots {
	position: absolute;
	right: 0;
	bottom: var(--vw-space-2);
	left: 0;
	display: flex;
	justify-content: center;
	--vw-color-focus: var(--vw-color-focus-inverse);
}

.vw-carousel__dot {
	position: relative;
	width: var(--vw-tap);
	height: var(--vw-tap);
	border: 0;
	background: transparent;
	cursor: pointer;
}

.vw-carousel__dot::before {
	content: '';
	position: absolute;
	inset: 50% auto auto 50%;
	width: 0.75rem;
	height: 0.75rem;
	border: 2px solid var(--vw-color-on-image);
	border-radius: var(--vw-radius-pill);
	background: var(--vw-color-scrim);
	box-shadow: 0 0 0 1px rgb(0 0 0 / 0.35);
	transform: translate(-50%, -50%);
	transition: var(--vw-transition-state);
}

.vw-carousel__dot[aria-current='true']::before {
	width: 1.5rem;
	background: var(--vw-color-on-image);
}

@media (hover: hover) {
	.vw-carousel__dot:not([aria-current='true']):hover::before {
		background: var(--vw-color-on-image);
	}
}

@media (min-width: 48rem) {
	.vw-slide {
		min-height: 26rem;
		justify-content: center;
	}

	.vw-slide__media {
		position: absolute;
		inset: 0;
		aspect-ratio: auto;
	}

	/* En pantallas anchas el texto va sobre la imagen, con un degradado que asegura el contraste. */
	.vw-slide::after {
		content: '';
		position: absolute;
		inset: 0;
		background: linear-gradient(90deg, var(--vw-color-scrim) 0%, transparent 70%);
		pointer-events: none;
	}

	.vw-slide__text {
		position: relative;
		z-index: 1;
		max-width: 34rem;
		margin-left: max(var(--vw-gutter), calc((100vw - var(--vw-container)) / 2 + var(--vw-gutter)));
		padding: var(--vw-space-6) var(--vw-space-4) var(--vw-space-8) 0;
		background: transparent;
	}

	.vw-slide__heading {
		font-size: var(--vw-text-3xl);
	}
}

@media (min-width: 80rem) {
	.vw-slide {
		min-height: 30rem;
	}
}

/* ---------- Secciones ---------- */
.vw-section {
	padding-block: var(--vw-section-gap);
}

/* ---------- Marcas ----------
   Slider de logos: carril de desplazamiento nativo con scroll-snap. Logos a la vista (--vw-brands-view): 2 en móvil,
   3 en tableta, 4 en portátil y 5 en escritorio; brands.js lo baja a "uno menos de los que hay" para que gire siempre
   sin repetir logos. Con movimiento reducido, o sin JavaScript, queda esta fila: centrada si caben todos (los márgenes
   automáticos de los extremos centran mientras no hay desbordamiento y se anulan solos cuando lo hay). */
.vw-brands {
	--vw-brands-view: 2;
}

.vw-brands__list {
	display: flex;
	margin: calc(-1 * var(--vw-space-2)) 0;
	padding: var(--vw-space-2) 0; /* aire para que el anillo de foco no se recorte en el carril */
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: thin;
}

.vw-brands.is-enhanced .vw-brands__list {
	scrollbar-width: none;
}

.vw-brands.is-enhanced .vw-brands__list::-webkit-scrollbar {
	display: none;
}

/* Cada logo se centra en una caja del mismo tamaño: el tamaño óptico lo da la caja, no el archivo. */
.vw-brands__item {
	display: flex;
	flex: 0 0 calc(100% / var(--vw-brands-view));
	align-items: center;
	justify-content: center;
	height: 3.5rem;
	padding-inline: var(--vw-space-3);
	scroll-snap-align: start;
}

.vw-brands__item:first-child {
	margin-inline-start: auto;
}

.vw-brands__item:last-child {
	margin-inline-end: auto;
}

.vw-brands__link {
	position: relative; /* el texto oculto para lectores de pantalla se queda dentro del carril y no ensancha la página */
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

/* Logos con proporción propia y sin pasar de su tamaño natural. */
.vw-brands__img {
	width: auto;
	max-width: 100%;
	max-height: 100%;
	height: auto;
	object-fit: contain;
	transition: var(--vw-transition-state);
}

@media (hover: hover) {
	.vw-brands__link:hover .vw-brands__img {
		opacity: 0.65;
	}
}

@media (min-width: 40rem) {
	.vw-brands {
		--vw-brands-view: 3;
	}
}

@media (min-width: 64rem) {
	.vw-brands {
		--vw-brands-view: 4;
	}
}

@media (min-width: 80rem) {
	.vw-brands {
		--vw-brands-view: 5;
	}
}

/* ---------- Bloque editorial ---------- */
.vw-editorial__inner {
	display: grid;
	gap: var(--vw-space-6);
	align-items: center;
}

.vw-editorial__media img {
	width: 100%;
	border-radius: var(--vw-radius-md);
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.vw-editorial__text {
	max-width: 40rem;
}

@media (min-width: 60rem) {
	.vw-editorial__inner {
		grid-template-columns: 1fr 1fr;
	}
}

/* ---------- Enlace al portafolio completo (bajo los vinos del inicio) ---------- */
.vw-section__more {
	margin: var(--vw-grid-gap-y) 0 0;
	text-align: center;
}

.vw-section__more .vw-btn {
	min-width: 16rem;
}
