:root {
    --red-neon: #ff3131;
    --yellow: #fdd835;
    --wood: #2b1d16;
}

body { 
    background-color: var(--wood); 
    background-image: url('https://www.transparenttextures.com/patterns/dark-wood.png');
    color: white; 
    font-family: 'Segoe UI', sans-serif;
    margin-bottom: 100px; /* Espaço para o carrinho no mobile */
}

header {
    background: #000;
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid var(--red-neon);
}

header h1 {
    color: var(--red-neon);
    text-shadow: 0 0 10px var(--red-neon);
    letter-spacing: 2px;
}

.delivery-badge {
    background: var(--yellow);
    color: #000;
    padding: 5px 15px;
    font-weight: bold;
    font-size: 0.8rem;
    border-radius: 0 0 10px 10px;
}



.price { color: var(--yellow); font-weight: bold; font-size: 1.2rem; }

/* Atualização no card para permitir posicionamento absoluto do botão */
/* Container do card */
.card {
    background: rgba(0, 0, 0, 0.75);
    margin: 12px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--yellow);
    display: flex;
    flex-direction: column; /* Organiza os itens em coluna */
    position: relative;
}

/* Linha com Nome e Preço */
.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.name {
    font-weight: bold;
    font-size: 1.1rem;
    color: #fff;
    padding-right: 10px;
}

.price {
    color: var(--yellow);
    font-weight: bold;
    font-size: 1.1rem;
    white-space: nowrap; /* Evita que o preço quebre linha */
}

/* Descrição do lanche */
.desc {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 10px;
    line-height: 1.3;
    max-width: 85%; /* Garante espaço para o botão não embolar */
}

/* O BOTÃO PEQUENO ABAIXO NO CANTO */
.add-to-cart {
    align-self: flex-end; /* Joga o botão para a direita */
    background: var(--yellow);
    color: #000;
    border: none;
    padding: 6px 15px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.1s active;
}

/* Efeito de clique no celular */
.add-to-cart:active {
    transform: scale(0.95);
    background: #e6c300;
}

/* Ajustes específicos para celular */
@media (max-width: 600px) {
    .card {
        padding: 12px;
        margin: 10px;
    }
    
    .name {
        font-size: 1rem;
    }

    .add-to-cart {
        padding: 8px 12px; /* Um pouco mais alto para facilitar o toque */
        font-size: 0.8rem;
        margin-top: 5px;
    }
}

/* Espaço no rodapé para nada ficar escondido atrás da barra */
body {
    margin-bottom: 120px; /* Espaço para a barra + carrinho */
}

/* A Caixa de Navegação Fixa */
.category-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #1a1a1a; /* Cor sólida para não confundir com o fundo */
    border-top: 2px solid var(--red-neon);
    z-index: 10000; /* Acima de tudo */
    box-shadow: 0 -5px 15px rgba(0,0,0,0.5);
}

/* Container que permite o deslize lateral no celular */
.nav-scroll-container {
    display: flex;
    justify-content: center; /* Centraliza no PC */
    overflow-x: auto; /* Scroll lateral no celular */
    white-space: nowrap;
    padding: 10px 0;
    scrollbar-width: none; /* Esconde barra de scroll no Firefox */
}

.nav-scroll-container::-webkit-scrollbar {
    display: none; /* Esconde barra de scroll no Chrome/Safari */
}

/* Estilo dos links dentro da caixa */
.category-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    margin: 0 5px;
    background: #333;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    border: 1px solid #444;
    transition: 0.3s;
}

.category-nav a:active, .category-nav a:hover {
    background: var(--red-neon);
    color: white;
    border-color: white;
}

/* AJUSTE DO CARRINHO: Ele deve ficar ACIMA da barra de categorias */
#cart-footer {
    position: fixed;
    bottom: 55px; /* Altura da barra de categorias */
    left: 0;
    width: 100%;
    background: var(--yellow);
    color: black;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    font-weight: bold;
    border-radius: 15px 15px 0 0; /* Arredonda só o topo */
}

/* Ajuste Mobile */
@media (max-width: 600px) {
    .nav-scroll-container {
        justify-content: flex-start; /* Alinha à esquerda para permitir scroll */
        padding: 12px 10px;
    }
    
    .category-nav a {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Ativa a rolagem suave em todo o documento */
html {
    scroll-behavior: smooth;
}

/* Estilo para destacar a categoria atual na barra fixa */
.category-nav a.active {
    background: var(--red-neon);
    border-color: white;
    color: white;
    transform: scale(1.05);
}

/* Garante que as seções tenham um distanciamento do topo ao rolar */
section {
    scroll-margin-top: 20px;
}


/* BOTÃO DE PAGAR ESTILIZADO */
#checkout-btn {
    background: transparent; /* Fundo transparente para brilhar o neon */
    color: #fff;
    border: 2px solid var(--red-neon);
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    
    /* Efeito Neon */
    box-shadow: 0 0 5px var(--red-neon), inset 0 0 5px var(--red-neon);
    text-shadow: 0 0 5px #fff;
    
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Efeito de "Pulsar" ou Hover */
#checkout-btn:hover {
    background: var(--red-neon);
    box-shadow: 0 0 20px var(--red-neon);
    color: #000000;
    text-shadow: none;
}



/* Container do Carrinho Flutuante Re-alinhado */
#cart-footer {
    position: fixed;
    bottom: 85px; /* Distância da barra de categorias inferior */
    left: 0;
    right: 0;
    
    /* Centralização horizontal em relação à página */
    margin: 0 auto; 
    width: 90%; 
    max-width: 450px; /* Alinhado à largura média dos cards no PC */
    
    background: #1a1a1a;
    border: 1px solid #333;
    border-top: 2px solid var(--yellow);
    
    /* Alinhamento interno: Preço na esquerda, Botão na direita */
    display: flex;
    justify-content: space-between; 
    align-items: center;
    
    padding: 10px 15px;
    z-index: 10001; 
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.7);
    box-sizing: border-box; /* Garante que o padding não "estoure" a largura */
}

/* Garante que as informações de preço não fiquem coladas no botão */
.cart-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1; /* Ocupa o espaço disponível na esquerda */
}

#cart-total {
    font-size: 1.1rem;
    color: #fff;
    font-weight: bold;
    margin: 0;
}

/* Ajuste do Botão Finalizar para caber perfeitamente no container */
#checkout-btn {
    white-space: nowrap; /* Impede o texto do botão de quebrar linha */
    margin-left: 10px;
}

/* Ajuste Mobile para telas menores */
@media (max-width: 600px) {
    #cart-footer {
        bottom: 80px; 
        width: 94%; /* Um pouco mais largo no celular para aproveitar espaço[cite: 3] */
        padding: 8px 12px;
    }
}
    #cart-total {
        font-size: 0.95rem;
    }


/* O modal agora ocupa 100% da largura e altura da tela */
/* Use display: none para esconder */
.modal-hidden {
    display: none !important;
}

/* Garanta que o ID tenha prioridade e use flex ou block para aparecer */
#cart-modal {
    display: none; /* Começa escondido */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.955);
    z-index: 9999;
}

/* Classe que o JS vai adicionar */
#cart-modal.visible {
    display: flex !important;
}

/* Quando esta classe for adicionada via JS, o modal aparece */


.modal-content {
    width: 100%;
    min-height: 100%;
    padding: 20px;
    box-sizing: border-box; /* Garante que o padding não aumente o tamanho */
    display: flex;
    flex-direction: column;
}

/* Ajuste no cabeçalho do modal para mobile */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}



#close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

#cart-items-list {
    overflow-y: auto;
    margin: 20px 0;
    flex-grow: 1;
    color:rgb(245, 215, 160)
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #222;
}

.remove-item {
    background: #444;
    color: #ff4d4d;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.modal-footer {
    border-top: 1px solid #333;
    padding-top: 15px;
}

.modal-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--yellow);
}

#final-pay-btn {
    width: 100%;
    background: var(--red-neon);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

/* Nova Barra de Contatos Abaixo do Header */
.social-contact-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px 10px;
    background: rgba(0, 0, 0, 0.4); /* Fundo sutil para destacar da madeira */
    border-bottom: 1px solid #333;
}

/* Estilo do Botão Individual */
.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Tamanho Aumentado do Ícone SVG */
.social-link svg {
    width: 28px; /* Aumentado de 24px para 28px */
    height: 28px;
}

/* Cores Específicas */
.social-link.whatsapp {
    background: #25d366;
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

/* Ajuste Mobile para caber os dois lado a lado */
@media (max-width: 600px) {
    .social-contact-bar {
        gap: 10px;
        padding: 10px 5px;
    }
    
    .social-link {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    .social-link svg {
        width: 22px;
        height: 22px;
    }
    
    /* Esconde o texto no mobile se a tela for muito pequena para focar no ícone */
    .social-link span {
        display: inline-block;
    }
}

.delivery-options {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.delivery-options h3 {
    font-size: 0.9rem;
    color: var(--yellow);
    margin-bottom: 10px;
    text-transform: uppercase;
}

#delivery-method, #customer-address, #customer-reference {
    width: 100%;
    padding: 10px;
    background: #222;
    border: 1px solid #444;
    color: white;
    border-radius: 5px;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.hidden { display: none; }

#address-container {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.payment-options {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #444;
}

.payment-options h3 {
    font-size: 0.9rem;
    color: var(--yellow);
    margin-bottom: 10px;
    text-transform: uppercase;
}

#payment-method, #needs-change, #change-value {
    width: 100%;
    padding: 10px;
    background: #222;
    border: 1px solid #444;
    color: white;
    border-radius: 5px;
    margin-bottom: 10px;
}

label {
    display: block;
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 5px;
}

/* Remove as setinhas de aumentar/diminuir valor (Chrome, Safari, Edge e Firefox) */
#change-value::-webkit-outer-spin-button,
#change-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#change-value {
    -moz-appearance: textfield; /* Para Firefox */
    appearance: textfield;
}

/* Garante que os campos fiquem dentro do container e não "vazem" */
.payment-options, #change-container, #change-input-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box; /* Garante que padding não aumente o tamanho real do box */
}

#change-value {
    width: 100%;
    max-width: 100%; /* Impede que ele saia para fora */
    box-sizing: border-box; 
    padding: 12px;
    background: #222;
    border: 1px solid #444;
    color: white;
    border-radius: 5px;
    margin-top: 5px;
}

.hidden {
    display: none !important; /* O !important garante que nada sobressaia essa regra */
}


/* Seleciona TODOS os inputs e selects dentro do container de endereço e troco */
#address-container input, 
#address-container select,
#change-input-container input {
    background-color: #222 !important; /* Força o fundo escuro */
    color: white !important; /* Força o texto branco */
    border: 1px solid #374151;
    border-radius: 0.375rem;
    padding: 0.5rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

/* Mantém o estilo ao clicar/focar */
#address-container input:focus, 
#change-input-container input:focus {
    background-color: #222 !important;
    border-color: #ef4444; /* Cor de destaque */
    color: white !important;
}

/* Remove o fundo branco do preenchimento automático em TODOS os campos */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px #222 inset !important;
    transition: background-color 5000s ease-in-out 0s;
}