/* ============================================
   GÁSPERTINHO - Estilos Principais
   Arquivo único usado em TODO o sistema (site + admin usa admin-style.css
   além deste). Antes deste ajuste existiam DOIS arquivos de CSS divergentes
   (um na raiz do projeto e outro em /assets/css/) o que fazia a página
   inicial e as páginas internas ficarem com estilos diferentes e
   desatualizados entre si. Agora só existe esta fonte única de verdade.
   ============================================ */

:root {
    --color-dark-blue: #0B2E83;
    --color-yellow: #FFC107;
    --color-yellow-dark: #FFB300;
    --color-white: #FFFFFF;
    --color-gray-light: #F4F6F8;
    --color-whatsapp: #25D366;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --font-primary: 'Poppins', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Trava o scroll do body quando o menu mobile está aberto */
body.menu-open {
    overflow: hidden;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    line-height: 1.6;
    background: var(--color-white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}


/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-dark-blue);
}

.logo-highlight {
    color: var(--color-yellow);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-list a {
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-list a:hover {
    color: var(--color-yellow);
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-yellow);
    color: var(--color-dark-blue);
}

.btn-primary:hover {
    background: var(--color-yellow-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--color-gray-light);
    color: var(--color-dark-blue);
}

.btn-whatsapp {
    background: var(--color-whatsapp);
    color: white;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-outline {
    border: 2px solid var(--color-dark-blue);
    color: var(--color-dark-blue);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Hero Search */
.hero-search {
    padding: 8rem 0 4rem;
    background: linear-gradient(180deg, var(--color-gray-light) 0%, white 100%);
    text-align: center;
}

.hero-search h1 {
    font-size: 2.5rem;
    color: var(--color-dark-blue);
    margin-bottom: 2rem;
}

.search-box {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.search-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    position: relative;
    min-width: 250px;
}

.input-group svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
}

.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-family: var(--font-primary);
}

.input-group input:focus {
    outline: none;
    border-color: var(--color-yellow);
}

/* Filtros */
.filters-section {
    padding: 2rem 0;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.filters-bar {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-full);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-yellow);
    color: var(--color-dark-blue);
}

/* Distribuidores */
.distribuidores-section {
    padding: 3rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.dist-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.dist-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.dist-card-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.patrocinado {
    background: var(--color-yellow);
    color: var(--color-dark-blue);
}

.badge.verificado {
    background: #e3f2fd;
    color: var(--color-dark-blue);
}

.badge.aberto {
    background: #e8f5e9;
    color: #2e7d32;
}

.dist-card-body {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dist-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.dist-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.dist-info h3 {
    font-size: 1.25rem;
    color: var(--color-dark-blue);
    margin-bottom: 0.25rem;
}

.dist-marca {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.dist-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stars {
    color: var(--color-yellow);
}

.rating-value {
    font-weight: 600;
}

.rating-count {
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.dist-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.dist-payment {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.payment-icon {
    font-size: 0.8rem;
    background: var(--color-gray-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.dist-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dist-card-actions .btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

/* Mapa */
.map-container {
    position: sticky;
    top: 100px;
    height: 600px;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Distribuidor Detalhe */
.dist-detail-hero {
    padding-top: 80px;
}

.dist-banner {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.dist-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dist-info-card {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: -50px;
    position: relative;
}

.dist-logo-large {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.dist-logo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

.dist-details h1 {
    font-size: 2rem;
    color: var(--color-dark-blue);
    margin-bottom: 0.5rem;
}

.dist-content {
    padding: 3rem 0;
}

.dist-main {
    flex: 1;
}

.dist-section {
    margin-bottom: 3rem;
}

.dist-section h2 {
    font-size: 1.5rem;
    color: var(--color-dark-blue);
    margin-bottom: 1.5rem;
}

.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.produto-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}

.produto-img {
    height: 150px;
    overflow: hidden;
}

.produto-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.produto-info {
    padding: 1rem;
}

.produto-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.produto-preco {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark-blue);
    margin-top: 0.5rem;
}

.avaliacao-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.avaliacao-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.avaliacao-cliente {
    font-weight: 600;
}

.avaliacao-stars {
    color: var(--color-yellow);
}

.avaliacao-data {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.dist-sidebar {
    width: 350px;
}

.sidebar-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
    font-size: 1.2rem;
    color: var(--color-dark-blue);
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.sidebar-card .btn {
    width: 100%;
    margin-bottom: 0.5rem;
    justify-content: center;
}

.horario-list p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.payment-methods {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.payment-badge {
    padding: 0.5rem 1rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--color-yellow);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* WhatsApp Flutuante */
.floating-whatsapp {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--color-whatsapp);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 999;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* =========================================
   MENU MOBILE
   Antes: o menu só aparecia/sumia via JS mexendo em navMenu.style.display
   diretamente, sem transição, sem overlay e sem travar o scroll da página.
   Agora: tudo é controlado pela classe .active (JS só liga/desliga a
   classe), com animação, fundo escurecido e ícone de hambúrguer virando "X".
   ========================================= */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1201;
    position: relative;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--color-dark-blue);
    border-radius: 3px;
    transition: var(--transition-base, 0.3s ease);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 46, 131, 0.45);
    z-index: 1099;
    opacity: 0;
    transition: opacity var(--transition-base, 0.3s ease);
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(80vw, 320px);
        background: var(--color-white);
        padding: 6rem 2rem 2rem;
        box-shadow: var(--shadow-xl, -10px 0 25px rgba(0,0,0,0.15));
        z-index: 1100;
        transform: translateX(100%);
        transition: transform var(--transition-base, 0.3s ease);
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 1.25rem;
        width: 100%;
    }

    .nav-menu .nav-cta,
    .nav-menu .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
    .nav-overlay {
        display: none !important;
    }
}

/* Responsivo */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        position: relative;
        top: 0;
        height: 400px;
    }
    
    .dist-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-search h1 {
        font-size: 1.75rem;
    }
    
    .dist-info-card {
        flex-direction: column;
        text-align: center;
    }
    
    .dist-logo-large {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .search-form {
        flex-direction: column;
    }
    
    .dist-card-actions {
        flex-direction: column;
    }
    
    .dist-card-actions .btn {
        width: 100%;
    }
}