[data-product-gallery] .script-media-panel img {
    cursor: zoom-in;
}

.product-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem 5.5rem;
    background: rgba(2, 3, 10, 0.94);
    backdrop-filter: blur(12px);
}

.product-gallery-lightbox.is-open {
    display: flex;
}

.product-gallery-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(1500px, 100%);
    height: min(900px, calc(100vh - 4rem));
}

.product-gallery-image {
    display: block;
    max-width: 100%;
    max-height: calc(100% - 3.5rem);
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #020617;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
}

.product-gallery-caption {
    margin: 1rem 0 0;
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.45;
    text-align: center;
}

.product-gallery-counter {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(2, 6, 23, 0.78);
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.product-gallery-close,
.product-gallery-arrow {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.75rem;
    height: 3.75rem;
    border: 1px solid rgba(232, 121, 249, 0.48);
    border-radius: 0.75rem;
    color: #fff;
    background: linear-gradient(145deg, rgba(126, 34, 206, 0.92), rgba(30, 41, 59, 0.96));
    box-shadow: 0 0 28px rgba(168, 85, 247, 0.28), 0 14px 30px rgba(0, 0, 0, 0.38);
    font: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
}

.product-gallery-close:hover,
.product-gallery-arrow:hover {
    transform: scale(1.06);
    filter: brightness(1.12);
    border-color: rgba(240, 171, 252, 0.85);
}

.product-gallery-close:focus-visible,
.product-gallery-arrow:focus-visible {
    outline: 3px solid #67e8f9;
    outline-offset: 3px;
}

.product-gallery-close {
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2;
    font-size: 1.7rem;
    line-height: 1;
}

.product-gallery-arrow {
    top: 50%;
    transform: translateY(-50%);
}

.product-gallery-arrow:hover {
    transform: translateY(-50%) scale(1.06);
}

.product-gallery-arrow.is-prev {
    left: 1.25rem;
}

.product-gallery-arrow.is-next {
    right: 1.25rem;
}

.product-gallery-arrow svg {
    width: 1.65rem;
    height: 1.65rem;
}

body.has-product-gallery-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .product-gallery-lightbox {
        padding: 4.75rem 0.75rem 1rem;
    }

    .product-gallery-stage {
        height: calc(100vh - 5.75rem);
    }

    .product-gallery-image {
        max-height: calc(100% - 6rem);
    }

    .product-gallery-close,
    .product-gallery-arrow {
        width: 3.1rem;
        height: 3.1rem;
    }

    .product-gallery-close {
        top: 0.8rem;
        right: 0.8rem;
    }

    .product-gallery-counter {
        top: 0.9rem;
        left: 0.8rem;
    }

    .product-gallery-arrow {
        top: auto;
        bottom: 1rem;
        transform: none;
    }

    .product-gallery-arrow:hover {
        transform: scale(1.06);
    }

    .product-gallery-arrow.is-prev {
        left: calc(50% - 4rem);
    }

    .product-gallery-arrow.is-next {
        right: calc(50% - 4rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-gallery-close,
    .product-gallery-arrow {
        transition: none;
    }
}
