/* Engagyo click-to-magnify overlay */

html.eg-magnifier-lock,
html.eg-magnifier-lock body {
    overflow: hidden;
}

img.eg-magnify {
    cursor: zoom-in;
}

.eg-magnifier {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.eg-magnifier--open {
    display: flex;
}

.eg-magnifier__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}

.eg-magnifier__content {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: egMagnifierZoomIn 0.28s ease;
}

@keyframes egMagnifierZoomIn {
    from {
        opacity: 0;
        transform: scale(0.86);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.eg-magnifier__img {
    display: block;
    max-width: 92vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    cursor: default;
}

.eg-magnifier__close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.eg-magnifier__close:hover,
.eg-magnifier__close:focus {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.08);
    outline: none;
}

.eg-magnifier__caption {
    margin-top: 14px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    max-width: min(600px, 90vw);
    line-height: 1.5;
}

@media (max-width: 640px) {
    .eg-magnifier {
        padding: 16px;
    }

    .eg-magnifier__close {
        top: -40px;
        right: 0;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .eg-magnifier__img {
        max-height: 74vh;
    }
}
