/* Base do Modal - ESSENCIAL PARA TODOS OS MODAIS FUNCIONAREM */
.modal {
    display: none; /* Começa escondido */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn var(--transition-normal);
    padding: var(--spacing-md);
}

.modal.active {
    display: flex; /* Classe que torna o modal visível */
}

/* Modal de Produto - Estilos específicos que você já tinha */
.product-modal-new-content {
    background-color: white;
    max-width: 900px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 2rem;
    position: relative;
    border: 1px solid #ddd;
    animation: slideUp var(--transition-normal);
    
    /* ✨ PREPARAÇÃO: Garante que o overflow funcione ✨ */
    max-height: 95vh; /* Altura máxima no PC */
    overflow-y: auto; /* Barra de rolagem se precisar (no PC) */
}

.close-btn-new {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 10; /* Garante que fique acima de tudo */
}
.close-btn-new:hover {
    color: var(--primary-color);
}


.product-modal-new-body {
    display: flex;
    gap: 2.5rem;
}

.product-modal-image-wrapper {
    flex-basis: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-modal-image-wrapper img {
    max-width: 100%;
}

.product-modal-details-wrapper {
    flex-basis: 55%;
}

.modal-logo {
    width: 100px;
    margin-bottom: 1rem;
}

.product-modal-details-wrapper h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.product-modal-details-wrapper p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.price-container {
    margin-bottom: 1.5rem;
}

.product-price-new {
    font-size: 2.5rem;
    font-weight: bold;
}

.product-price-old {
    color: #999;
    text-decoration: line-through;
}

.quantity-selector-modal {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}
.quantity-selector-modal .quantity-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
}
.quantity-selector-modal .quantity-value {
    font-size: 1.5rem;
    padding: 0 1.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.action-buttons button {
    width: 100%;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.btn-add-cart {
    background-color: white;
    color: #007bff;
    border: 2px solid #007bff;
}

.action-buttons .add-to-cart-btn {
    display: inline-block; 
    text-decoration: none; 
    text-align: center;    
    padding: 12px 20px;
    border: 2px solid var(--primary-color);
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.action-buttons .add-to-cart-btn:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   ESTILOS DE SUPORTE (MANTIDOS)
   ======================================== */

.contact-email a {
    background-color: var(--gray-100);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
    transition: all var(--transition-normal);
}

.contact-email a:hover {
    background-color: var(--primary-color);
    color: white;
}

.faq-icon-wrapper {
    background-color: var(--gray-100);
    border-radius: var(--radius-lg);
    min-height: 200px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.faq-icon-wrapper i {
    font-size: 80px;
    color: var(--primary-color);
    opacity: 0.8;
}


/* ========================================
   ✨ CORREÇÃO RESPONSIVA DO MODAL (CELULAR) ✨
   ======================================== */
@media (max-width: 768px) {
    .product-modal-new-body {
        flex-direction: column;
        /* 1. Diminui o espaço no mobile */
        gap: 1.5rem; 
    }

    .product-modal-new-content {
        /* 2. Limita a altura do modal a 90% da tela */
        max-height: 90vh; 
        /* 3. ADICIONA A BARRA DE ROLAGEM se o conteúdo vazar */
        overflow-y: auto;
        /* 4. Ajusta o padding para o mobile */
        padding: 1.5rem; 
    }
    
    .faq-icon-wrapper {
        min-height: 150px; 
    }
    .faq-icon-wrapper i {
        font-size: 60px; 
    }
}