.store-image-popup {
    position: fixed;
    inset: 0;
    z-index: 2147481000;
    display: grid;
    place-items: center;
    padding: clamp(18px, 4vw, 40px);
    background: rgba(15, 23, 42, .66);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
}

.store-image-popup.is-open {
    opacity: 1;
    visibility: visible;
}

.store-image-popup__dialog {
    position: relative;
    width: min(100%, var(--store-popup-width, 720px));
    max-height: calc(100dvh - clamp(36px, 8vw, 80px));
    line-height: 0;
    transform: translateY(22px) scale(.96);
    transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}

.store-image-popup.is-open .store-image-popup__dialog {
    transform: translateY(0) scale(1);
}

.store-image-popup__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - clamp(36px, 8vw, 80px));
    border-radius: clamp(14px, 2vw, 22px);
    object-fit: contain;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .32);
}

.store-image-popup__close {
    position: absolute;
    top: -16px;
    right: -16px;
    z-index: 2;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #111827;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .2);
    cursor: pointer;
    transition: transform .18s ease, background-color .18s ease;
}

.store-image-popup__close:hover {
    background: #f8fafc;
    transform: scale(1.06);
}

.store-image-popup__close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary-color, #2563eb) 35%, transparent);
    outline-offset: 3px;
}

body.store-popup-open {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .store-image-popup {
        padding: 16px;
    }

    .store-image-popup__dialog,
    .store-image-popup__image {
        max-height: calc(100dvh - 32px);
    }

    .store-image-popup__close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .store-image-popup,
    .store-image-popup__dialog {
        transition: none;
    }
}
