/* Vitrina Digital: capa visual de disuasión, nunca sobre los originales. */
.vd-lenses-overlay {
    position: absolute;
    display: block;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 1;
    pointer-events: none !important;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    border-radius: 3px;
    /* Los valores se escriben por instancia; no afectan al resto del sitio. */
    --vd-lens-alpha: 0.4;
    --vd-lens-blur: 5.6px;
    --vd-vortex-opacity: 0.74;
}

.vd-lenses-overlay[hidden] {
    display: none !important;
}

.vd-fusion-surface {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    pointer-events: none !important;
}

.vd-lenses-overlay.vd-fusion-active > .vd-fusion-surface {
    display: block;
}

/* El canvas dibuja un único contorno por unión; retirar los aros interiores. */
.vd-lenses-overlay.vd-fusion-active > .vd-lens {
    visibility: hidden;
}

.vd-lenses-overlay .vd-lens {
    position: absolute;
    display: block;
    box-sizing: border-box;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(139, 155, 175, var(--vd-lens-alpha));
    box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(var(--vd-lens-blur)) saturate(0.65) contrast(0.9);
    backdrop-filter: blur(var(--vd-lens-blur)) saturate(0.65) contrast(0.9);
    pointer-events: none !important;
    animation-name: vd-lens-drift;
    animation-duration: 10s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-play-state: running;
}

.vd-vortex-texture,
.vd-lupa-texture,
.vd-lenses-overlay .vd-lens::after {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none !important;
    transform-origin: 50% 50%;
}

.vd-vortex-texture,
.vd-effect-remolino .vd-lens::after {
    animation: vd-vortex-spin var(--vd-vortex-duration, 4.8s) linear infinite;
    animation-delay: var(--vd-vortex-delay, 0s);
    animation-direction: var(--vd-vortex-direction, normal);
}

.vd-vortex-texture,
.vd-lupa-texture {
    opacity: var(--vd-vortex-opacity);
}

/* Curvas suaves mantienen perceptible el giro incluso sobre cielos uniformes.
   También son el respaldo cuando el navegador no permite leer el canvas. */
.vd-effect-remolino .vd-lens::after {
    content: '';
    opacity: var(--vd-lens-alpha);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M50 50C35 40 38 21 57 20C87 18 99 57 77 80C45 111 0 85 2 47'/%3E%3Cpath d='M50 50C65 60 62 79 43 80C13 82 1 43 23 20C55-11 100 15 98 53'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.vd-lenses-overlay.vd-effect-lupa .vd-lens {
    background: rgba(210, 227, 240, var(--vd-lens-alpha));
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.72), 0 2px 7px rgba(20,42,67,.18);
}

.vd-effect-lupa .vd-lens::after {
    content: '';
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.72), inset -3px -4px 7px rgba(38,76,112,.22);
    background: radial-gradient(ellipse at 30% 22%, rgba(255,255,255,.5), transparent 43%);
    opacity: var(--vd-lens-alpha);
}

.vd-lenses-overlay.vd-effect-burbuja .vd-lens {
    background: radial-gradient(ellipse at 29% 22%, rgba(255,255,255,.88) 0%, rgba(255,255,255,.3) 9%, transparent 23%),
        radial-gradient(ellipse at 74% 80%, rgba(145,212,255,.48), transparent 48%),
        radial-gradient(circle, rgba(210,237,247,.08) 48%, rgba(238,191,221,.42) 78%, rgba(218,242,255,.75) 97%);
    opacity: var(--vd-lens-alpha);
    -webkit-backdrop-filter: blur(1.5px) saturate(1.25);
    backdrop-filter: blur(1.5px) saturate(1.25);
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.8), inset -3px -4px 9px rgba(80,142,181,.28), 0 2px 6px rgba(30,75,104,.12);
}

.vd-lenses-overlay.vd-lenses-paused .vd-lens,
.vd-lenses-overlay.vd-lenses-paused .vd-vortex-texture,
.vd-lenses-overlay.vd-lenses-paused .vd-lens::after {
    animation-play-state: paused;
}

.vd-lenses-image {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    user-select: none;
}

/* El visor conserva los controles sobre la protección sin interceptar clics. */
.vd-lenses-host > button.position-absolute {
    z-index: 2;
}

@keyframes vd-lens-drift {
    0%, 100% { transform: translate(var(--vd-left, 0px), var(--vd-top, 0px)); }
    25% { transform: translate(var(--vd-right, 0px), var(--vd-bottom, 0px)); }
    50% { transform: translate(var(--vd-right, 0px), var(--vd-top, 0px)); }
    75% { transform: translate(var(--vd-left, 0px), var(--vd-bottom, 0px)); }
}

@keyframes vd-vortex-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.vd-lenses-overlay.vd-lenses-js-motion .vd-lens,
.vd-lenses-overlay.vd-lenses-js-motion .vd-vortex-texture,
.vd-lenses-overlay.vd-lenses-js-motion .vd-lens::after {
    animation: none !important;
    -webkit-animation: none !important;
}

.vd-lenses-overlay.vd-lenses-js-motion.vd-effect-remolino .vd-lens::after {
    transform: rotate(var(--vd-vortex-angle, 0deg));
    -webkit-transform: rotate(var(--vd-vortex-angle, 0deg));
}

