:root {
    --vermelho-principal: #B02A37;
    --vermelho-escuro: #4A0E0E;
    --laranja-detalhes: #FF4500;
    --verde-whatsapp: #25D366;
    --cinza-fundo: #f4f4f4;
    --branco: #ffffff;
    --texto-escuro: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
    font-family: 'Poppins', sans-serif;
}

html, body {
    width: 100%;
    overflow-x: hidden; 
    background-color: var(--cinza-fundo);
    color: var(--texto-escuro);
    scroll-behavior: smooth;
    scroll-padding-top: 75px;
}

body {
    padding-bottom: 180px; 
}

.main-header {
    background-color: var(--vermelho-principal);
    color: var(--branco);
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--branco);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    object-fit: cover;
}

.menu-categorias {
    position: -webkit-sticky; 
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--branco);
    display: flex;
    overflow-x: auto;
    padding: 15px;
    gap: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.menu-categorias a {
    text-decoration: none;
    color: var(--vermelho-principal);
    border: 1.5px solid var(--vermelho-principal);
    padding: 8px 22px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
    background-color: transparent;
}

.menu-categorias a.active {
    background-color: var(--vermelho-principal) !important;
    color: var(--branco) !important;
}

.menu-categorias {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    display: flex;
    overflow-x: auto;
    padding: 15px;
    gap: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.menu-categorias a.active {
    background-color: #4A0E0E !important; 
    color: #ffffff !important;
    border-color: #4A0E0E !important;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px;
}

.cardapio {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    width: 100%;
}

.categoria-titulo {
    font-size: 1.2rem;
    color: var(--vermelho-principal);
    text-transform: uppercase;
    margin: 30px 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.categoria-titulo::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #ddd;
}

.item-salgado {
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    background: var(--branco);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: 100%;
    text-align: center;
}

.item-salgado img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

.item-salgado h3 {
    font-size: 0.95rem;
    color: var(--texto-escuro);
    min-height: 2.8em; 
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.preco-produto {
    margin-top: auto; 
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--texto-escuro);
    margin-bottom: 8px;
}

.seletor-quantidade {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.seletor-quantidade button {
    background-color: var(--vermelho-principal);
    color: white;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qtd-numero {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 25px;
}

.carrinho-fixo {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--vermelho-escuro);
    color: white;
    padding: 15px;
    z-index: 9999;
    border-top: 3px solid var(--laranja-detalhes);
    display: flex;
    flex-direction: column;
}

.resumo-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.textos-resumo p {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.total-destaque {
    font-size: 1.3rem;
    font-weight: 800;
}

.dados-entrega {
    display: none;
    background-color: #fff;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.dados-entrega.ativo {
    display: block !important;
}

.dados-entrega input, .dados-entrega select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
}

.input-linha {
    display: flex;
    gap: 10px;
}

/* Botões do Carrinho */
#btn-finalizar {
    background-color: var(--verde-whatsapp);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

#btn-voltar {
    background-color: #666;
    color: white;
    margin-bottom: 10px;
    border: none;
    padding: 8px;
    border-radius: 5px;
    display: none; 
}

#overlay-fechado {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9); 
    backdrop-filter: blur(5px); 
    z-index: 99999; 
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    text-align: center;
    padding: 20px;
}

#overlay-fechado h1 {
    font-size: 2.5rem;
    color: #FF4500;
    margin-bottom: 15px;
    font-weight: 800;
}

#overlay-fechado p {
    font-size: 1.1rem;
    max-width: 300px;
}

#overlay-fechado {
   
    pointer-events: none; 
    z-index: 9999; 
}

.titulo-entrega {
    color: var(--vermelho-principal);
}

/* --- RESPONSIVIDADE MOBILE --- */
@media (max-width: 768px) {
    .cardapio {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
    }

    .item-salgado {
        padding: 10px;
    }

    .item-salgado h3 {
        font-size: 0.85rem;
    }

    .logo {
        width: 100px;
        height: 100px;
    }

    .resumo-info {
        flex-direction: row; 
    }

    .total-destaque {
        font-size: 1.1rem;
    }
}

@media (max-width: 360px) {
    .cardapio {
        grid-template-columns: 1fr; 
    }
}

#overlay-fechado {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85); 
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    text-align: center;
}

#overlay-fechado h1 {
    font-size: 2.5rem;
    color: #FF4500;
    margin-bottom: 10px;
}

#overlay-fechado p {
    font-size: 1.2rem;
}