/* Popup overlay - aparece automaticamente */
.popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(5px);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: scale(0.8) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    animation: slideIn 0.4s ease;
}

.popup-image {
    width: 100%;
    height: auto;
    max-width: 600px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: block;
}

.close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 100000;
}

.close-btn:hover {
    transform: rotate(90deg) scale(1.1);
    background: linear-gradient(135deg, #ee5a6f, #ff6b6b);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

/* Classe hidden para esconder o popup quando fechado */
.popup-overlay.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Bloqueia scroll quando popup está aberto */
body.popup-open {
    overflow: hidden !important;
}

@media (max-width: 768px) {
    .popup-image {
        max-width: 95%;
    }
    
    .close-btn {
        top: -10px;
        right: -10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}