/* --- Variáveis e Estilos Gerais --- */

:root {
    /* Variáveis de cores */
    --primary-color: #2b7af0;
    --secondary-color: #f0f0f0;
    --text-color: #333;
    --light-text: #666;
    --border-color: #ccc;
    --background-color: #f9f9f9;
    --card-background: #fff;
    --dark-details: #2e3032;
}

* {
    /* Reset */
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* Font */
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background-color: #fff;
    padding: 20px 0; /* Ajustado para centralização */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    
    /* Centraliza o logo */
    display: flex;
    justify-content: center;
}

.header img {
    /* CORREÇÃO: Limita o tamanho do logo no cabeçalho */
    max-width: 180px; 
    height: auto; 
    display: block; 
}

.header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* --- Estilo das Seções --- */

.product-section,
.calculator-section,
.table-section,
.contact-form-section {
    /* Estilo do card */
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

h2,
h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 20px;
}


/* --- Seção do Produto --- */

.product-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .product-section {
        /* Layout*/
        flex-direction: row;
    }
}

.product-images {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.main-image img {
    width: 100%;
    height: auto;
    cursor: pointer;
}

.main-image {
    background-color: var(--secondary-color);
    min-height: 250px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.thumbnail {
    background-color: var(--secondary-color);
    width: 80px;
    height: 80px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    cursor: pointer;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.product-info {
    flex: 2;
}

.product-description {
    color: var(--light-text);
    margin-bottom: 20px;
}

.spec-group {
    margin-bottom: 20px;
}

.spec-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.spec-item {
    /* Estilo dos botões  */
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.spec-item.selected {
    /* Estilo para o item */
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.spec-item:hover {
    background-color: var(--dark-details);
    color: white;
    border-color: var(--dark-details);
}

.product-info ul {
    list-style: none;
}

.product-info ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.bullet-point {
    width: 6px;
    height: 6px;
    background-color: var(--dark-details);
    border-radius: 50%;
    display: inline-block;
}

.buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--dark-details);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* --- Seções com Título Primário --- */

.calculator-section h3,
.table-section h3,
.contact-form-section h3 {
    /* Estilo para cabeçalhos  */
    color: #fff;
    background-color: var(--primary-color);
    padding: 15px 30px;
    margin: -30px -30px 20px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-size: 1.25rem;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .calculator-form {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-end;
    }
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
}

.form-group.full-width {
    flex: 100%;
}

.btn-full {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    padding: 15px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.btn-full:hover {
    background-color: var(--dark-details);
}

/* --- Seção de Tabela --- */

.table-section table {
    /* Estilo da tabela para ocupar toda a largura */
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table-section th,
.table-section td {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    border-right: none;
    border-left: none;
    text-align: left;
}

.table-section th {
    background-color: #f5f5f5;
    font-weight: 500;
    color: #6a6a6a;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.table-section th:first-child {
    border-top-left-radius: 8px;
}

.table-section th:last-child {
    border-top-right-radius: 8px;
}

.table-section td {
    color: #4a4a4a;
    font-size: 14px;
}

.table-section tr {
    border-top: none;
}

.table-section tr:last-child td {
    border-bottom: none;
}

.table-section .note {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-top: 20px;
}

/* --- Seção do Formulário --- */

.contact-form-section .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form-section .form-group {
    flex: 1;
}

@media (max-width: 500px) {
    .contact-form-section .form-row {
        flex-direction: column;
    }
}

.btn-full-width {
    width: 100%;
    padding: 15px;
    font-weight: 500;
    background-color: var(--primary-color);
    color: white;
    transition: background-color 0.3s ease;
}

.btn-full-width:hover {
    background-color: var(--dark-details);
}

/* --- Footer --- */

.footer {
    /* Estilo do rodapé */
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
    }
}

.footer-left img {
    /* CORREÇÃO: Limita o tamanho do logo no footer */
    max-width: 120px; 
    height: auto; 
    margin-bottom: 10px; 
    display: block; 
}

.footer-nav a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
}

.footer-nav a:hover {
    text-decoration: underline;
}

/* --- Seção de Resultado Calculadora --- */

.result-section {
    /* Estilo da seção de resultados */
    margin-top: 20px;
    padding: 20px;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.result-section.hidden {
    /* Esconde a seção de resultados */
    display: none;
}

.result-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 20px;
}

.result-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
}

@media (min-width: 768px) {
    .result-cards {
        flex-direction: row;
        justify-content: space-around;
    }
}

.result-card {
    flex: 1;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
}

.result-card .result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

.result-card p {
    font-size: 1rem;
    color: var(--light-text);
}

.result-note {
    font-size: 0.85rem;
    color: var(--light-text);
    text-align: center;
    margin-top: 20px;
}


/* --- Pop-up de Imagem (Modal Padrão) --- */

.modal {
    /* Estilo do modal, oculto por padrão */
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    justify-content: center;
    align-items: center;
}

.modal.visible {
    /* Classe para o modal visível */
    display: flex;
}

/* --- Modal de Imagem (Detalhes Antigos) --- */
.modal-content {
    /* Tamanho imagem modal */
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.modal-close,
.prev,
.next {
    /* Botões de controle do modal */
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.prev,
.next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    padding: 16px;
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.modal-close:hover,
.prev:hover,
.next:hover {
    color: #bbb;
}

/* --- NOVO: Modal de Sucesso do Formulário --- */

.modal-content-success {
    background-color: var(--card-background);
    margin: 15% auto; /* Centraliza verticalmente */
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px; /* Limita a largura do pop-up */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative; /* Para posicionar o botão de fechar */
}

.success-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.modal-content-success h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 1.5rem;
    /* Ajusta o padding para não conflitar com o estilo de h3 de seção */
    padding: 0; 
    background-color: transparent;
    margin: 0 auto 10px;
    border-radius: 0;
}

.modal-close-success {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close-success:hover {
    color: var(--dark-details);
}

.btn-close-modal {
    margin-top: 20px;
}

/* Cesar esteve aqui :) */