/* Modern popup overlay */
#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeInOverlay 0.4s ease;
}

/* Popup container */
#popup-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    animation: scaleUp 0.3s ease forwards;
}

/* Image styling */
#popup-box img {
    display: block;
    width: 100%;
    height: auto;
    border-bottom: 3px solid var(--brand-red, #ee1d24);
    object-fit: contain;
}

/* Close button */
.close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 22px;
    cursor: pointer;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--brand-red, #ee1d24);
}

/* Animation */
@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

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

/* Mobile responsive */
@media (max-width: 480px) {
    #popup-box {
        max-width: 90%;
        border-radius: 12px;
    }

    .close-btn {
        font-size: 20px;
    }
}

#popup-box img {
    animation: fadeInImage 0.5s ease-out;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(1.05);
    }

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