/* Product detail — hover/touch zoom + lightbox */

.sf-pdp-zoom {
    position: relative;
    width: 100%;
}

.sf-pdp-zoom__frame {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: zoom-in;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    aspect-ratio: 1 / 1;
    background: #fff;
}

.sf-pdp-zoom__img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.2s ease-out;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}

.sf-pdp-zoom__frame.is-zoomed .sf-pdp-zoom__img {
    transition: transform 0.12s ease-out;
}

.sf-pdp-zoom__frame.is-zoomed {
    cursor: crosshair;
}

@media (hover: none) and (pointer: coarse) {
    .sf-pdp-zoom__frame.is-touch-zoom {
        cursor: grab;
    }

    .sf-pdp-zoom__frame.is-touch-zoom.is-panning {
        cursor: grabbing;
    }
}

/* Lightbox */
.sf-pdp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.sf-pdp-lightbox[hidden] {
    display: none !important;
}

.sf-pdp-lightbox.is-open {
    display: flex;
}

.sf-pdp-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: zoom-out;
}

.sf-pdp-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(96vw, 920px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}

.sf-pdp-lightbox__close {
    position: absolute;
    top: -0.25rem;
    right: 0;
    z-index: 2;
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sf-pdp-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.sf-pdp-lightbox__stage {
    position: relative;
    width: 100%;
    max-height: calc(92vh - 3rem);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
}

.sf-pdp-lightbox__stage.is-panning {
    cursor: grabbing;
}

.sf-pdp-lightbox__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.15s ease-out;
    will-change: transform;
    user-select: none;
}

.sf-pdp-lightbox__hint {
    pointer-events: none;
    text-align: center;
}

body.sf-pdp-lightbox-open {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .sf-pdp-lightbox {
        padding: 0.5rem;
    }

    .sf-pdp-lightbox__dialog {
        width: 100%;
    }

    .sf-pdp-lightbox__stage {
        max-height: calc(88vh - 2.5rem);
    }

    .sf-pdp-lightbox__close {
        top: 0.25rem;
        right: 0.25rem;
        background: rgba(0, 0, 0, 0.45);
    }
}
