.static-product-image-viewer {
    width: min(96vw, 1040px);
    height: min(94vh, 900px);
    max-height: 94vh;
    border-radius: 1rem;
    color: #fff;
    background: #111318;
}

.static-product-image-viewer::backdrop {
    background: rgb(0 0 0 / 78%);
    backdrop-filter: blur(5px);
}

.static-product-image-viewer-root {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
}

.static-product-image-viewer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem 0.85rem;
    border-bottom: 1px solid rgb(255 255 255 / 11%);
}

.static-product-image-viewer-eyebrow {
    display: block;
    margin-bottom: 0.15rem;
    color: #9aa4b6;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.static-product-image-viewer-header p {
    margin: 0;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.static-product-image-viewer-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.35rem;
    color: #c6cedb;
    font-size: 0.74rem;
}

.static-product-image-viewer-hint .material-symbols-rounded {
    font-size: 1.05rem;
}

.static-product-image-viewer-close,
.static-product-image-viewer-arrow {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    color: #fff;
    background: rgb(255 255 255 / 10%);
    cursor: pointer;
}

.static-product-image-viewer-close {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 50%;
}

.static-product-image-viewer-stage {
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.static-product-image-viewer-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
}

.static-product-image-viewer-track::-webkit-scrollbar {
    display: none;
}

.static-product-image-viewer-slide {
    display: grid;
    place-items: center;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 0.8rem 4rem 1.6rem;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    box-sizing: border-box;
}

.static-product-image-viewer-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;
}

.static-product-image-viewer-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    transform: translateY(-50%);
}

.static-product-image-viewer-arrow.is-previous {
    left: 0.75rem;
}

.static-product-image-viewer-arrow.is-next {
    right: 0.75rem;
}

.static-product-image-viewer-arrow:disabled {
    opacity: 0.22;
    cursor: default;
}

.static-product-image-viewer-count {
    position: absolute;
    right: 1rem;
    bottom: 0.75rem;
    z-index: 2;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    color: #fff;
    background: rgb(0 0 0 / 58%);
    font-size: 0.72rem;
    font-weight: 800;
}

.static-product-image-viewer-thumbnails {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 5rem;
    padding: 0.65rem 1rem 0.9rem;
    overflow-x: auto;
    border-top: 1px solid rgb(255 255 255 / 11%);
    scrollbar-width: thin;
}

.static-product-image-viewer-thumbnails[hidden] {
    display: none;
}

.static-product-image-viewer-thumbnail {
    flex: 0 0 3.6rem;
    width: 3.6rem;
    height: 3.6rem;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 0.8rem;
    background: #20242c;
    opacity: 0.58;
    cursor: pointer;
}

.static-product-image-viewer-thumbnail.is-active {
    border-color: #fff;
    opacity: 1;
}

.static-product-image-viewer-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.static-product-image-viewer-close:focus-visible,
.static-product-image-viewer-arrow:focus-visible,
.static-product-image-viewer-thumbnail:focus-visible,
.static-product-image-viewer-track:focus-visible {
    outline: 3px solid #8ec5ff;
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .static-product-image-viewer {
        height: 100dvh;
        max-height: none;
        border-radius: 0;
    }

    .static-product-image-viewer-header {
        padding: max(0.8rem, env(safe-area-inset-top)) 0.85rem 0.75rem;
    }

    .static-product-image-viewer-header p {
        max-width: 72vw;
    }

    .static-product-image-viewer-slide {
        padding: 0.55rem 0.6rem 1.5rem;
    }

    .static-product-image-viewer-arrow {
        top: auto;
        bottom: 0.6rem;
        width: 2.55rem;
        height: 2.55rem;
        background: rgb(0 0 0 / 58%);
    }

    .static-product-image-viewer-arrow.is-previous {
        left: 0.65rem;
    }

    .static-product-image-viewer-arrow.is-next {
        right: 0.65rem;
    }

    .static-product-image-viewer-thumbnails {
        justify-content: flex-start;
        padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .static-product-image-viewer-track {
        scroll-behavior: auto;
    }
}
