/* RESET E VARIÁVEIS GLOBAIS */
:root {
    --primary: #d32f2f;
    --primary-hover: #b71c1c;
    --secondary: #2e7d32;
    --bg-main: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #212529;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-color);
    padding-bottom: 90px;
    line-height: 1.5;
}

/* CABEÇALHO */
.cabecalho {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.logo-texto h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.logo-texto p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* BADGES DE FUNCIONAMENTO */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-badge.aberto {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-badge.fechado {
    background-color: #ffebee;
    color: #c62828;
}

.status-ponto {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-badge.aberto .status-ponto { background-color: #2e7d32; }
.status-badge.fechado .status-ponto { background-color: #c62828; }

.horario-box {
    max-width: 1000px;
    margin: 12px auto 0;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.horario-info {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dias-fechado {
    color: #c62828;
    font-weight: 600;
}

/* NAV DE CATEGORIAS (ABAS) */
.categorias-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 16px;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 90;
    border-bottom: 1px solid var(--border-color);
    scrollbar-width: none;
}

.categorias-nav::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: #f1f3f5;
    color: var(--text-color);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cat-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* CONTAINER PRINCIPAL */
.container-principal {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 16px;
}

.secao-cardapio {
    display: none;
}

.secao-cardapio.active {
    display: block;
}

.titulo-categoria {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.subtitulo-secao {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: -12px;
    margin-bottom: 16px;
}

/* CARDS DE PRODUTOS */
.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.produto-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.produto-card.horizontal {
    flex-direction: row;
    align-items: center;
}

.produto-img-box {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #e9ecef;
}

.produto-img-box.mini {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.produto-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.produto-conteudo {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.produto-conteudo h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.descricao {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin: 6px 0 12px;
}

.produto-opcoes {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.select-field {
    flex: 1;
}

.select-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.select-field select, .input-padrao {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-size: 0.85rem;
    outline: none;
}

.produto-rodape {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
}

.preco-destaque {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary);
}

/* MONTE SEU MACARRÃO */
.card-monte {
    background: #ffffff;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.card-monte-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.badge-preco {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-top: 8px;
}

.opcao-grupo {
    margin-bottom: 20px;
}

.opcao-grupo h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.obrigatorio { color: var(--primary); }

.grid-radios, .grid-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.radio-card, .check-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 0.85rem;
    cursor: pointer;
}

.radio-card input, .check-card input {
    accent-color: var(--primary);
}

/* ADICIONAIS & BEBIDAS CARDS */
.adicionais-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.item-simples-card {
    background: #ffffff;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-info h4 {
    font-size: 0.92rem;
    font-weight: 700;
}

.preco-tag {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--secondary);
}

/* BOTÕES GERAIS */
.btn-acao {
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    background: var(--primary);
    color: #ffffff;
    transition: background 0.2s ease;
}

.btn-acao:hover { background: var(--primary-hover); }

.btn-acao.primario {
    background: var(--primary);
    color: white;
}

.btn-acao.secundario {
    background: #e9ecef;
    color: var(--text-color);
}

.btn-acao.wpp {
    background: #25d366;
    color: white;
}

.btn-acao.full {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

/* CARRINHO */
.carrinho-container {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-top: 30px;
    box-shadow: var(--shadow-md);
}

.carrinho-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.carrinho-count {
    background: #f1f3f5;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.carrinho-vazio {
    text-align: center;
    padding: 24px 0;
    color: var(--text-muted);
}

.item-carrinho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.item-carrinho-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
}

.item-carrinho-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.item-carrinho-acoes {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-qtd {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #f8f9fa;
    font-weight: 700;
    cursor: pointer;
}

.total-linha {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 16px 0;
    border-top: 2px solid var(--border-color);
    margin-top: 12px;
}

/* DADOS DE ENTREGA & LOCALIZAÇÃO */
.dados-cliente {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dados-cliente h3 {
    font-size: 1rem;
    font-weight: 700;
}

.bloco-gps {
    margin: 4px 0;
}

.btn-gps {
    width: 100%;
    padding: 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px dashed #2e7d32;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.status-gps-texto {
    font-size: 0.78rem;
    margin-top: 4px;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.textarea {
    resize: vertical;
    min-height: 70px;
}

/* FORMA DE PAGAMENTO */
.grupo-pagamento {
    margin-top: 8px;
}

.opcoes-radio-pagamento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.radio-pagamento-card {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
}

.radio-pagamento-card input {
    margin-top: 3px;
    accent-color: var(--primary);
}

.radio-content strong {
    display: block;
    font-size: 0.88rem;
}

.radio-content small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* BARRA FIXA MOBILE */
.barra-fixa-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    z-index: 100;
}

.barra-fixa-mobile.oculto { display: none; }

.info-barra {
    display: flex;
    flex-direction: column;
}

.info-barra span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.info-barra strong {
    font-size: 1.1rem;
    color: var(--primary);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.visivel {
    opacity: 1;
    pointer-events: auto;
}

.modal-conteudo {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: var(--radius);
    overflow-y: auto;
    padding: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.btn-fechar {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.resumo-bloco {
    margin: 14px 0;
}

.resumo-bloco h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.modal-total-box {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    padding: 12px 0;
    border-top: 2px solid var(--border-color);
    font-weight: 800;
}

.modal-botoes {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.modal-botoes button {
    flex: 1;
}

/* RODAPÉ */
.rodape {
    text-align: center;
    padding: 24px 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}