/* =========================================
   Design System & Tokens
========================================= */
:root {
    /* Contraste conferido contra branco pelo criterio WCAG AA (4.5:1). O verde
       e o cinza originais reprovavam (2.87 e 3.48) - texto branco sobre o verde
       antigo ficava dificil de ler justamente nos botoes de acao. Escurecidos o
       minimo necessario, mantendo a matiz. */
    --primary-color: #1e874a;    /* Verde Fresco - era #27ae60, contraste 4.55 */
    --primary-dark: #196f3d;
    --secondary-color: #f2994a;  /* Laranja (Cenoura) - preservado, ver abaixo */
    --bg-color: #f9fbf9;
    --text-dark: #2c3e50;
    --text-light: #6d7979;       /* era #7f8c8d, contraste 4.51 */
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow: 0 8px 32px rgba(39, 174, 96, 0.08);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

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

/* =========================================
   Typography & Utilities
========================================= */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

.subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hidden {
    display: none !important;
}

/* Botões */
.btn-primary, .btn-large, .btn-whatsapp {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    background: var(--secondary-color);
    /* Texto escuro em vez de branco. Escurecer o laranja para caber texto
       branco daria #a56832 - um marrom que apaga a paleta. Trocando so a cor da
       letra, o laranja continua vivo e o contraste vai de 2.23 para 4.93. */
    color: var(--text-dark);
}

.btn-whatsapp {
    background: #25D366;
    width: 100%;
    margin-top: 20px;
    font-size: 1.1rem;
}

.btn-primary:hover, .btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    filter: brightness(1.1);
}

.btn-whatsapp:hover {
    background: #1ebe57;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

/* =========================================
   Header (Glassmorphism)
========================================= */
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 15px 0;
}

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

.logo {
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.logo span {
    color: var(--secondary-color);
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    margin-left: 20px;
    transition: color 0.3s;
}

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

/* =========================================
   Hero Section
========================================= */
#hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #1b2b1f; /* cor de espera ate a foto pintar */
}

/* A foto do hero saiu do `background: url()` e virou <img> no HTML.
   Imagem de fundo em CSS so e descoberta depois que o navegador baixa e
   processa a folha de estilo - tarde demais para o elemento de LCP. */
.hero-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 600px;
    animation: fadeInUp 1s ease;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* =========================================
   Vitrine (Cards)
========================================= */
#vitrine {
    padding: 80px 20px;
}

.grid-produtos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card-produto {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card-produto:hover {
    transform: translateY(-10px);
}

.card-produto img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-info {
    padding: 20px;
}

.card-info h4 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

/* =========================================
   B2B Section
========================================= */
#b2b {
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    gap: 40px;
}

.badge {
    background: var(--secondary-color);
    color: var(--text-dark); /* herdava branco: contraste 2.23 sobre o laranja */
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: inline-block;
}

.b2b-text h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.b2b-text ul {
    list-style: none;
    margin-top: 20px;
}

.b2b-text ul li {
    margin-bottom: 10px;
    font-weight: 600;
}

.b2b-cta {
    text-align: center;
    min-width: 250px;
}

.b2b-cta p {
    margin-bottom: 10px;
    font-weight: 600;
}

/* =========================================
   Pedido / Calculadora
========================================= */
#pedido {
    padding: 80px 20px;
}

.pedido-box {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.calculadora-frete label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.calculadora-frete input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

.calculadora-frete input[type="text"]:focus {
    border-color: var(--primary-color);
}

.modo-pedido {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-modo {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: var(--white);
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
}

.btn-modo:hover {
    border-color: var(--primary-color);
}

.btn-modo.ativo {
    border-color: var(--primary-color);
    background-color: #f4fbf6;
    color: var(--primary-dark);
}

.cep-busca {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.cep-busca input {
    flex: 1;
}

.cep-busca button {
    flex-shrink: 0;
    padding: 15px 20px;
}

#cep-status {
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding: 10px 15px;
    border-radius: 8px;
}

.cep-status-aviso {
    background-color: #fff3cd;
    color: #856404;
}

.cep-status-erro {
    background-color: #fdecea;
    color: #b3261e;
}

.aviso-taxa-a-parte {
    font-size: 0.85rem;
    color: var(--text-dark);
    opacity: 0.75;
    margin-top: 10px;
}

.alerta-horario {
    background-color: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    border-left: 4px solid #ffeeba;
}

#resultado-frete {
    margin-top: 25px;
    padding: 20px;
    background: #f4fbf6;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

#resultado-frete h4 {
    color: var(--primary-dark);
    margin-bottom: 5px;
}

/* =========================================
   Localização
========================================= */
#localizacao {
    padding: 80px 20px;
}

.localizacao-content {
    display: flex;
    align-items: stretch;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.mapa-wrapper {
    flex: 1 1 60%;
    min-height: 350px;
}

.mapa-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border: 0;
    display: block;
}

.localizacao-info {
    flex: 1 1 40%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.localizacao-info h4 {
    font-size: 1.6rem;
    color: var(--primary-dark);
}

.localizacao-info a:not(.btn-primary) {
    color: var(--primary-color);
    font-weight: 600;
}

.localizacao-info a.btn-primary {
    align-self: flex-start;
    margin-top: 10px;
}

/* =========================================
   WhatsApp Flutuante
========================================= */
.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* =========================================
   Footer
========================================= */
footer {
    background: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 40px 20px;
}

footer a {
    color: var(--white);
    font-weight: 600;
}

footer p {
    margin-top: 8px;
}

/* =========================================
   Animations & Responsive
========================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .header-content nav {
        display: none; /* Em um projeto real, faríamos um menu hamburger */
    }
    .hero-content h2 {
        font-size: 2.5rem;
    }
    .glass-panel {
        flex-direction: column;
        text-align: center;
    }
    .b2b-text ul li {
        text-align: left;
    }
    .localizacao-content {
        flex-direction: column;
    }
    .mapa-wrapper {
        min-height: 250px;
    }
    .mapa-wrapper iframe {
        min-height: 250px;
    }
    .whatsapp-float {
        width: 52px;
        height: 52px;
        right: 16px;
        bottom: 16px;
    }
}
