/* Perchero de camisas de la portada (prueba). Ver inc/perchero.php. */
.vsm-perchero { overflow: hidden; }
.vsm-perchero__escenario { position: relative; min-height: 590px; padding-top: 34px; }

/* Tubo de madera con sus soportes */
.vsm-perchero__tubo { position: absolute; top: 36px; left: 0; right: 0; height: 10px; border-radius: 6px; background: linear-gradient(180deg, #A67C52 0%, #8B5E3C 45%, #5C3D1E 100%); box-shadow: 0 3px 5px rgba(26, 18, 8, 0.2); }
.vsm-perchero__tubo::before, .vsm-perchero__tubo::after { content: ""; position: absolute; top: -26px; width: 8px; height: 34px; border-radius: 3px; background: #5C3D1E; }
.vsm-perchero__tubo::before { left: 2%; }
.vsm-perchero__tubo::after { right: 2%; }

.vsm-perchero__fila { display: flex; justify-content: center; margin: 0; padding: 0 0 0 96px; list-style: none; transition: filter 0.45s ease, opacity 0.45s ease; }
.vsm-perchero__prenda { position: relative; flex: 0 0 auto; width: 240px; margin-left: -96px; transform-origin: 50% 0; transform: translateX(var(--x, 0)) rotate(var(--giro, 0deg)); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); z-index: var(--capa, 1); }
.vsm-perchero__prenda a { position: relative; display: block; padding-top: 44px; transform-origin: 50% 0; }
.vsm-perchero__prenda img { position: relative; display: block; width: 100%; height: auto; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(26, 18, 8, 0.22)); transform-origin: 50% 0; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }

/* Gancho: el arco sale del tubo y los hombros quedan detrás de la camisa */
.vsm-perchero__gancho { position: absolute; top: 2px; left: 50%; width: 112px; height: 66px; margin-left: -56px; fill: none; stroke: #8a8378; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }

/* Al pasar el cursor */
.vsm-perchero__prenda.es-activa { --capa: 20; }
.vsm-perchero__prenda.es-activa img { transform: scale(1.14); }
.vsm-perchero__prenda.es-activa a { animation: vsm-perchero-vaiven 1.1s ease-out; }
@keyframes vsm-perchero-vaiven {
	0% { transform: rotate(0); }
	25% { transform: rotate(1.8deg); }
	55% { transform: rotate(-1.1deg); }
	80% { transform: rotate(0.5deg); }
	100% { transform: rotate(0); }
}

/* Entrada: las camisas caen en el tubo, una tras otra */
.vsm-perchero:not(.es-visible) .vsm-perchero__prenda { opacity: 0; transform: translateY(-26px) rotate(-3deg); }
.vsm-perchero.es-visible .vsm-perchero__prenda { animation: vsm-perchero-llega 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards; animation-delay: calc(var(--i) * 70ms); }
@keyframes vsm-perchero-llega {
	from { opacity: 0; transform: translateY(-26px) rotate(-3deg); }
}

/* Con una camisa elegida */
.vsm-perchero.es-abierto .vsm-perchero__fila { filter: blur(7px); opacity: 0.32; pointer-events: none; }
.vsm-perchero__prenda.es-elegida { visibility: hidden; }

.vsm-perchero__ficha { position: absolute; inset: 44px 0 0; display: flex; justify-content: center; align-items: flex-start; gap: 44px; }
.vsm-perchero__ficha[hidden] { display: none; }
.vsm-perchero__figura { position: relative; width: 430px; max-width: 46%; padding-top: 42px; perspective: 1400px; }
.vsm-perchero__figura img { display: block; width: auto; max-width: 100%; height: auto; max-height: 490px; margin: 0 auto; filter: drop-shadow(0 16px 18px rgba(26, 18, 8, 0.28)); }
.vsm-perchero__figura .vsm-perchero__gancho { top: -10px; width: 150px; height: 88px; margin-left: -75px; opacity: 0; transition: opacity 0.3s ease 0.3s; }
.vsm-perchero.es-abierto .vsm-perchero__figura .vsm-perchero__gancho { opacity: 1; }
.vsm-perchero__info { position: relative; width: 320px; margin-top: 30px; padding: 22px 24px 18px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.92); box-shadow: 0 10px 34px rgba(26, 18, 8, 0.12); opacity: 0; transform: translateY(14px); transition: opacity 0.35s ease 0.2s, transform 0.35s ease 0.2s; }
.vsm-perchero.es-abierto .vsm-perchero__info { opacity: 1; transform: none; }
.vsm-perchero__cerrar { position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; padding: 0; border: 0; background: none; font-size: 24px; line-height: 1; color: #6b6459; cursor: pointer; }
.vsm-perchero__logo { display: block; max-width: 150px; height: 46px; margin-bottom: 14px; object-fit: contain; object-position: left center; }
.vsm-perchero__logo[hidden] { display: none; }
.vsm-perchero__nombre { margin: 0; font: 600 17px/1.3 'Poppins', sans-serif; color: var(--negro); }
.vsm-perchero__precio { margin: 6px 0 14px; font: 600 18px 'Poppins', sans-serif; color: var(--cafe); }
.vsm-perchero__lados { display: inline-flex; padding: 3px; margin-bottom: 14px; border-radius: 999px; background: #f3ede4; }
.vsm-perchero__lados button { padding: 6px 16px; border: 0; border-radius: 999px; background: none; font-size: 13px; color: var(--cafe); cursor: pointer; }
.vsm-perchero__lados button[aria-pressed="true"] { background: var(--negro); color: #fff; }
.vsm-perchero__tallas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.vsm-perchero__tallas:empty { display: none; }
.vsm-perchero__tallas button { min-width: 40px; height: 34px; padding: 0 8px; border: 1px solid #d9d1c4; border-radius: 8px; background: #fff; font-size: 13px; color: var(--negro); cursor: pointer; }
.vsm-perchero__tallas button[aria-pressed="true"] { border-color: var(--negro); background: var(--negro); color: #fff; }
.vsm-perchero__comprar { display: block; padding: 12px; border-radius: 10px; background: var(--cafe); color: #fff; font-weight: 700; font-size: 14px; text-align: center; text-decoration: none; }
.vsm-perchero__comprar:hover { background: var(--negro); color: #fff; }
.vsm-perchero__flechas { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.vsm-perchero__flechas button { width: 38px; height: 38px; padding: 0; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--cafe); cursor: pointer; }
.vsm-perchero__cuenta { font-size: 12px; letter-spacing: 1px; color: #8a8a8a; }

@media (max-width: 1100px) {
	.vsm-perchero__prenda { width: 190px; margin-left: -80px; }
	.vsm-perchero__fila { padding-left: 80px; }
	.vsm-perchero__ficha { gap: 24px; }
	.vsm-perchero__figura { width: 360px; }
	.vsm-perchero__escenario { min-height: 520px; }
}

/* Celular: se desliza con el dedo; al tocar una, va arriba y la ficha debajo */
@media (max-width: 768px) {
	.vsm-perchero__escenario { min-height: 0; margin: 0 -14px; }
	.vsm-perchero__tubo { left: 0; right: 0; border-radius: 0; }
	.vsm-perchero__tubo::before, .vsm-perchero__tubo::after { display: none; }
	.vsm-perchero__fila { justify-content: flex-start; padding: 0 18vw 22px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.vsm-perchero__fila::-webkit-scrollbar { display: none; }
	.vsm-perchero__prenda { width: 64vw; margin-left: -6vw; scroll-snap-align: center; }
	.vsm-perchero__prenda:first-child { margin-left: 0; }
	.vsm-perchero.es-abierto .vsm-perchero__fila { position: absolute; inset: 34px 0 auto; max-height: 340px; overflow: hidden; }
	.vsm-perchero__ficha { position: relative; inset: auto; flex-direction: column; align-items: center; gap: 12px; padding: 10px 14px 0; }
	.vsm-perchero__figura { width: 72vw; max-width: 300px; }
	.vsm-perchero__info { width: 100%; margin-top: 0; box-sizing: border-box; }
}

@media (prefers-reduced-motion: reduce) {
	.vsm-perchero__prenda, .vsm-perchero__prenda img, .vsm-perchero__info { transition: none; animation: none !important; }
	.vsm-perchero__prenda a { animation: none !important; }
}

/* Variación con modelos: parados uno junto al otro detrás de una viga de madera (las fotos terminan en la cadera) */
.vsm-perchero--modelos { --ancho: calc(100% / (var(--n) * 0.55 + 0.45)); }
.vsm-perchero--modelos .vsm-perchero__gancho { display: none; }
.vsm-perchero--modelos .vsm-perchero__escenario { display: flex; flex-direction: column; justify-content: flex-end; height: 450px; min-height: 0; padding-top: 0; }
.vsm-perchero--modelos .vsm-perchero__tubo { top: auto; bottom: 0; z-index: 30; height: 14px; }
.vsm-perchero--modelos .vsm-perchero__tubo::before, .vsm-perchero--modelos .vsm-perchero__tubo::after { display: none; }
.vsm-perchero--modelos .vsm-perchero__fila { padding: 0; }
.vsm-perchero--modelos .vsm-perchero__prenda { width: var(--ancho); margin-left: calc(var(--ancho) * -0.45); transform-origin: 50% 100%; }
.vsm-perchero--modelos .vsm-perchero__prenda:first-child { margin-left: 0; }
.vsm-perchero--modelos .vsm-perchero__prenda a { padding-top: 0; }
.vsm-perchero--modelos .vsm-perchero__prenda img { filter: drop-shadow(0 4px 8px rgba(26, 18, 8, 0.2)); transform-origin: 50% 100%; }
.vsm-perchero--modelos .vsm-perchero__prenda.es-activa img { transform: scale(1.1); }
.vsm-perchero--modelos .vsm-perchero__prenda.es-activa a { animation: none; }
.vsm-perchero--modelos:not(.es-visible) .vsm-perchero__prenda { transform: translateY(60px); }
.vsm-perchero--modelos.es-visible .vsm-perchero__prenda { animation-name: vsm-perchero-sube; }
@keyframes vsm-perchero-sube {
	from { opacity: 0; transform: translateY(60px); }
}
.vsm-perchero--modelos .vsm-perchero__ficha { inset: 0; align-items: flex-end; }
.vsm-perchero--modelos .vsm-perchero__figura { width: auto; padding-top: 0; }
.vsm-perchero--modelos .vsm-perchero__figura img { max-height: 440px; filter: drop-shadow(0 6px 12px rgba(26, 18, 8, 0.25)); }
.vsm-perchero--modelos .vsm-perchero__info { align-self: center; margin-top: 0; padding: 14px 22px 8px; }
.vsm-perchero--modelos .vsm-perchero__logo { height: 38px; margin-bottom: 8px; }
.vsm-perchero--modelos .vsm-perchero__nombre { padding-right: 22px; }

@media (max-width: 1100px) {
	.vsm-perchero--modelos .vsm-perchero__escenario { height: 410px; }
	.vsm-perchero--modelos .vsm-perchero__figura img { max-height: 400px; }
}

@media (max-width: 768px) {
	.vsm-perchero--modelos .vsm-perchero__escenario { display: block; height: auto; }
	.vsm-perchero--modelos .vsm-perchero__fila { padding: 0 18vw; }
	.vsm-perchero--modelos .vsm-perchero__prenda { width: 64vw; margin-left: -6vw; }
	.vsm-perchero--modelos .vsm-perchero__prenda:first-child { margin-left: 0; }
	.vsm-perchero--modelos.es-abierto .vsm-perchero__tubo { display: none; }
	.vsm-perchero--modelos.es-abierto .vsm-perchero__fila { inset: 0 0 auto; }
	.vsm-perchero--modelos .vsm-perchero__ficha { align-items: center; gap: 0; padding: 0 14px 12px; }
	.vsm-perchero--modelos .vsm-perchero__figura { max-width: 100%; }
	.vsm-perchero--modelos .vsm-perchero__figura img { max-height: 300px; }
	.vsm-perchero--modelos .vsm-perchero__info { z-index: 2; margin-top: -26px; }
}

/* ── Perchero con las fotos nuevas: pared de yeso, tubo de madera con soportes de fierro y ganchos con gancho metálico.
   Todo se mide en --p (ancho de una camisa) para que tubo, ganchos y camisas guarden proporción en cualquier pantalla. ── */
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__escenario { container-type: inline-size; min-height: 0; padding: 78px 30px 46px; overflow: hidden; border-radius: 12px; background: #e3d9c8 url(../perchero/escena/yeso.webp) center / 1300px; box-shadow: inset 0 0 130px rgba(80, 58, 34, 0.3); transition: min-height 0.4s ease; }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__escenario::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 80% 90% at 34% 0, rgba(255, 244, 222, 0.5), transparent 70%); }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__escenario > * { --p: calc(100cqw / (var(--n) * 0.33 + 0.67)); --f: min(560px, 52cqw); --arriba: 78px; }
.vsm-perchero.es-abierto:not(.vsm-perchero--modelos) .vsm-perchero__escenario { min-height: 740px; }

.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__tubo { z-index: 1; top: calc(var(--arriba) + var(--p) * 0.0262); height: calc(var(--p) * 0.081); border-radius: 0; background: url(../perchero/escena/tubo.webp) 0 0 / auto 100% repeat-x; box-shadow: none; filter: drop-shadow(0 calc(var(--p) * 0.05) calc(var(--p) * 0.028) rgba(58, 38, 18, 0.42)); }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__tubo::before, .vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__tubo::after { display: none; }
.vsm-perchero__soporte { position: absolute; z-index: 2; top: calc(var(--arriba) + var(--p) * 0.0667 - var(--p) * 0.2714); width: calc(var(--p) * 0.179); height: auto; filter: drop-shadow(5px 8px 6px rgba(58, 38, 18, 0.45)); }
.vsm-perchero__soporte--izq { left: 3%; }
.vsm-perchero__soporte--der { right: 3%; }

.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__fila { position: relative; z-index: 3; }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__prenda { transform-origin: 50% 2.5%; }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__prenda a { padding-top: 13.81%; transform-origin: 50% 2.6%; }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__prenda img:not(.vsm-perchero__gancho) { filter: drop-shadow(7px 13px 11px rgba(50, 34, 16, 0.34)); }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__prenda.es-activa img:not(.vsm-perchero__gancho) { transform: scale(1.07); filter: drop-shadow(12px 20px 16px rgba(50, 34, 16, 0.4)); }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__prenda.es-activa .vsm-perchero__gancho { transform: none; }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__prenda.es-activa a { animation: vsm-perchero-pendulo 1.5s ease-out; }
@keyframes vsm-perchero-pendulo {
	0% { transform: rotate(0); }
	18% { transform: rotate(1.5deg); }
	40% { transform: rotate(-1.05deg); }
	62% { transform: rotate(0.6deg); }
	82% { transform: rotate(-0.25deg); }
	100% { transform: rotate(0); }
}
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__gancho { position: absolute; top: 0; left: 0; z-index: 0; width: 100%; height: auto; margin: 0; aspect-ratio: 1260 / 423; fill: initial; stroke: none; filter: drop-shadow(2px 4px 3px rgba(30, 20, 10, 0.42)); }

.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__ficha { z-index: 4; inset: var(--arriba) 30px 0; }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__figura { width: var(--f); max-width: none; margin-top: calc(var(--p) * 0.0667 - var(--f) * 0.0667); padding-top: 0; }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__figura img:not(.vsm-perchero__gancho) { position: relative; width: 100%; max-width: none; max-height: none; margin: calc(var(--f) * 0.1381) 0 0; filter: drop-shadow(12px 20px 18px rgba(50, 34, 16, 0.4)); }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__figura .vsm-perchero__gancho { top: 0; left: 0; width: 100%; height: auto; margin: 0; opacity: 1; transition: none; }
.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__info { margin-top: 96px; }

@media (min-width: 769px) {
	.vsm-perchero:not(.vsm-perchero--modelos) { --ancho: calc(100% / (var(--n) * 0.33 + 0.67)); }
	.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__fila { padding-left: 0; }
	.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__prenda { width: var(--ancho); margin-left: calc(var(--ancho) * -0.67); }
	.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__prenda:first-child { margin-left: 0; }
}
@media (max-width: 1100px) {
	.vsm-perchero.es-abierto:not(.vsm-perchero--modelos) .vsm-perchero__escenario { min-height: 560px; }
	.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__info { width: 290px; margin-top: 56px; }
}
@media (max-width: 768px) {
	.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__escenario { margin: 0 -14px; padding: 44px 0 20px; border-radius: 0; }
	.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__escenario > * { --p: 94vw; --f: 74vw; --arriba: 44px; }
	.vsm-perchero.es-abierto:not(.vsm-perchero--modelos) .vsm-perchero__escenario { min-height: 0; }
	.vsm-perchero__soporte { display: none; }
	.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__fila { padding: 0 3vw 22px; }
	.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__prenda { width: 94vw; margin-left: -34vw; }
	.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__prenda:first-child { margin-left: 0; }
	.vsm-perchero.es-abierto:not(.vsm-perchero--modelos) .vsm-perchero__fila { position: absolute; inset: var(--arriba) 0 auto; }
	.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__ficha { inset: auto; }
	.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__info { width: 100%; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
	.vsm-perchero:not(.vsm-perchero--modelos) .vsm-perchero__prenda.es-activa a { animation: none; }
}
