/* ========================================
   CONFIGURAÇÕES GLOBAIS E VARIÁVEIS
======================================== */

:root {
    /* Cores Principais */
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #25D366;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --white-color: #ffffff;
    
    /* Tipografia */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    /* Transições */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Melhorias para Touch em Mobile */
a, button {
    -webkit-tap-highlight-color: rgba(13, 110, 253, 0.3);
    touch-action: manipulation;
}

/* Prevenir zoom em inputs mobile */
input, select, textarea {
    font-size: 16px !important;
}

/* Scroll suave para mobile */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ========================================
   NAVBAR
======================================== */

.navbar {
    padding: 1rem 0;
    transition: var(--transition);
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
}

.navbar-logo {
    height: 50px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    transition: var(--transition);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.1);
}

.navbar-brand i {
    transition: var(--transition);
}

.navbar-brand:hover i {
    transform: rotate(360deg);
}

.nav-link {
    font-weight: 600;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ========================================
   HERO SECTION
======================================== */

.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('../img/background-hero.jpg'),
                      linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    margin-top: 76px;
    padding: 4rem 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.8) 0%, rgba(10, 88, 202, 0.8) 100%);
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1,
.hero-section h2,
.hero-section p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Animações Hero */
.animate-fade-in {
    animation: fadeIn 1s ease-in;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-in 0.3s backwards;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-in 0.6s backwards;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 1s ease-in 0.9s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   SEÇÃO DE CONTATOS
======================================== */

#contatos {
    background-color: var(--white-color);
}

.contact-card {
    background-color: var(--white-color);
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

.contact-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.contact-card .icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-color);
    border-radius: 50%;
    transition: var(--transition);
}

.contact-card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
}

.bg-success-light {
    background-color: rgba(37, 211, 102, 0.1) !important;
}

.contact-card a {
    font-weight: 600;
    transition: var(--transition);
}

.contact-card a:hover {
    transform: scale(1.05);
}

/* ========================================
   SEÇÃO DE ATENDIMENTO WHATSAPP
======================================== */

#atendimento {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.whatsapp-card {
    background-color: var(--white-color);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.whatsapp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 211, 102, 0.1), transparent);
    transition: var(--transition);
}

.whatsapp-card:hover::before {
    left: 100%;
}

.whatsapp-card:hover {
    transform: translateY(-5px);
    border-color: var(--success-color);
    box-shadow: var(--shadow-lg);
}

.whatsapp-card i {
    transition: var(--transition);
}

.whatsapp-card:hover i {
    transform: scale(1.2);
    color: var(--success-color) !important;
}

/* ========================================
   SEÇÃO DO MAPA
======================================== */

#lojas {
    background-color: var(--white-color);
}

#map {
    height: 500px;
    width: 100%;
    border: 3px solid var(--primary-color);
}

.store-card {
    background-color: var(--light-color);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    cursor: pointer;
}

.store-card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
    background-color: var(--white-color);
    border-left-color: #E1306C;
}

.store-card h5 {
    color: var(--dark-color);
}

.store-card:hover h5 {
    color: var(--primary-color);
}

.store-card .fa-instagram {
    font-size: 1.1rem;
}

.store-card:hover .fa-instagram {
    transform: scale(1.2);
    display: inline-block;
}

/* Estilo personalizado para popups do Leaflet */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.leaflet-popup-content {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* ========================================
   FOOTER
======================================== */

footer {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%) !important;
}

footer h5 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    display: inline-block;
}

.text-light-muted {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.text-light-muted:hover {
    color: var(--white-color);
    padding-left: 5px;
}

/* ========================================
   BOTÃO FLUTUANTE WHATSAPP
======================================== */

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: var(--success-color);
    color: var(--white-color);
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    color: var(--white-color);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ========================================
   UTILITÁRIOS
======================================== */

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Botões personalizados */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   RESPONSIVIDADE
======================================== */

/* Tablets */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        margin-top: 56px;
        padding: 3rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section h2 {
        font-size: 1.8rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    #map {
        height: 400px;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
    
    .navbar-brand {
        font-size: 0.95rem;
    }
    
    .navbar-logo {
        height: 40px;
    }
    
    .contact-card,
    .whatsapp-card,
    .store-card {
        margin-bottom: 1rem;
    }
    
    /* Melhorar espaçamento em tablets */
    section {
        padding: 3rem 0 !important;
    }
}

/* Mobile - Otimização Completa */
@media (max-width: 576px) {
    /* Navbar Mobile */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .navbar-logo {
        height: 35px;
        max-width: 100px;
    }
    
    .navbar-brand span {
        display: block;
    }
    
    .navbar-brand small {
        font-size: 0.7rem !important;
    }
    
    .nav-link {
        margin: 0.3rem 0;
        padding: 0.6rem 1rem !important;
        text-align: center;
        font-size: 1rem;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        min-height: 100vh;
        padding: 2rem 0;
        margin-top: 56px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 1rem !important;
    }
    
    .hero-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem !important;
    }
    
    .hero-section .lead {
        font-size: 0.95rem;
        margin-bottom: 2rem !important;
    }
    
    .hero-section .btn {
        font-size: 0.95rem;
        padding: 0.75rem 2rem !important;
    }
    
    /* Seções Mobile */
    section {
        padding: 2.5rem 0 !important;
    }
    
    /* Títulos Mobile */
    .display-5 {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .display-6 {
        font-size: 1.3rem;
    }
    
    .lead {
        font-size: 0.95rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    h5 {
        font-size: 1rem;
    }
    
    /* Cards Mobile */
    .contact-card,
    .whatsapp-card,
    .store-card {
        margin-bottom: 1rem;
        padding: 1.5rem !important;
    }
    
    .contact-card .icon-box {
        width: 60px;
        height: 60px;
    }
    
    .contact-card .icon-box i {
        font-size: 2rem !important;
    }
    
    .whatsapp-card i {
        font-size: 1.5rem !important;
    }
    
    /* Mapa Mobile */
    #map {
        height: 300px;
        border-width: 2px;
    }
    
    /* WhatsApp Float Mobile */
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 26px;
        bottom: 15px;
        right: 15px;
    }
    
    /* Footer Mobile */
    footer {
        padding: 2rem 0 !important;
    }
    
    footer h5 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    footer p,
    footer li {
        font-size: 0.85rem;
    }
    
    /* Container Mobile */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Botões Mobile */
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 2rem !important;
    }
    
    /* Store Cards Links Mobile */
    .store-card:hover {
        transform: translateY(-5px);
    }
    
    /* Melhorar toque em mobile */
    .whatsapp-card,
    .contact-card,
    .store-card,
    .nav-link,
    .btn {
        -webkit-tap-highlight-color: rgba(13, 110, 253, 0.2);
    }
}

/* Mobile Extra Small (iPhone SE, etc) */
@media (max-width: 375px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section h2 {
        font-size: 1.1rem;
    }
    
    .display-5 {
        font-size: 1.4rem;
    }
    
    .navbar-logo {
        height: 30px;
        max-width: 80px;
    }
    
    .navbar-brand {
        font-size: 0.75rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 22px;
        bottom: 10px;
        right: 10px;
    }
    
    .contact-card,
    .whatsapp-card,
    .store-card {
        padding: 1.2rem !important;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section h2 {
        font-size: 1.5rem;
    }
}

/* ========================================
   ACESSIBILIDADE
======================================== */

/* Foco visível para navegação por teclado */
a:focus,
button:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Alto contraste para links */
a {
    color: var(--primary-color);
}

a:hover {
    color: #0a58ca;
}

/* ========================================
   ANIMAÇÕES ADICIONAIS
======================================== */

/* Scroll suave para seções */
section {
    scroll-margin-top: 80px;
}

/* Hover para cards em geral */
.card,
.contact-card,
.whatsapp-card,
.store-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading animation para o mapa */
#map.loading {
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

#map.loading::after {
    content: 'Carregando mapa...';
    font-family: var(--font-body);
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* ========================================
   IMPRESSÃO
======================================== */

@media print {
    .navbar,
    .whatsapp-float,
    #atendimento,
    footer {
        display: none;
    }
    
    .hero-section {
        background: var(--white-color);
        color: var(--dark-color);
        min-height: auto;
        page-break-after: always;
    }
    
    section {
        page-break-inside: avoid;
    }
}
