/* --- DETALHE.CSS (COMPLETO) --- */

/* --- SEÇÃO PRINCIPAL --- */
.detail-section { 
    padding: 60px 0; 
    min-height: 60vh; 
}

/* Card do Produto (Esquerda: Imagem | Direita: Texto) */
.product-detail-card {
    display: flex; 
    gap: 40px; 
    background: #fff; 
    padding: 40px;
    border: 1px solid #eee; 
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.product-image { 
    flex: 1; 
    text-align: center; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.product-image img { 
    max-width: 100%; 
    max-height: 350px; 
    border-radius: 8px; 
    object-fit: contain; 
}

/* Informações do Produto */
.product-info { 
    flex: 1.2; 
}

.product-info h1 { 
    color: var(--theme-color); 
    font-size: 2.2em; 
    margin-bottom: 15px; 
}

.short-description { 
    font-size: 1.1em; 
    color: #666; 
    margin-bottom: 25px; 
}

.full-details { 
    font-size: 1em; 
    color: #444; 
    line-height: 1.8; 
    margin-bottom: 30px; 
    white-space: pre-line; 
}

.product-info h2 { 
    font-size: 1.3em; 
    margin-bottom: 10px; 
    color: #333; 
    border-bottom: 1px solid #eee; 
    padding-bottom: 10px; 
}

/* Botão de Compra Principal */
.btn-detail {
    width: 100%; 
    padding: 18px;
    background-color: var(--success-green);
    color: white; 
    border: none; 
    border-radius: 50px;
    font-size: 1.3em; 
    font-weight: 800;
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 15px;
    transition: 0.3s; 
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    margin-bottom: 15px;
}

.btn-detail:hover { 
    background-color: #1da851; 
    transform: translateY(-3px); 
}

.btn-back-catalog { 
    display: inline-block; 
    margin-top: 20px; 
    color: #777; 
    font-weight: 500; 
}

.btn-back-catalog:hover { 
    color: var(--theme-color); 
}

/* --- ESTILO DO MODAL (ATUALIZADO - ESPAÇAMENTO MELHORADO) --- */
.modal-overlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 2000;
    align-items: center; justify-content: center;
    backdrop-filter: blur(3px); /* Desfoque suave no fundo */
}

.modal-content {
    background-color: #fff;
    padding: 40px 30px; /* Aumentei o espaço interno */
    border-radius: 16px;
    width: 90%; max-width: 480px; /* Um pouco mais largo */
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute; top: 15px; right: 20px;
    font-size: 28px; color: #ccc; cursor: pointer;
    transition: 0.2s;
}
.close-modal:hover { color: var(--theme-color); }

.modal-content h2 { 
    text-align: center; 
    color: var(--theme-color); 
    margin-bottom: 8px; 
    font-weight: 800;
}

.modal-subtitle { 
    text-align: center; 
    color: #666; 
    font-size: 0.95em; 
    margin-bottom: 30px; /* Mais espaço antes do formulário */
}

/* Campos e Inputs */
.input-group { 
    margin-bottom: 25px; /* Mais espaço entre um campo e outro */
    text-align: left; 
}

.input-group label { 
    display: block; 
    font-weight: 700; 
    margin-bottom: 8px; /* Afasta o título do campo */
    color: #444; 
    font-size: 0.95em; 
}

.input-group input {
    width: 100%; 
    padding: 14px 15px; /* Campo mais alto e confortável */
    border: 2px solid #e0e0e0;
    border-radius: 10px; 
    font-size: 1.05em; /* Letra maior dentro do campo */
    outline: none; 
    transition: 0.3s;
    color: #333;
}

.input-group input:focus { 
    border-color: var(--theme-color); 
    background-color: #f9fbff; /* Fundo levemente azul ao clicar */
}

/* Mensagem de Erro */
.error-msg { 
    color: #d32f2f; /* Vermelho mais legível */
    font-size: 0.9em; 
    font-weight: 500;
    display: block; 
    margin-top: 8px; /* Descola do campo de cima */
    min-height: 20px; /* Evita que o layout pule */
    line-height: 1.4; /* Separa as linhas se o texto quebrar */
}

/* Aviso Importante */
.review-notice {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 25px;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 8px;
    border-left: 4px solid #333;
    line-height: 1.5; /* Melhora leitura do texto longo */
}

/* Botão Confirmar */
.btn-confirmar {
    width: 100%; 
    padding: 16px;
    background-color: var(--theme-color); 
    color: white;
    border: none; 
    border-radius: 50px;
    font-size: 1.1em; 
    font-weight: 800; 
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0, 68, 204, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-confirmar:hover { 
    background-color: var(--theme-dark); 
    transform: translateY(-2px);
}

/* Telas de Loading e Sucesso */
#step-loading, #step-success {
    padding: 20px 0;
    text-align: center;
}

.loader-circle {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--theme-color);
    border-radius: 50%;
    width: 50px; height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsivo */
@media (max-width: 900px) {
    .product-detail-card { 
        flex-direction: column; 
        padding: 20px; 
    }
    
    .modal-content { 
        padding: 30px 20px; 
        width: 95%; 
    }
}