
#cardapio {
    display: grid;
    grid-template-columns: 1fr; /* Uma coluna no celular */
    gap: 20px;
    margin-bottom: 100px; /* Espaço para o carrinho no mobile */
}

/* Cards de Produto */
.produto {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.produto img {
    width: 100%;
    max-width: 200px;
    border-radius: 8px;
}

.produto h3 { 
    color: #333;
    font-weight: 600;
    font-size: 1rem;
    margin: 5px 0 5px; 
    padding: 2px;
}

.produto p { 
    color: #000;
    font-size: 0.8rem;
    padding: 2px;
}

.produto .preco {
    display: block;
    font-weight: bold;
    color: #000;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.produto button {
    background: #333;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

/* Carrinho Lateral / Inferior */
/* Carrinho Base */
#carrinho {
    background: white;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 100;
    transition: transform 0.4s ease-in-out;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
    border-radius: 20px 20px 0 0;
}

/* Cabeçalho do Carrinho (Botão de abrir) */
#carrinho-header {
    background: #27ae60;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-radius: 10px 10px 0 0;
    font-weight: bold;
}

/* Conteúdo interno */
#carrinho-conteudo {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
    background: white;
}

/* Estados de Aberto/Fechado */
.carrinho-fechado {
    transform: translateY(calc(100% - 55px)); /* Deixa só o header visível */
}

.carrinho-aberto {
    transform: translateY(0);
}

/* No Desktop */
@media (min-width: 768px) {
    #carrinho {
        width: 350px;
        right: 20px;
        bottom: 20px;
        border-radius: 12px;
    }
    
    .carrinho-fechado {
        transform: translateY(calc(100% - 55px));
    }
}

#itens-carrinho {
    list-style: none;
    margin-bottom: 15px;
    margin-left: -30px;
}

#itens-carrinho li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

/* Estilo para cada linha do item no carrinho */
.item-no-carrinho {
    display: flex;    
    border-bottom: 1px solid #eee;

}

.info-item {
    flex: 1;
    padding-right: 10px;
}

.preco-e-acao {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Botão de excluir (X) */
.btn-remover {
    background: #ff4757;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-remover:hover {
    background: #ff6b81;
}

/* Botão Limpar Tudo */
.btn-limpar {
    background: #f1f1f1;
    color: #666;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    width: 100%;
}

.btn-limpar:hover {
    background: #e1e1e1;
    color: #333;
}

.total {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 15px 0;
    text-align: right;
}

.col_total{
    width: 100%;
    background-color: #ddd;
    padding: 10px;
}
    .finalizar_total{
        font-size: 1.3rem;
        color: #000;
        font-weight: bold;
        display: block; /* Força o elemento a ocupar a linha toda */
        width: 100%;    /* Garante que ele saiba qual é o limite da direita */
        text-align: right !important;
    }

.btn-novo-pedido {
    background: #27ae60;
    color: white;
    border: none;
    width: 95%;
    padding: 15px;
    margin: 10px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.btn-fechar {
    background: #ddd;
    color: white;
    border: none;
    width: 95%;
    padding: 15px;
    margin: 10px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

#carrinho button[type="submit"] {
    background: #27ae60;
    color: white;
    border: none;
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.btn-carrinho{
    width: 120px !important;   
}

/* Modal Responsivo */
.modal { display: none; position: fixed; z-index: 1; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
.modal-content {
    background: white;
    margin: 10% auto;
    padding: 25px;
    width: 90%;
    max-width: 450px;
    border-radius: 15px;
    position: relative;
}

.modal-content label {
    display: flex;
    align-items: center;
    background: #f1f1f1;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
}

.modal-content input { margin-right: 15px; transform: scale(1.3); }

/* --- Media Queries para Desktops e Tablets --- */
@media (min-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
    }

    #cardapio {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        margin-right: 350px; /* Espaço para o carrinho lateral */
        margin-bottom: 0;
    }

    #carrinho {
        width: 350px;
        height: 100vh;
        top: 0;
        right: 0;
        bottom: auto;
        border-top: none;
        border-left: 3px solid #333;
        max-height: 100vh;
    }

    header {
        margin-right: 350px;
    }
}

