/* ---------------------------------- */
/* 1. Variáveis Globais e Reset       */
/* ---------------------------------- */

:root {
    --primary-color: #FDDD03;
    --primary-hover: #e4deb9;
    --text-dark: #000968;
    --text-light: #212121;
    --bg-light-gray: #F9FAFD;
    --bg-white: #FFFFFF;
    --border-color: #C8D5DC;
    --container-width: 1140px;
    --base-padding: 20px;
    --base-border-radius: 5px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px; 
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-white);
}

/* ---------------------------------- */
/* 2. Utilitários e Estilos Gerais    */
/* ---------------------------------- */

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.narrow-content {
    max-width: 800px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

h1, h2, h3 {
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.8rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

p {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-block;
    font-weight: 600;
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: var(--base-border-radius);
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease, opacity 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-dark);
    font-weight: 700;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.btn:disabled {
    background-color: var(--border-color);
    color: var(--text-light);
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.btn:disabled:hover {
    background-color: var(--border-color);
    color: var(--text-light);
    transform: none;
}


/* ---------------------------------- */
/* 3. Estilos por Seção (Mobile-First) */
/* ---------------------------------- */

/* 1. Header */
.site-header {
    background-color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* CORREÇÃO: Sintaxe CSS inválida (aninhada) */
.site-header .logo {
    display: block;
    z-index: 1010;
    text-decoration: none;
    flex-shrink: 0;
}

.site-header .logo .logo-image {
    display: block;
    height: 50px; /* Altura controlada (era 80px) */
    width: auto;  /* Largura automática */
    max-width: 100%; 
}
/* FIM DA CORREÇÃO */


.site-header .main-nav {
    z-index: 1015; /* CORREÇÃO: z-index para ficar acima do logo */
}

.site-header .main-nav ul {
    display: flex;
    gap: 1rem;
}

.site-header .main-nav a {
    font-weight: 500;
    color: var(--text-light);
    padding: 0.5rem;
    display: block;
}
.site-header .main-nav a:hover {
    color: var(--primary-color);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1020; /* Acima de tudo */
    width: 40px;
    height: 40px;
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--bg-light-gray);
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1012; 
}


/* 2. Seção Hero */
.hero-section {
    background-color: var(--bg-light-gray);
    padding: 5rem 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-content {
    text-align: center;
}

.hero-section h1 {
    color: var(--text-dark);
}

.hero-section .subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--base-border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}


/* 3. Seção de Produtos */
.product-section {
    padding: 5rem 0;
    background-color: var(--text-dark);
}

.product-section .section-title {
    color: var(--primary-color);
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* CORREÇÃO: Sintaxe CSS inválida (aninhada) */
.category-card {
    color: var(--bg-light-gray);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden; 
    border-radius: 0.70rem;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category-card .card-image {
    height: 150px; 
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--text-dark); 
}

.category-card .card-content {
    padding: 1.25rem;
}

.category-card .card-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.category-card .card-content p {
    color: var(--bg-light-gray);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
    height: 4.05rem; 
    overflow: hidden; 
}
/* FIM DA CORREÇÃO */


/* --- Regras de Imagens dos Produtos --- */
#cat-carteres  .card-image { background-image: url('../images/Carteres.jpg'); }
#cat-suportes  .card-image { background-image: url('../images/Suportes.jpg'); }
#cat-cambio    .card-image { background-image: url('../images/Cambio.png'); }
#cat-reparos   .card-image { background-image: url('../images/Reparos.jpg'); }
#cat-carcacas  .card-image { background-image: url('../images/Carcacas.jpg'); }
#cat-tampas    .card-image { background-image: url('../images/Tampas.jpg'); }
#cat-polias    .card-image { background-image: url('../images/Polias.jpg'); }
#cat-coletores .card-image { background-image: url('../images/Coletores.jpg'); }


/* 4. Seção de Benefícios */
.benefits-section {
    padding: 5rem 0;
    background-color: var(--bg-white);
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* CORREÇÃO: Sintaxe CSS inválida (aninhada) */
.benefit-card {
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--base-border-radius);
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease; 
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--primary-color);
}
/* FIM DA CORREÇÃO */

.benefit-card h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* 5. Seção Sobre */
.about-section {
    background-color: var(--bg-light-gray);
    padding: 5rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.about-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--text-dark);
    border-radius: var(--base-border-radius);
    max-height: 450px;
    height: 100%;
}

.about-image .about-logo-image {
    max-width: 450px;
    width: 100%;
    height: auto;
    margin: 0 auto;
}


.about-content h2 {
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-align: left;
}

.about-content .mission-subtitle {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

/* 6. Seção de Depoimentos */
.testimonials-section {
    padding: 5rem 0;
    background-color: var(--text-dark);
}

.testimonials-section .section-title {
    color: var(--primary-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.testimonials-grid blockquote {
    background-color: var(--bg-white);
    border-left: 5px solid var(--primary-color);
    border-radius: var(--base-border-radius);
    padding: 1.5rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.07);
}

.testimonials-grid blockquote p {
    font-style: italic;
    margin-bottom: 0;
}

/* 7. Seção de Contato (Formulário) */
.contact-section {
    background-color: var(--bg-light-gray);
    padding: 5rem 0;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--base-border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

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

.form-helper-text {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 0;
    text-align: center;
}

.form-group label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

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

.form-group textarea {
    resize: vertical; 
    min-height: 120px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 252, 0, 0.3);
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.consent-group {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem; 
    padding: 0 0.5rem;
}

.consent-group input[type="checkbox"] {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.2rem;
    accent-color: var(--text-dark); 
}

.consent-group label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 0;
    line-height: 1.4;
}

/* 7.5. Seção de Localização */
.location-section {
    padding: 5rem 0;
    background-color: var(--bg-white);
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.section-title-left {
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: left;
}
.subtitle-left {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    text-align: left;
}

.contact-block {
    display: grid;
    grid-template-columns: 30px 1fr; 
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.contact-block i {
    font-size: 24px;
    color: var(--text-dark);
    margin-top: 2px;
    text-align: center;
}

.contact-details h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.contact-details p,
.contact-details address,
.contact-details a {
    font-style: normal;
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
    text-decoration: none;
}

.contact-details a {
    color: var(--text-light);
    transition: all 0.2s ease;
}

.contact-details a:hover {
    color: var(--text-dark);
    text-decoration: underline;
}

.map-responsive-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%;
    border-radius: var(--base-border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.map-responsive-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* 8. Rodapé */
.site-footer-bottom {
    background-color: var(--text-dark);
    color: var(--bg-light-gray);
    padding: 2.5rem 0;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-socials a {
    color: var(--bg-white);
    font-size: 1.75rem;
    transition: all 0.2s ease;
}

.footer-socials a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.site-footer-bottom .copyright {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 0;
}

/* 8.5 Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 9, 104, 0.85);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    /* CORREÇÃO: Removido padding que cortava o modal */
    overflow-y: auto; /* Permite rolar em telas pequenas */
}

.modal-content {
    position: relative;
    background-color: var(--bg-white);
    border-radius: var(--base-border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    
    max-width: 900px;
    width: 95%; /* Garante responsividade */
    max-height: 90vh;
    overflow: hidden;
    margin: 20px 0; /* Garante espaço para o 'X' */
}

.modal-content img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: var(--text-dark);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    font-weight: bold;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    z-index: 2001;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--primary-hover);
    transform: scale(1.1);
}

[x-cloak] {
    display: none !important;
}

/* 9. Componentes AlpineJS (Firulas) */
.scroll-to-top-btn {
    position: fixed;
    /* CORREÇÃO: Movido para a esquerda para não sobrepor o reCaptcha */
    bottom: 20px;
    left: 20px;
    right: auto; 

    background-color: var(--primary-color);
    color: var(--text-dark);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    font-weight: 700;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 999;
    transition: all 0.3s ease-in-out;
}

.scroll-to-top-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
}

[x-transition:enter] { transition: all 0.3s ease-out; }
[x-transition:enter-start] { opacity: 0; transform: translateY(15px); }
[x-transition:enter-end] { opacity: 1; transform: translateY(0); }
[x-transition:leave] { transition: all 0.3s ease-in; }
[x-transition:leave-start] { opacity: 1; transform: translateY(0); }
[x-transition:leave-end] { opacity: 0; transform: translateY(15px); }


/* ---------------------------------- */
/* 10. Media Queries (Responsividade) */
/* ---------------------------------- */

@media (max-width: 767px) {
    
    .mobile-nav-toggle {
        display: block;
    }

    .mobile-menu-active .mobile-nav-overlay {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background-color: var(--bg-white);
        z-index: 1015; /* CORREÇÃO: Acima do logo (1010) */
        padding-top: 6rem;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .mobile-menu-active .main-nav {
        transform: translateX(0);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        align-items: flex-start;
    }
    
    .main-nav li {
        width: 100%;
    }
    
    .main-nav a {
        padding: 1rem 1.5rem;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.1rem;
        color: var(--text-dark);
    }
    .main-nav a:hover {
        background-color: var(--bg-light-gray);
        color: var(--text-dark); /* Manter a cor no hover */
    }
    
    .mobile-menu-active .mobile-nav-toggle .bar1 {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-active .mobile-nav-toggle .bar2 {
        opacity: 0;
    }
    .mobile-menu-active .mobile-nav-toggle .bar3 {
        transform: translateY(-8px) rotate(-45deg);
    }
}


@media (min-width: 768px) {
    
    h1 {
        font-size: 2.8rem;
    }
    h2 {
        font-size: 2.2rem;
    }

    /* CORREÇÃO: Tamanho do logo no tablet */
    .site-header .logo .logo-image {
        height: 55px; 
    }

    .site-header .main-nav ul {
        display: flex;
        flex-direction: row;
        gap: 1.5rem;
    }
    .site-header .main-nav a {
        padding: 0.5rem;
        border-bottom: none;
        color: var(--bg-light-gray);
    }
    .site-header .main-nav a:hover {
        background-color: transparent;
        color: var(--primary-color);
    }


    /* CORREÇÃO: Removido o bug do Hero quebrando */
    /* .hero-grid { ... } <-- Bloco removido daqui */

    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .benefits-grid {
        grid-template-columns: 1fr 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr 1.2fr;
        gap: 3rem;
    }
    .about-image {
        order: 1;
    }
    .about-content {
        order: 2;
    }
    .about-content h2 {
        font-size: 2.5rem;
    }

    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-form {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 2.5rem;
    }
    .contact-form .btn {
        width: 50%;
        margin: 0 auto;
    }

    .location-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: start;
    }
}


@media (min-width: 1024px) {
    
    h1 {
        font-size: 3.2rem;
    }
    h2 {
        font-size: 2.5rem;
    }

    /* CORREÇÃO: Tamanho do logo no desktop */
    .site-header .logo .logo-image {
        height: 60px;
    }
    
    .hero-section {
        padding: 8rem 0; 
    }
    .product-section,
    .benefits-section,
    .about-section,
    .testimonials-section,
    .contact-section,
    .location-section {
        padding: 7rem 0;
    }

    /* CORREÇÃO: Movido o hero-grid para o breakpoint correto */
    .hero-grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 3rem;
    }
    .hero-content {
        text-align: left;
        order: 1;
    }
    .hero-image {
        order: 2;
    }

    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .location-grid {
        grid-template-columns: 1fr 1.5fr; 
        gap: 4rem;
    }

    .section-title-left {
        font-size: 2.5rem;
    }
}

.form-feedback {
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-feedback div {
    padding: 1rem;
    border-radius: var(--base-border-radius);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.success-message {
    background-color: #f0fff4;
    color: #046b2f;
    border-color: #77dd77;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    border-color: #ef9a9a;
}