/* Fondo oscuro del popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Contenedor del popup */
.popup-content {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Imagen dentro del popup */
.popup-img {
    width: 100%;
    height: auto;
    max-height: 90vh; /* limita la altura sin recortar */
    object-fit: contain; /* mantiene proporción sin cortar */
}

/* Botón de cierre */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    font-size: 24px;
    line-height: 1;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 2;
}
.close-btn:hover {
    background: rgba(0,0,0,0.8);
}

/* Mostrar el popup activo */
.popup-overlay.active {
    visibility: visible;
    opacity: 1;
}
