.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    position: relative;
    width: 90%;
    max-width: 600px;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.popup-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    color: #333;
    border: 2px solid #333;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.popup-close:hover,
.popup-close:focus {
    background: #333;
    color: #fff;
    transform: scale(1.08);
    outline: none;
}

@media (max-width: 480px) {
    .popup-close {
        top: -10px;
        right: -10px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}

.popup-overlay.show .popup-container {
    transform: scale(1);
}

.popup-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.popup-imagen {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    cursor: pointer;
}

@media (max-width: 768px) {
    .popup-container {
        width: 95%;
    }

    .popup-imagen {
        max-height: 80vh;
    }
}