/* ======================== Popup-Start =========================== */

.popup {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    overflow: auto;
    z-index: 99999;
    padding: 40px 20px;
    box-sizing: border-box;
    animation: popupFadeIn .35s ease;
}

.popup.show {
    display: flex;
}

@keyframes popupFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---------- Popup image ---------- */
.popup-content {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .6);
    z-index: 100000;
    position: relative;
    animation: popupZoomIn .4s cubic-bezier(.25, .8, .25, 1);
}

@keyframes popupZoomIn {
    from { transform: scale(.85); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* ---------- Close button ---------- */
.popup .close {
    position: fixed;
    top: 24px;
    right: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-radius: 50%;
    cursor: pointer;
    z-index: 100001;
    transition: background .3s ease, transform .3s ease;
    user-select: none;
}

.popup .close:hover {
    background: #e77913;
    transform: rotate(90deg);
}

/* ---------- Responsive ---------- */
@media (max-width: 791px) {
    .popup {
        padding: 20px 12px;
    }
    .popup-content {
        max-width: 100%;
        max-height: 85vh;
    }
    .popup .close {
        top: 14px;
        right: 14px;
        width: 42px;
        height: 42px;
        font-size: 26px;
    }
}

/* ======================== Popup-End =========================== */