/* Product thumbnails enabled for click-to-zoom. */
img[data-product-image-zoom] {
    cursor: zoom-in;
}

img[data-product-image-zoom]:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 3px;
}

/* Native dialog provides focus containment and background isolation. */
.ry-image-zoom {
    position: fixed;
    inset: 0;
    width: fit-content;
    height: fit-content;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #fff;
}

.ry-image-zoom:not([open]) {
    display: none;
}

.ry-image-zoom::backdrop {
    background: rgba(15, 23, 42, 0.78);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.ry-image-zoom__panel {
    position: relative;
    box-sizing: border-box;
    min-width: 180px;
    padding: 48px 12px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.ry-image-zoom__close {
    position: absolute;
    top: 7px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
}

.ry-image-zoom__close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.ry-image-zoom__close:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

.ry-image-zoom__image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(1200px, calc(100vw - 58px));
    max-height: calc(100dvh - 110px);
    margin: 0 auto;
    border-radius: 4px;
    object-fit: contain;
    background: #fff;
}

.ry-image-zoom__image[hidden],
.ry-image-zoom__status[hidden] {
    display: none;
}

.ry-image-zoom__status {
    box-sizing: border-box;
    max-width: calc(100vw - 70px);
    margin: 0;
    padding: 36px 20px;
    color: #475569;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

html.ry-image-zoom-open,
html.ry-image-zoom-open body {
    overflow: hidden !important;
}

@media (max-width: 575px) {
    .ry-image-zoom {
        max-width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
    }

    .ry-image-zoom__panel {
        padding: 48px 8px 8px;
        border-radius: 10px;
    }

    .ry-image-zoom__image {
        max-width: calc(100vw - 34px);
        max-height: calc(100dvh - 90px);
    }
}

@media print {
    .ry-image-zoom {
        display: none !important;
    }
}