.image-modal.image-modal--product {
    inset: 0;
    width: auto;
    height: auto;
    padding: 12px;
    background: rgba(16, 19, 23, .46);
}

.image-modal--product .image-modal-content {
    display: grid;
    justify-items: center;
    gap: 12px;
    width: auto;
    height: auto;
    max-width: 100%;
    cursor: default;
}

.image-modal-stage {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, auto) 48px;
    align-items: center;
    justify-items: center;
    gap: 14px;
    max-width: 100%;
    min-width: 0;
}

.image-modal--product .image-modal-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(82vh, calc(100vh - 96px));
    max-height: min(82dvh, calc(100dvh - 96px));
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .23);
}

.image-modal--product :is(.image-modal-prev, .image-modal-next) {
    position: static;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    transform: none;
    border: 1px solid rgba(25, 30, 36, .12);
    border-radius: 50%;
    background: #fff;
    color: #20252b;
    box-shadow: 0 3px 15px rgba(0, 0, 0, .18);
}

.image-modal--product :is(.image-modal-prev, .image-modal-next):hover {
    transform: none;
    background: #fce9e9;
    color: #b61016;
}

.image-modal-chevron {
    width: 10px;
    height: 10px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: translateX(-2px) rotate(-45deg);
}

.image-modal-prev .image-modal-chevron {
    transform: translateX(2px) rotate(135deg);
}

.image-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.image-modal--product .image-modal-close {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 108px;
    min-height: 44px;
    padding: 0 17px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 24px;
    background: #c5161c;
    color: #fff;
    font: 700 15px/1 Arial, sans-serif;
    box-shadow: 0 3px 15px rgba(0, 0, 0, .18);
}

.image-modal--product .image-modal-close:hover {
    opacity: 1;
    background: #a81116;
}

.image-modal-close span {
    font-size: 22px;
    font-weight: 400;
}

.image-modal--product button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.image-modal--product .image-modal-counter {
    position: static;
    transform: none;
    background: #242830;
    font: 400 13px/1.4 Arial, sans-serif;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
    .image-modal-stage {
        grid-template-columns: minmax(0, auto);
        gap: 0;
    }

    .image-modal--product :is(.image-modal-prev, .image-modal-next) {
        position: absolute;
        top: 50%;
        width: 44px;
        height: 44px;
        transform: translateY(-50%);
    }

    .image-modal--product .image-modal-prev { left: 6px; }
    .image-modal--product .image-modal-next { right: 6px; }
}
