* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #ff6b35;
    --dark: #1a1a1a;
    --gray: #6c757d;
    --light: #f8f9fa;
    --radius: 16px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --header-height: 80px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}


html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}


/* Componentes */
.btn {
    background: var(--primary);
    display: inline-block;
    padding: 12px 24px;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
    cursor: pointer;
    border: none;
}

.btn:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-light {
    background: #fff;
    color: var(--primary);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    z-index: 101;
}

/* Header */
header {
    position: fixed;
    inset: 0 0 auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 5%;
    background: #fff;
    box-shadow: var(--shadow);
    z-index: 99;
    z-index: 100;
    height: var(--header-height);
}

.header-scrolled {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Menu Desktop */
header nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

header nav a {
    font-weight: 600;
    transition: color 0.3s;
}

header nav a:hover {
    color: var(--primary);
}

.btn-nav-mobile {
    display: none;
}

.mobile-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--dark);
    z-index: 101;
}

/* Hero Section */
.hero-wrapper {
    background: linear-gradient(135deg, #fff9f5, white);
    padding-top: 88px;
    padding-top: var(--header-height);
    min-height: 100vh;
    display: flex;
    align-items: center;
}


.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
    width: 100%;
}

.hero h1 {
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 30px;
}

.hero img {
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.3);
    width: 100%;
    animation: float 6s ease-in-out infinite;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.hero-stats li {
    display: flex;
    flex-direction: column;
}

.hero-stats span {
    font-size: 24px;
    color: var(--gray);
}

.hero-stats strong {
    font-size: 32px;
    color: var(--primary);
}

.hero img {
    margin-top: 40px;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-stats {
    justify-content: center;
}

/* Cardápio */
.cardapio {
    padding: 80px 5%;
    text-align: center;
}

.cardapio h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.cardapio p {
    color: var(--gray);
    margin: 0 auto 50px;
    max-width: 700px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.menu-grid li {
    position: relative;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: left;
}


.menu-grid li img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius);
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.menu-grid h3 {
    padding: 20px 20px 10px;
    font-size: 20px;
}

.menu-grid p {
    padding: 0 20px 20px;
    color: var(--gray);
    font-size: 14px;
}

.menu-grid strong {
    padding: 15px 20px 0;
    display: block;
    font-size: 22px;
    color: var(--primary);
}

.menu-grid .btn {
    display: block;
    margin: 15px 20px 20px;
    text-align: center;
    padding: 10px;
}

/* Sobre */
.sobre {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 550px));
    justify-content: center;
    align-items: center;
    gap: 60px;
    padding: 80px 5%;
    background-color: var(--light);
}

.sobre img {
    width: 80%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.sobre h2 {
    color: var(--dark);
    font-size: 36px;
    margin-bottom: 20px;
}

.sobre article {
    color: var(--gray);
    margin-bottom: 30px;
}

.sobre ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* CTA */
.cta {
    padding: 50px 5%;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), #e55a2b);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta h2 {
    color: #fff;
    font-size: 32px;
    margin-bottom: 10px;
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 700px;
}

/* Footer */
footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 60px 5% 2px;
    background-color: var(--dark);
    color: #fff;
}

footer .copy {
   grid-column: 1/-1;
   text-align: center;
}

/* Animações de Scroll */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* Ajuste para garantir que elementos não fiquem invisíveis se JS falhar ou demorar */
@media (prefers-reduced-motion) {
    .hidden { opacity: 1; transform: none; }
}
/* ==========================================================================
   CORREÇÕES DO CHECKOUT E CARRINHO
   ========================================================================== */

/* 1. Estrutura do Sidebar (Flexbox para garantir footer fixo no fundo) */
.cart-sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Ocupa 100% da altura da tela */
    max-width: 400px;
    width: 100%;
    position: fixed;
    top: 0;
    right: 0;
    background: #fff;
    z-index: 9999;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.cart-sidebar.open {
    transform: translateX(0);
}

/* Cabeçalho fixo no topo */
.cart-header {
    flex-shrink: 0;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 2. Áreas de Conteúdo com Scroll (Itens e Pagamento) */
.cart-items-container,
#payment-section {
    flex: 1; /* Ocupa todo o espaço disponível entre header e footer */
    overflow-y: auto; /* Habilita scroll apenas nesta área */
    padding: 20px;
    /* Espaço extra no final para não cortar conteúdo */
    padding-bottom: 40px; 
}

/* 3. Organização Visual do Formulário de Pagamento */
#payment-section h3 {
    font-size: 1.2rem;
    color: #333;
    border-bottom: 2px solid #ffc107; /* Destaque visual */
    padding-bottom: 10px;
    margin-bottom: 20px;
}

#payment-section h4 {
    font-size: 1rem;
    color: #555;
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Estilização dos Inputs (Sobrescrevendo estilos inline se necessário) */
#payment-section input[type="text"] {
    box-sizing: border-box;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    padding: 12px !important;
    font-size: 16px !important;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    box-shadow: none;
    margin-bottom: 10px !important;
}

#payment-section input[type="text"]:focus {
    border-color: #ffc107 !important;
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
}

/* Container de Tipo de Entrega (Radio Buttons) */
#payment-section div[style*="margin-bottom: 15px"] {
    display: flex;
    gap: 20px;
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px !important;
    align-items: center;
}

#payment-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #333;
}

/* 4. Opções de Pagamento (Grid para melhor toque) */
/* --- Carrinho e Checkout --- */
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 colunas em desktop */
    gap: 10px;
    margin-bottom: 20px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    font-size: 14px;
}

.payment-option:hover {
    border-color: #ffc107;
    border-color: var(--primary);
    background: #fffdf5;
}

.payment-option:has(input:checked) {
    border-color: var(--primary);
    background: #fff9f5;
    box-shadow: 0 0 0 1px var(--primary);
}

.payment-option input {
    margin: 0;
}

/* 5. Footer e Botão de Ação (Sempre Visíveis e Fixos) */
.cart-footer {
    flex-shrink: 0; /* Impede que o footer encolha ou suma */
    background: #fff;
    padding: 20px;
    border-top: 1px solid #eee;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    z-index: 10;
    position: relative;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #333;
}

/* Botão CTA (Call to Action) */
/* Botões do Carrinho */
#checkout-btn,
#confirm-payment-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background-color: #28a745; /* Verde Sucesso */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    text-align: center;
    opacity: 1;
    visibility: visible;
}

#checkout-btn:hover,
#confirm-payment-btn:hover {
    background-color: #218838;
}

#checkout-btn:active,
#confirm-payment-btn:active {
    transform: scale(0.98);
}

/* Estado Desabilitado */
#confirm-payment-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* 6. Responsividade Mobile */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        max-width: 100%; /* Ocupa tela inteira no mobile */
    }
/* Utilitários e Formulários */
.hidden-section {
    display: none !important;
}

    .payment-methods {
        grid-template-columns: 1fr; /* 1 coluna para botões maiores */
    }
}
.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

    /* Ajuste para inputs de número e bairro em telas muito pequenas */
    @media (max-width: 360px) {
        #payment-section div[style*="display: flex"] {
            flex-direction: column;
            gap: 10px;
        }
        #client-number, #client-neighborhood {
            width: 100% !important; /* Força largura total */
        }
    }
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}

/* Utilitários */
.hidden-section {
    display: none !important;
}
.form-row {
    display: flex;
    gap: 10px;
}

/* --- Estilos do Carrinho e Modal --- */
.form-row input:first-child {
    width: 30%;
}

.delivery-options {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    background: #f0f0f0;
    padding: 10px;
    border-radius: 8px;
}

.radio-box {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

/* Botão Flutuante */
.cart-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s;
}

.cart-float-btn:hover { transform: scale(1.1); }

#cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--dark);
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sidebar do Carrinho */
.cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    display: none;
}
.cart-backdrop.open { display: block; }

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
}
.cart-sidebar.open { transform: translateX(0); }

.cart-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.cart-items-container { flex: 1; overflow-y: auto; padding: 20px; }
.cart-items-container, .payment-section { flex: 1; overflow-y: auto; padding: 20px; }
.cart-footer { padding: 20px; border-top: 1px solid #eee; background: #f9f9f9; }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; margin-bottom: 15px; }

.cart-item { display: flex; justify-content: space-between; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.cart-item-info h4 { font-size: 16px; margin-bottom: 5px; }
.cart-item-details { font-size: 12px; color: var(--gray); margin-bottom: 5px; }
.cart-item-actions { display: flex; align-items: center; gap: 10px; }
.qty-btn { background: #eee; border: none; width: 25px; height: 25px; border-radius: 50%; cursor: pointer; font-weight: bold; }

/* Modal de Produto */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1005;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}
.modal-overlay.open { display: flex; }

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.close-btn, .close-btn-modal { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--gray); }
.close-btn-modal { position: absolute; top: 15px; right: 20px; }

.modal-options { margin: 20px 0; }
.modal-options h4 { font-size: 14px; color: var(--gray); margin-bottom: 10px; text-transform: uppercase; }
.option-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.option-item label { display: flex; align-items: center; gap: 10px; cursor: pointer; width: 100%; }

.modal-actions { display: flex; gap: 15px; align-items: center; margin-top: 20px; }
.qty-selector { display: flex; align-items: center; gap: 10px; background: #eee; padding: 5px 10px; border-radius: 8px; }
.qty-selector button { border: none; background: none; font-size: 18px; cursor: pointer; color: var(--primary); font-weight: bold; }

/* Pagamento */
.hidden-section { display: none; }
.payment-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.payment-option {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}
.payment-option:has(input:checked) { border-color: var(--primary); background: #fff9f5; }
#pix-area { text-align: center; margin-top: 15px; }
#pix-qr-code { width: 150px; height: 150px; margin-bottom: 10px; }

/* =========================================
   RESPONSIVIDADE (MEDIA QUERIES)
   ========================================= */

@media (max-width: 1024px) {
    .hero {
        gap: 30px;
    }
    .hero h1 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    /* Header Mobile */
    .mobile-btn {
        display: block;
    }

    header nav {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 70%;
        height: calc(100vh - var(--header-height));
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 40px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: 0.3s ease;
    }

    header nav.active {
        right: 0;
    }

    .btn-header-desktop {
        display: none;
    }

    .btn-nav-mobile {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 20px;
    }

    /* Hero Mobile */
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 20px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .hero img {
        order: -1; /* Imagem acima do texto no mobile */
        max-width: 80%;
        margin: 0 auto;
    }

    /* Seções Gerais */
    .sobre {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .sobre img {
        width: 100%;
        margin-bottom: 20px;
    }

    footer {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .cart-sidebar {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }
    
    footer {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }
}