/* Verdin Vestidos: frontend */

/* Encabezado de la colección [vb_portada] */
.vb-portada-front {
	position: relative;
	height: clamp(220px, 32vw, 440px);
	overflow: hidden;
	background: #ddd;
}
.vb-portada-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.vb-portada-titulo {
	position: absolute;
	left: max(16px, calc((100% - 1100px) / 2));
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	color: #fff;
	font-size: clamp(20px, 2.4vw, 32px);
	letter-spacing: .08em;
	text-transform: uppercase;
	text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}

/* Cuadrícula [vb_vestidos] */
.vb-grid {
	display: grid;
	grid-template-columns: repeat(var(--vb-cols, 3), minmax(0, 1fr));
	gap: 46px 20px;
}
.vb-card {
	display: block;
	text-decoration: none;
	color: inherit;
}
.vb-card-foto {
	display: block;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	background: #f2f2f2;
}
.vb-grid-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}
.vb-card:hover .vb-grid-img { transform: scale(1.03); }
/* Solo posición; la tipografía la da Avada con .awb-imageframe-caption-title */
.vb-card-nombre {
	display: block;
	margin: 12px 0 0;
	text-align: center;
}
@media (max-width: 767px) {
	.vb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
}

/* Carrusel de otros vestidos [vb_relacionados] */
.vb-carrusel { position: relative; }
.vb-carrusel-pista {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.vb-carrusel-pista::-webkit-scrollbar { display: none; }
.vb-carrusel .vb-card {
	flex: 0 0 calc((100% - 20px * (var(--vb-visibles, 4) - 1)) / var(--vb-visibles, 4));
	scroll-snap-align: start;
}
.vb-carrusel-flecha {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	box-shadow: 0 1px 6px rgba(0, 0, 0, .15);
	color: #222;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	transition: opacity .2s ease;
}
.vb-carrusel-prev { left: -14px; }
.vb-carrusel-next { right: -14px; }
.vb-carrusel-flecha[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 767px) {
	.vb-carrusel-pista { gap: 12px; }
	/* Dos tarjetas y un pedazo de la tercera, para que se note que se desliza. */
	.vb-carrusel .vb-card { flex-basis: 42%; }
	.vb-carrusel-flecha { display: none; }
}

/* Visor en la página del vestido [vb_galeria] */
.vb-visor { display: grid; gap: 12px; }
.vb-visor-principal { position: relative; }
.vb-visor-pista {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	outline: none;
}
.vb-visor-pista::-webkit-scrollbar { display: none; }
.vb-visor-slide {
	flex: 0 0 100%;
	aspect-ratio: 2 / 3;
	scroll-snap-align: center;
	background: #f4f4f4;
}
.vb-visor-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.vb-visor-flecha {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .85);
	color: #222;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	transition: opacity .25s ease;
}
.vb-visor-prev { left: 12px; }
.vb-visor-next { right: 12px; }
.vb-visor-principal:hover .vb-visor-flecha,
.vb-visor-flecha:focus-visible { opacity: 1; }
@media (hover: none) { .vb-visor-flecha { opacity: 1; background: rgba(255, 255, 255, .7); } }

.vb-visor-thumbs {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	scrollbar-width: none;
}
.vb-visor-thumbs::-webkit-scrollbar { display: none; }
.vb-visor-thumb {
	flex: 0 0 auto;
	width: 80px;
	aspect-ratio: 2 / 3;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	opacity: .5;
	outline: 1px solid transparent;
	outline-offset: 2px;
	transition: opacity .2s ease, outline-color .2s ease;
}
.vb-visor-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vb-visor-thumb:hover { opacity: .85; }
.vb-visor-thumb.vb-activo { opacity: 1; outline-color: #222; }

/* Miniaturas a un lado (solo escritorio) */
@media (min-width: 768px) {
	.vb-visor--lado { grid-template-columns: 80px 1fr; align-items: start; }
	.vb-visor--lado .vb-visor-thumbs { order: -1; flex-direction: column; overflow: visible; }
}
@media (max-width: 767px) {
	.vb-visor-thumb { width: 60px; }
}

/* Panel lateral */
html.vb-sin-scroll, html.vb-sin-scroll body { overflow: hidden; }

.vb-panel {
	position: fixed;
	inset: 0;
	z-index: 100000;
}
.vb-panel[hidden] { display: none; }
.vb-panel-fondo {
	position: absolute;
	inset: 0;
	background: rgba(20, 20, 20, .45);
	opacity: 0;
	transition: opacity .3s ease;
}
.vb-panel-caja {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 60vw;
	display: grid;
	grid-template-columns: 34% 1fr;
	background: #fff;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1);
	outline: none;
}
.vb-panel.vb-abierto .vb-panel-fondo { opacity: 1; }
.vb-panel.vb-abierto .vb-panel-caja { transform: none; }

.vb-panel-cerrar {
	position: absolute;
	top: 12px;
	right: 14px;
	z-index: 2;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	font-size: 30px;
	line-height: 1;
	color: #222;
	cursor: pointer;
}
.vb-panel-info { padding: 56px 32px 32px; }
.vb-panel-coleccion {
	margin: 0 0 40px;
	font-size: 26px;
	color: #9a9a9a;
	letter-spacing: .04em;
}
.vb-panel-titulo {
	margin: 0 0 28px;
	font-size: 32px;
	font-weight: 400;
	color: #6a6a6a;
}
.vb-panel-boton {
	display: inline-block;
	padding: 12px 28px;
	background: #222;
	color: #fff !important;
	font-weight: 600;
	text-decoration: none;
	border-radius: 2px;
}
.vb-panel-fotos {
	overflow-y: auto;
	overscroll-behavior: contain;
	display: grid;
	align-content: start;
	gap: 12px;
	padding: 12px;
	background: #fafafa;
}
.vb-panel-img { display: block; width: 100%; height: auto; }
.vb-panel-puntos { display: none; }

/* Celular: pantalla completa, fotos deslizables de lado */
@media (max-width: 767px) {
	.vb-panel-caja {
		width: 100%;
		display: flex;
		flex-direction: column;
	}
	.vb-panel-info { padding: 18px 64px 14px 16px; order: 1; }
	.vb-panel-coleccion { margin: 0 0 4px; font-size: 15px; }
	.vb-panel-titulo { margin: 0 0 12px; font-size: 24px; }
	.vb-panel-boton { padding: 9px 20px; font-size: 14px; }
	.vb-panel-fotos {
		order: 2;
		flex: 1;
		min-height: 0;
		display: flex;
		gap: 0;
		padding: 0;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
	}
	.vb-panel-img {
		flex: 0 0 100%;
		width: 100%;
		height: 100%;
		object-fit: contain;
		scroll-snap-align: center;
	}
	.vb-panel-puntos {
		order: 3;
		display: flex;
		justify-content: center;
		gap: 8px;
		padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
	}
	.vb-panel-puntos span {
		width: 7px;
		height: 7px;
		border-radius: 50%;
		background: #ccc;
	}
	.vb-panel-puntos span.vb-activo { background: #222; }
}

@media (prefers-reduced-motion: reduce) {
	.vb-panel-caja, .vb-panel-fondo, .vb-grid-img { transition: none; }
}
