/**
 * VANE Product Zoom — inner-zoom (hover) + PhotoSwipe lightbox (click)
 *
 * Hover desktop: imagen se escala in-place dentro de su propio recuadro,
 * transform-origin sigue cursor, overflow:hidden recorta lo que se sale.
 * Click: abre PhotoSwipe v5 modal centrado fullscreen.
 */

/* ============================================================
   Gallery anchor — wraps each <img>
   ============================================================ */
.vane-gallery-link {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    cursor: default;
}

/* Hide cursor when hovering image — lens replaces it. Mobile keeps default. */
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
    .vane-gallery-link img {
        cursor: none;
    }
}

.vane-gallery-link:focus {
    outline: none;
}

.vane-gallery-link:focus-visible {
    outline: 2px solid var(--vane-accent, #000);
    outline-offset: 4px;
}

.vane-gallery-link img {
    display: block;
    height: auto;
    /* width inherits from .vane-gallery-item img (50% desktop / responsive mobile) */
}

/* ============================================================
   Magnifier lens — circular zoom following cursor
   ============================================================ */
.vane-gallery-lens {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.32),
        0 2px 6px rgba(0, 0, 0, 0.18),
        inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    background-repeat: no-repeat;
    background-color: #fafafa;
    opacity: 0;
    transition: opacity 180ms ease;
    z-index: 5;
    will-change: left, top, background-position;
}

@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
    .vane-gallery-link.is-zooming .vane-gallery-lens {
        opacity: 1;
    }
    .vane-gallery-link.is-zooming {
        cursor: none; /* lens replaces cursor */
    }
}

/* Touch / coarse / small screens — no inner zoom, just tap-to-modal */
@media (max-width: 900px), (hover: none), (pointer: coarse) {
    .vane-gallery-link {
        cursor: pointer;
    }
}

/* ============================================================
   Mobile fullscreen hint icon (only first image)
   ============================================================ */
.vane-gallery-zoom-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 220ms ease, transform 220ms ease;
    z-index: 2;
}

.vane-gallery-zoom-hint svg {
    width: 18px;
    height: 18px;
    color: #111;
}

.vane-gallery-link[data-show-hint="true"] .vane-gallery-zoom-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Hide hint on desktop hover (inner zoom covers the corner) */
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
    .vane-gallery-link .vane-gallery-zoom-hint {
        opacity: 0 !important;
    }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .vane-gallery-link img,
    .vane-gallery-zoom-hint {
        transition: none;
    }
}

/* ============================================================
   PhotoSwipe v5 visual tweaks
   ============================================================ */
.pswp {
    --pswp-bg: #0a0a0a;
    --pswp-placeholder-bg: #1a1a1a;
    --pswp-icon-color: #ffffff;
    --pswp-icon-color-secondary: #4f4f4f;
    --pswp-icon-stroke-color: rgba(0, 0, 0, 0.4);
    --pswp-icon-stroke-width: 1px;
    --pswp-error-text-color: #f0f0f0;
}

.pswp__bg {
    background: rgba(10, 10, 10, 0.96) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.pswp__top-bar {
    padding-right: 12px;
}

.pswp__counter {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
    opacity: 0.85;
}

.pswp__button {
    transition: opacity 180ms ease, transform 180ms ease;
}

.pswp__button:hover {
    opacity: 1;
    transform: scale(1.06);
}
