/* =========================================================================
 * vm-theme — COMPONENTES (clase B): video, galería + lightbox, comparador.
 * Se apoya en tokens.css. Sin dependencias de Elementor / Essential Addons.
 * ========================================================================= */

/* ---------- vm_video: fachada YouTube ---------- */
.vm-video { margin: 2rem 0; }
.vm-video__facade,
.vm-video__iframe {
	display: block; position: relative;
	width: 100%; aspect-ratio: 16 / 9;
	border: 1px solid var(--line); background: #0c0a08;
}
.vm-video__iframe { border: 0; }
.vm-video__facade { overflow: hidden; cursor: pointer; }
.vm-video__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); transition: filter var(--t-med), transform .7s var(--ease); }
.vm-video__facade:hover .vm-video__thumb { filter: brightness(1); transform: scale(1.03); }
.vm-video__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.vm-video__play svg { filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); transition: transform var(--t-fast) var(--ease); }
.vm-video__play-bg { fill: var(--oxblood); opacity: .92; }
.vm-video__facade:hover .vm-video__play svg { transform: scale(1.08); }
.vm-video__facade:focus-visible { outline: 2px solid var(--visor); outline-offset: 2px; }
.vm-video__cap { margin-top: .6rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; font-size: .58rem; color: var(--ivory-faint); }

/* ---------- vm_gallery ---------- */
.vm-gallery { margin: 2rem 0; }
.vm-gallery__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: clamp(.5rem, 1.2vw, .9rem); }
@media (max-width: 640px) { .vm-gallery__grid { grid-template-columns: repeat(2, 1fr); } }
.vm-gallery__item { margin: 0; }
/* Fallback sin JS: lista de enlaces ligeros a las imágenes restantes. */
.vm-gallery__nojs { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.vm-gallery__nojs a { font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ivory-dim); border-bottom: 1px solid var(--line-2); }
.vm-gallery__nojs a:hover { color: var(--visor); }
.vm-gallery__link { display: block; position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--carbon); border: 1px solid var(--line); }
.vm-gallery__link img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.88); transition: transform .5s var(--ease), filter var(--t-med); }
.vm-gallery__link:hover img { transform: scale(1.06); filter: brightness(1); }
.vm-gallery__link:focus-visible { outline: 2px solid var(--visor); outline-offset: 2px; }
.vm-gallery__more { display: flex; justify-content: center; margin-top: 1.2rem; }

/* ---------- Lightbox ---------- */
.vm-lightbox { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: clamp(1rem, 4vw, 3rem); background: color-mix(in srgb, var(--black) 92%, transparent); backdrop-filter: blur(6px); }
.vm-lightbox[hidden] { display: none; }
/* 15821: the native dialog uses hidden; inherited styles expect other state classes. */
body.page-id-15821 #vm-lightbox:not([hidden]) { opacity: 1; visibility: visible; }
body.page-id-15821 #vm-lightbox:not([hidden]) .vm-lightbox__img { opacity: 1; transform: none; max-width: 100%; }
body.page-id-15821 #vm-lightbox:not([hidden]) .vm-lightbox__stage { min-width: 0; }
.vm-lightbox__stage { margin: 0; max-width: min(92vw, 1200px); max-height: 88vh; display: flex; }
.vm-lightbox__img { max-width: 100%; max-height: 88vh; width: auto; height: auto; object-fit: contain; border: 1px solid var(--line-2); }
.vm-lightbox__close, .vm-lightbox__nav { background: color-mix(in srgb, var(--black) 55%, transparent); border: 1px solid var(--line-2); color: var(--ivory); cursor: pointer; line-height: 1; transition: border-color var(--t-fast), color var(--t-fast); }
.vm-lightbox__close { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; font-size: 1.6rem; }
.vm-lightbox__nav { width: 48px; height: 64px; font-size: 2rem; flex: 0 0 auto; }
.vm-lightbox__close:hover, .vm-lightbox__nav:hover { border-color: var(--ivory); color: var(--visor); }
.vm-lightbox__close:focus-visible, .vm-lightbox__nav:focus-visible { outline: 2px solid var(--visor); outline-offset: 2px; }
@media (max-width: 640px) { .vm-lightbox__nav { width: 40px; height: 52px; font-size: 1.5rem; } }

/* ---------- vm_compare: antes/después ---------- */
.vm-compare { margin: 2rem 0; }
.vm-compare__frame { position: relative; overflow: hidden; border: 1px solid var(--line); background: #0c0a08; user-select: none; touch-action: none; }
.vm-compare__pane { margin: 0; }
.vm-compare__pane--before { position: relative; }
.vm-compare__pane--before .vm-compare__img { display: block; width: 100%; height: auto; }
.vm-compare__pane--after { position: absolute; inset: 0; clip-path: polygon(0 0, var(--pos, 50%) 0, var(--pos, 50%) 100%, 0 100%); }
.vm-compare__pane--after .vm-compare__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vm-compare__label { position: absolute; bottom: .8rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em; font-size: .56rem; color: var(--ivory); background: color-mix(in srgb, var(--black) 60%, transparent); border: 1px solid var(--line); padding: .3rem .55rem; }
.vm-compare__label--before { right: .8rem; }
.vm-compare__label--after { left: .8rem; }
.vm-compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: var(--ivory); transform: translateX(-1px); pointer-events: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--black) 40%, transparent); }
.vm-compare__handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); border: 2px solid var(--ivory); border-radius: 50%; background: color-mix(in srgb, var(--black) 45%, transparent); }
.vm-compare__range { display: block; width: 100%; margin-top: .8rem; accent-color: var(--oxblood); cursor: ew-resize; }
.vm-compare__range:focus-visible { outline: 2px solid var(--visor); outline-offset: 3px; }

/* =========================================================================
 * AFILIADOS (rc7/rc8) y CTA de contenido
 * Dos formas distintas a propósito:
 *   .vm-aff-link     = enlace INLINE con el nombre real del producto (los ex-[amazon box])
 *   .vm-btn-afiliado = BOTÓN de borde oxblood (los CTA "Ver precio" de 8513/16651)
 * ========================================================================= */

/* Enlace inline de producto: se lee como texto, marcado con ↗ para que se note
   que sale del sitio. Hereda el subrayado oxblood de .prose a. */
.vm-aff-link { color: var(--ivory); font-weight: var(--fw-medium); }
.vm-aff-link::after { content: "↗"; font-size: .85em; color: var(--oxblood-br); margin-left: .25em; }
.vm-aff-link:hover { color: var(--visor); }
.prose .vm-aff-link { border-bottom: 1px solid var(--oxblood); }
.prose .vm-aff-link:hover { border-bottom-color: var(--oxblood-br); }

/* Botón de afiliado: BORDE oxblood, no relleno (el relleno se reserva al CTA propio,
   para que la venta interna pese más que el enlace externo). Nunca banner. */
.vm-afiliado { margin: 1.6rem 0; }
.vm-btn-afiliado {
	display: inline-flex; align-items: center; gap: .5rem;
	font-family: var(--font-mono); font-size: var(--fs-micro);
	letter-spacing: .16em; text-transform: uppercase;
	padding: .8rem 1.4rem;
	color: var(--ivory);
	border: 1px solid var(--oxblood);
	background: transparent;
	transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.vm-btn-afiliado::after { content: "↗"; font-size: .9em; color: var(--oxblood-br); }
.vm-btn-afiliado:hover { background: var(--oxblood); border-color: var(--oxblood-br); }
.prose .vm-btn-afiliado { border-bottom: 1px solid var(--oxblood); }
.prose .vm-btn-afiliado:hover { border-bottom-color: var(--oxblood-br); }

/* CTA interno de venta (producto propio; 6137 "Libro de Poses"). Recuadro + botón relleno. */
.vm-cta {
	border: 1px solid var(--oxblood);
	background: color-mix(in srgb, var(--oxblood) 7%, transparent);
	padding: clamp(1.3rem, 2.6vw, 1.9rem);
	margin: 2.8rem 0;
}
.vm-cta__title {
	font-family: var(--font-sans); font-weight: var(--fw-regular);
	text-transform: uppercase; letter-spacing: .02em;
	font-size: 1.3rem; line-height: 1.15; color: var(--ivory); margin: 0 0 .5rem;
}
.vm-cta__desc   { color: var(--ivory-dim); font-size: .95rem; margin: 0 0 1.2rem; max-width: 52ch; }
.vm-cta__action { margin: 0; }
.prose .vm-cta a.vm-btn { border-bottom: 0; }

/* Tarjeta CTA sin botón (portada + título enlazado).
   En Elementor estos bloques usaban link_click=box: se podía pulsar TODA la caja,
   no sólo el texto. Se conserva ese comportamiento con stretched-link — el ancla
   del título proyecta un ::after que cubre la tarjeta entera.
   El ancla NO envuelve la imagen ni el encabezado a propósito: un elemento de
   bloque dentro de uno en línea hace que wpautop parta el marcado y que el parser
   HTML5 clone el ancla, dejando enlaces vacíos en la página. */
.vm-cta--card { position: relative; }
.vm-cta--card img { margin: 0 0 1rem; }
.vm-cta--card .vm-cta__title { margin: 0; }
.prose .vm-cta__link { border-bottom: 0; }
/* Acotada a la tarjeta A PROPÓSITO: `.vm-cta__link::after` a secas sólo se queda
   dentro de la caja porque otra regla, sobre otra clase, le da un ancestro
   posicionado. Si un enlace de estos acabara alguna vez en un `.vm-cta` sin el
   modificador, `inset: 0` se resolvería contra el bloque contenedor inicial y una
   capa invisible se tragaría los clics de toda la página. */
.vm-cta--card .vm-cta__link::after { content: ""; position: absolute; inset: 0; }

/* Cualquier control que se añada dentro de la tarjeta debe poder pulsarse por
   encima de la capa estirada; si no, el stretched-link se los comería. */
.vm-cta--card .vm-cta__desc a,
.vm-cta--card button { position: relative; z-index: 1; }

/* El foco tiene que verse en la TARJETA, no sólo en el rectángulo del texto.
   Se AÑADE al anillo que base.css ya da al enlace; no se le quita ninguno, para
   que un navegador sin :focus-within siga mostrando indicación de foco. */
.vm-cta--card:focus-within { outline: 2px solid var(--visor); outline-offset: 3px; }
@media (hover: hover) {
	.vm-cta--card:hover { background: color-mix(in srgb, var(--oxblood) 14%, transparent); }
}

/* Fallback del embed social mientras no hidrata (rc7): cita con acento oxblood. */
.prose .twitter-tweet, .prose .instagram-media {
	margin: 2.4rem 0; padding: 1rem 0 1rem 1.3rem;
	border-left: 2px solid var(--oxblood);
	color: var(--ivory-dim); max-width: 100%;
}
.prose .twitter-tweet a, .prose .instagram-media a { color: var(--ivory); }
.vm-embed-link a { color: var(--visor); }

/* Editorial adaptation of 13932 /home/, not the site's front page.
 * Visual family: approved Montserrat home (spacing/type) and blog cards (grid).
 * All selectors require the new content wrapper; other consumers are unchanged.
 * Images remain visible in full. No demo destinations or interactions. */
.vm-home-editorial { max-width: 100%; }
.vm-home-editorial .mono { font-family: var(--font-sans); }
.vm-home-editorial .vm-editorial-intro { max-width: 60ch; margin-bottom: clamp(3rem, 6vw, 5rem); }
.vm-home-editorial .vm-editorial-intro h2 { font-weight: var(--fw-light); font-size: var(--fs-h2); text-transform: uppercase; letter-spacing: .035em; }
.vm-home-editorial .vm-editorial-intro p { color: var(--ivory-dim); line-height: 1.7; }
.vm-home-editorial > h2,
.vm-home-editorial > h3,
.vm-home-editorial .vm-editorial-upcoming > h3 {
	font-family: var(--font-sans); font-size: var(--fs-h2); font-weight: var(--fw-light);
	line-height: 1.14; letter-spacing: .035em; text-transform: uppercase;
	margin: 0 0 2rem; text-wrap: balance;
}
.vm-home-editorial .vm-editorial-upcoming { margin-bottom: clamp(3.4rem, 7vw, 6rem); }
.vm-home-editorial .vm-editorial-event {
	position: relative; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr);
	border: 1px solid var(--line-2); background: var(--carbon); padding: 0; margin: 0;
}
.vm-home-editorial .vm-editorial-media { min-width: 0; margin: 0; align-self: center; }
.vm-home-editorial .vm-editorial-event .vm-editorial-media img { width: 100%; height: auto; margin: 0; }
.vm-home-editorial .vm-editorial-copy { min-width: 0; padding: clamp(1.4rem,3vw,2.6rem); align-self: center; }
.vm-home-editorial .vm-editorial-event .vm-cta__title { font-size: clamp(1.45rem,2.5vw,2.2rem); font-weight: var(--fw-light); line-height: 1.15; text-wrap: balance; }
.vm-home-editorial .vm-editorial-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(1rem,2.4vw,2rem); margin-bottom: clamp(3.4rem,7vw,6rem); }
.vm-home-editorial .vm-editorial-grid .vm-cta { min-width: 0; margin: 0; padding: 0; background: transparent; border: 0; border-top: 1px solid var(--line-2); }
.vm-home-editorial .vm-editorial-grid img { width: 100%; height: auto; margin: 0 0 1.3rem; }
.vm-home-editorial .vm-editorial-grid .vm-cta__title { font-size: 1.25rem; font-weight: var(--fw-medium); line-height: 1.2; text-wrap: balance; }
.vm-home-editorial .vm-editorial-grid .vm-cta__desc { margin: .8rem 0 1.4rem; color: var(--ivory-dim); }
.vm-home-editorial .vm-editorial-info { display: flex; flex-direction: column; }
.vm-home-editorial .vm-editorial-info .vm-editorial-copy { display: flex; flex-direction: column; flex: 1; padding: 0; width: 100%; }
.vm-home-editorial .vm-editorial-info .vm-cta__action { margin-top: auto; }
.vm-home-editorial .vm-btn { font-family: var(--font-sans); font-weight: var(--fw-medium); max-width: 100%; text-align: center; }
.vm-home-editorial .vm-btn:focus-visible { outline: 2px solid var(--visor); outline-offset: 3px; }
.vm-home-editorial .vm-btn:active { transform: translateY(1px); }
.vm-home-editorial .vm-editorial-event-link::after { content: ""; position: absolute; inset: 0; }
.vm-home-editorial .vm-editorial-event-link:active { transform: none; }
.vm-home-editorial .vm-editorial-event:focus-within { outline: 2px solid var(--visor); outline-offset: 3px; }
.vm-home-editorial .vm-cta--unlinked:hover { background: transparent; }
@media(max-width:900px) {
	.vm-home-editorial .vm-editorial-event { grid-template-columns: 1fr; }
	.vm-home-editorial .vm-editorial-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:580px) {
	.vm-home-editorial .vm-editorial-grid { grid-template-columns: minmax(0,1fr); gap: 2.6rem; }
}

/* 6369: approved editorial/card visual family; original catalog data retained. */
.vm-store-editorial .vm-store-grid,
.vm-store-editorial .vm-store-slides { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(1.2rem,3vw,2.5rem); margin: 2.5rem 0 4rem; }
.vm-store-editorial .vm-store-brands { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 1.5rem; margin: 2rem 0 4rem; }
.vm-store-editorial .vm-store-item { min-width: 0; position: relative; }
.vm-store-editorial figure { margin: 0 0 1rem; }
.vm-store-editorial figure img { display: block; width: 100%; height: auto; margin: 0; }
.vm-store-editorial .vm-store-slides figure img { aspect-ratio: 16/9; object-fit: contain; background: var(--carbon); }
.vm-store-editorial .vm-store-brands figure { background: var(--ivory); padding: .8rem; }
.vm-store-editorial .vm-store-brands img { aspect-ratio: 5/3; object-fit: contain; }
.vm-store-editorial .vm-store-grid > .vm-cta { min-width: 0; margin: 0; padding: 0; background: transparent; border: 0; }
.vm-store-editorial .vm-store-item h2,
.vm-store-editorial .vm-store-grid .vm-cta__title { font-family: var(--font-sans); font-size: clamp(1.1rem,1.7vw,1.5rem); font-weight: var(--fw-medium); line-height: 1.25; text-wrap: balance; }
.vm-store-editorial .vm-store-brands h2 { font-size: .9rem; text-align: center; }
.vm-store-editorial .vm-store-slide-link { font-family: var(--font-sans); font-weight: var(--fw-medium); text-decoration: underline; text-underline-offset: .3em; }
.vm-store-editorial .vm-store-slide-link::after { content: ""; position: absolute; inset: 0; }
.vm-store-editorial a:focus-visible { outline: 2px solid var(--visor); outline-offset: 4px; }
.vm-store-editorial .vm-store-item:focus-within { outline: 2px solid var(--visor); outline-offset: 4px; }
.vm-store-editorial .vm-store-static-label { color: var(--ivory-dim); }
.vm-store-editorial .vm-store-product-block { grid-column: 1/-1; margin: 1rem 0; }
@media(max-width:900px) {
	.vm-store-editorial .vm-store-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
	.vm-store-editorial .vm-store-brands { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:580px) {
	.vm-store-editorial .vm-store-grid,
	.vm-store-editorial .vm-store-slides { grid-template-columns: minmax(0,1fr); }
	.vm-store-editorial .vm-store-brands { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
