* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #DC2626;
    --dark-red: #B91C1C;
    --accent-blue: #2563EB;
    --dark-blue: #1E40AF;
    --bg-gray: #F3F4F6;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --white: #FFFFFF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    /* Alturas fixas */
    --header-height: 70px;
    --desktop-nav-height: 50px; 
    --max-content-width: 1300px; /* Largura máxima unificada */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-gray);
    color: var(--text-dark);
    /* CORREÇÃO: Oculta qualquer barra de rolagem horizontal no corpo principal */
    overflow-x: hidden; 
    /* Espaço para o header fixo (Mobile/Tablet) */
    padding-top: var(--header-height); 
    /* Espaço para o rodapé fixo (Mobile/Tablet) */
    padding-bottom: var(--header-height); 
}

/* NOVO: Estilos da Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* Fundo com gradiente elegante no tema vermelho do app */
    background: linear-gradient(180deg, var(--primary-red) 0%, var(--dark-red) 100%);
    z-index: 5000; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-logo {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.splash-icon {
    font-size: 60px;
    color: var(--white);
    animation: bounce 1s infinite alternate; 
}

.splash-loading-text {
    margin-top: 30px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Animação para o ícone */
@keyframes bounce {
    from {
        transform: translateY(0);
        text-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
    }
    to {
        transform: translateY(-10px);
        text-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }
}

/* Header Fixo (Barra Principal no Topo) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    box-shadow: var(--shadow);
    z-index: 1000;
    height: var(--header-height);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    height: 100%;
    /* Centraliza e limita a largura do conteúdo em todas as telas */
    max-width: var(--max-content-width); 
    margin: 0 auto;
}

.menu-toggle {
    background: var(--dark-red);
    border: none;
    color: var(--white);
    font-size: 24px;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    display: flex; /* Visível no mobile/tablet */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-right: 10px;
}

/* Novo estilo do botão de ação no header (ex: WhatsApp no desktop) */
.header-action-link {
    background: var(--dark-red);
    border: none;
    color: var(--white);
    font-size: 24px;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    display: none; /* Oculto por padrão no mobile */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-left: 10px;
}
.desktop-whatsapp {
    /* Garante que este link apareça apenas no desktop (veja media query abaixo) */
    display: none; 
}


.logo {
    font-size: 20px;
    color: var(--white);
    font-weight: bold;
    flex: 1;
    text-align: center;
}

/* Menu Lateral (Side Menu - Padrão Mobile/Oculto) */
.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--dark-red);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.side-menu.active {
    left: 0;
}

.menu-header {
    background: var(--primary-red);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-list {
    list-style: none;
    padding: 20px 0;
}

.menu-list a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 15px;
}

.menu-list a:hover {
    background: rgba(0, 0, 0, 0.2);
    color: var(--white);
}

.menu-list i {
    width: 20px;
    font-size: 18px;
}

.menu-footer {
    padding: 10px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Rodapé Fixo (Bottom Nav - Padrão Mobile/Visível) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    z-index: 990;
    padding: 5px 0;
    height: var(--header-height);
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    /* Centraliza e limita a largura em telas grandes */
    max-width: 800px;
    margin: 0 auto;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 80px;
}

.bottom-nav-link i {
    font-size: 20px;
    margin-bottom: 3px;
}

.bottom-nav-link.active {
    background: rgba(0, 0, 0, 0.1);
    color: var(--white);
}

/* Seções de Conteúdo PRINCIPAIS */
.main-content {
    /* Centraliza o conteúdo e limita a largura */
    max-width: var(--max-content-width); 
    margin: 0 auto;
    width: 100%;
    padding-bottom: 0;
}

.section-title {
    font-size: 22px;
    font-weight: bold;
    padding: 0 15px 15px;
}

/* Busca */
.hero-section {
    padding-top: 0; 
    padding-bottom: 20px;
}

.search-box {
    padding: 0 15px;
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 16px;
    box-shadow: var(--shadow);
}

.search-box .search-icon {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
}

/* Carrossel de Banners */
.banner-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--text-dark);
}

.carousel-container {
    width: 100%;
    height: 100%;
}

.carousel-slide {
    /* NOVO: Para transição de fade-in/fade-out */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Inicialmente invisível */
    transition: opacity 0.8s ease-in-out; /* Transição de 0.8 segundos para o fade */
    z-index: 1; /* Fundo */
}

.carousel-slide.active {
    opacity: 1; /* Visível */
    z-index: 2; /* Sobre os outros */
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10; /* Garante que os indicadores fiquem visíveis */
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: var(--white);
    width: 25px;
    border-radius: 5px;
}

/* Categorias */
.categories-section {
    padding: 20px 15px;
}

/* Container para a rolagem horizontal */
.category-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    margin: 0 15px;
}

/* Botões de Rolagem (Ocultos por padrão) */
.category-scroll-btn {
    display: none; 
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    color: var(--primary-red);
    border: none;
    padding: 10px 12px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 10;
    font-size: 18px;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.category-scroll-btn:hover {
    opacity: 1;
}

.prev-btn {
    left: -15px; /* Posição na esquerda para mobile/tablet (fica invisível) */
}

.next-btn {
    right: -15px; /* Posição na direita para mobile/tablet (fica invisível) */
}

.category-list {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Ocupa todo o espaço horizontal dentro do wrapper */
    width: 100%;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    min-width: 80px;
    transition: transform 0.2s ease;
}

.category-item.active .category-icon {
     /* Adiciona um anel vermelho para destacar a categoria ativa */
    box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--primary-red); 
}

.category-item:active {
    transform: scale(0.95);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 28px;
    margin-bottom: 5px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

.category-item span {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

/* Restaurantes */
.restaurants-section {
    padding: 20px 15px;
}

.restaurants-grid {
    display: grid;
    /* Padrão para mobile: 1 coluna */
    grid-template-columns: 1fr;
    gap: 15px;
}

.restaurant-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    padding-bottom: 0;
}

.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.restaurant-image-container {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.restaurant-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.restaurant-info {
    padding: 15px;
    padding-bottom: 5px; 
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.restaurant-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.restaurant-category {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.restaurant-details {
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--bg-gray);
}

.info-group {
    display: flex;
    align-items: center; 
    gap: 15px;
}

.restaurant-rating, .restaurant-time {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
}

.restaurant-rating {
    color: #F59E0B;
}

.restaurant-time {
    color: var(--text-light);
}

.restaurant-rating i, .restaurant-time i {
    margin-right: 5px;
}

/* Anunciar */
.anunciar-section {
    padding: 40px 15px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--dark-blue) 100%);
    margin: 20px 15px;
    text-align: center;
    border-radius: 12px;
    box-shadow: none;
}

.anunciar-section .section-title {
    color: var(--white);
    padding-bottom: 10px;
    margin: 0;
    font-size: 24px;
}

.anunciar-text {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-anunciar {
    display: inline-block;
    background: var(--white);
    color: var(--accent-blue);
    padding: 15px 40px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

/* --- FOOTER (RODAPÉ) --- */
.site-footer {
    /* CORREÇÃO CRÍTICA: Oculta por padrão em todas as telas, incluindo mobile */
    display: none !important; 
    background: var(--dark-red);
    color: var(--white);
    padding-top: 40px;
    padding-bottom: 20px;
    margin-top: 40px;
}

.site-footer a {
    color: var(--white);
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-footer a:hover {
    opacity: 1;
}

.footer-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    padding: 0 30px;
    justify-content: space-between;
}

.footer-column {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-logo {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-column h4 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 5px;
    display: inline-block;
}

.footer-column p, .footer-column ul {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column i {
    margin-right: 8px;
}

.social-links {
    margin-top: 15px;
}

.social-links a {
    font-size: 18px;
    margin-right: 15px;
    opacity: 0.9;
}

.footer-bottom {
    text-align: center;
    padding: 15px 30px 0;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    opacity: 0.7;
}


/* =================================================================
   MEDIA QUERIES PARA RESPONSIVIDADE EM TABLETS E TELAS MAIORES
   ================================================================= */
@media (min-width: 600px) {
    
    /* CABEÇALHO e RODAPÉ FIXOS */
    .header, .bottom-nav {
        left: 0;
        right: 0;
    }
    
    .header-container, .bottom-nav-container {
        max-width: 768px; /* Ajuste para tablets */
    }

    /* CONTEÚDO PRINCIPAL */
    .main-content {
        max-width: 768px; /* Largura máxima do conteúdo em tablets */
    }
    
    /* CARDS DE RESTAURANTES (2 COLUNAS) */
    .restaurants-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* CARROSSEL DE BANNERS */
    .banner-carousel {
        height: 250px; 
    }

    /* CATEGORIAS */
    .category-list {
        gap: 20px;
        justify-content: center;
    }

    .category-item {
        min-width: 90px;
    }

    .category-icon {
        width: 65px;
        height: 65px;
        font-size: 30px;
    }
}

/* =================================================================
   BLOCO DESKTOP (PC) - Menu Fixo no Topo, Centralização Corrigida e Ocultação de Links
   ================================================================= */
@media (min-width: 1024px) {
    
    /* 1. MUDANÇAS NO BODY */
    body {
        padding-bottom: 0; 
        padding-left: 0;
        /* Novo padding-top: Altura do Header (70px) + Altura do Menu Horizontal (50px) */
        padding-top: calc(var(--header-height) + var(--desktop-nav-height)); 
    }
    
    /* 2. OCULTAÇÃO EXCLUSIVA DE LINKS NO DESKTOP */
    .menu-list .menu-link-desktop-hidden {
        display: none !important;
    }
    
    /* 3. HEADER PRINCIPAL (BARRA VERMELHA) */
    .header {
        /* Garante que a barra vermelha não tenha folga lateral */
        padding: 0; 
    }
    
    .header-container {
        /* Centraliza o container usando margem automática */
        max-width: var(--max-content-width); 
        padding: 0; 
        
        /* Centraliza o logo */
        justify-content: center; 
        position: relative; 
        
        /* APLICAÇÃO DA COMPENSAÇÃO PARA BARRA DE ROLAGEM NO CONTAINER */
        /* Empurra o contêiner ligeiramente para a esquerda */
        margin: 0 auto;
        margin-right: calc(auto + 57px); /* Valor de compensação final */
        margin-left: auto;
    }
    
    .logo {
        font-size: 24px;
        /* Centraliza o texto do logo */
        text-align: center; 
        /* Ocupa todo o espaço central para forçar o centro */
        flex-grow: 1; 
        margin: 0; 
    }
    
    /* Botão de ação (WhatsApp) - DEVE SER REMOVIDO NO DESKTOP */
    .desktop-whatsapp {
        display: none !important; 
        position: static;
        right: 0;
        top: 0;
        transform: none;
    }
    
    /* 4. OCULTAR ELEMENTOS MOBILE */
    .bottom-nav, .menu-toggle {
        display: none !important;
    }
    
    /* 5. MENU HORIZONTAL FIXO (SIDE-MENU TRANSFORMADO) */
    .side-menu {
        position: fixed;
        top: var(--header-height); 
        left: 0;
        right: 0;
        width: 100%;
        height: var(--desktop-nav-height);
        background: var(--dark-red); 
        z-index: 1000;
        box-shadow: var(--shadow);
        display: flex;
        overflow: hidden; 
        align-items: center;
        /* Centraliza o contêiner do menu horizontal */
        justify-content: center; 
    }
    
    /* Ocultar elementos específicos do menu lateral */
    .menu-header, .menu-footer, .side-menu .close-btn {
        display: none;
    }
    
    /* Lista de Links (Transforma em linha) */
    .menu-list {
        display: flex; 
        padding: 0;
        /* APLICAÇÃO DA COMPENSAÇÃO PARA BARRA DE ROLAGEM NO MENU */
        margin-right: calc(auto + 57px); /* Valor de compensação final */
        margin-left: auto;
        max-width: var(--max-content-width); /* Mantém largura máxima unificada */
        height: 100%;
        overflow-x: auto; 
        gap: 5px; 
        
        /* CORREÇÃO FINAL: Centraliza o menu na barra, padding 0 */
        padding: 0; 
    }
    
    /* Oculta a barra de rolagem horizontal do menu de links */
    .menu-list::-webkit-scrollbar {
        display: none;
    }

    .menu-list li {
        display: flex; 
        flex-shrink: 0; 
    }

    .menu-list a {
        padding: 0 18px; 
        height: var(--desktop-nav-height); 
        justify-content: center; 
        align-items: center;
        font-size: 14px;
        font-weight: 600;
        gap: 8px; 
        border-radius: 0;
        background: none;
    }
    
    .menu-list a:hover {
        background: rgba(255, 255, 255, 0.15); 
    }
    
    /* 6. CONTEÚDO PRINCIPAL */
    .main-content {
        /* Centraliza perfeitamente o conteúdo */
        margin: 0 auto;
        max-width: var(--max-content-width); 
        padding-top: 25px; 
        
        /* AJUSTE PARA COMPENSAR A BARRA DE ROLAGEM NO CONTEÚDO */
        /* Valor de compensação: 57px */
        margin-right: auto;
        margin-left: auto;
        padding-right: 57px; 
    }
    
    /* BUSCA E BANNER (CORREÇÃO DE ALINHAMENTO) */
    .search-box {
        /* Remove o padding lateral do search-box (mobile: 0 15px) */
        padding: 0; 
        margin-bottom: 15px;
        
        /* Largura reduzida para centralizar */
        width: 600px; 
        /* Centraliza horizontalmente e mantém margem inferior, usando compensação de 57px */
        margin: 0 auto 15px auto;
        margin-left: calc(50% - 300px); /* 50% da tela - metade da largura (300px) */
        margin-right: calc(50% - 300px + 57px); /* 50% da tela + metade da largura + 57px */
        position: relative; 
    }
    
    .search-box input {
        width: 100%;
        padding: 12px 12px 12px 40px;
        border-radius: 25px;
    }
    
    .search-box .search-icon {
        /* Posição do ícone dentro da nova largura */
        left: 10px; 
    }
    
    /* ALINHAMENTO DO BANNER */
    .banner-carousel {
        height: 350px; 
        border-radius: 12px;
        overflow: hidden;
        /* Usa a compensação lateral de 30px */
        margin: 0 30px 20px 30px; 
        box-shadow: var(--shadow-lg);
    }
    
    /* 7. GRADE DE RESTAURANTES (3 COLUNAS) */
    .restaurants-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px; 
    }

    /* 8. ALINHAMENTO DE SEÇÕES */
    .categories-section, .restaurants-section {
        /* Mantém o padding lateral de 30px para alinhar com o banner/busca */
        padding-left: 30px;
        padding-right: 30px;
    }
    
    .anunciar-section {
        margin: 30px 30px; 
    }
    
    /* FOOTER (Visível apenas em Desktop) */
    .site-footer {
        display: block !important; /* Exibe o footer no desktop */
        /* Aplica a mesma margem de compensação do resto do site */
        margin-right: calc(auto + 57px);
        margin-left: auto;
    }

    /* BOTOES DE ROLAGEM DE CATEGORIA */
    .category-scroll-btn {
        display: block; /* Visível no desktop */
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: var(--white); /* Torna o fundo sólido */
        border: 1px solid var(--bg-gray); /* Adiciona uma borda sutil */
        opacity: 1;
        transition: all 0.2s ease;
    }
    
    /* Centraliza o Wrapper em Desktop, mas mantém a rolagem ativa */
    .category-wrapper {
        margin: 0 auto;
        /* Remove o padding lateral para que os botões fiquem fora da lista */
        padding: 0 40px; 
        max-width: 100%;
    }
    
    .category-list {
        /* Garante que o overflow-x esteja ativo e a lista não se quebre */
        overflow-x: auto;
        white-space: nowrap; /* Impede a quebra de linha dos itens */
        padding-bottom: 10px;
        
        /* Ajusta o padding interno para alinhar os itens com o restante do conteúdo */
        padding-left: 0; 
        padding-right: 0;
        
        /* Garante que a lista comece alinhada */
        justify-content: flex-start;
    }
    
    /* Ajusta a posição dos botões de rolagem para ficarem fora do contêiner de rolagem */
    .category-wrapper .prev-btn {
        left: 0; /* Alinha o botão com a borda esquerda do wrapper */
    }

    .category-wrapper .next-btn {
        right: 0; /* Alinha o botão com a borda direita do wrapper */
    }
}
