/* --- RESET E BASE SNOOP LANCHE (MANTIDO VISUAL ORIGINAL) --- */
* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body { background: #f8f8f8; color: #222; overflow-x: hidden; }

/* HEADER */
.header {
    background: #000; padding: 12px 16px;
    position: sticky; top: 0; z-index: 1100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header-top { display: flex; justify-content: space-between; align-items: center; }
.logo-container { display: flex; flex-direction: column; }
.logo { color: #fff; font-size: 1.2rem; font-weight: 800; text-transform: uppercase; }

/* --- 1. STATUS AJUSTADO (SÓ TEXTO VERDE/VERMELHO, SEM BOLINHA OU PULSAR) --- */
.status {
    font-size: 11px; font-weight: 800; margin-top: 4px;
    color: #888; text-transform: uppercase;
    display: flex; align-items: center; gap: 4px; /* Ajuste para o texto ficar limpo */
}
.status.aberto { color: #00a650 !important; }  /* Verde direto do botão */
.status.fechado { color: #ff4d4f !important; }

/* CARRINHO ICONE E BADGE */
.cart { position: relative; cursor: pointer; background: #222; padding: 8px; border-radius: 12px; }
.cart.tem-itens { background: #ff6b00; animation: bounce 0.5s ease infinite alternate; }
@keyframes bounce { from { transform: scale(1); } to { transform: scale(1.1); } }
.cart-badge {
    position: absolute; top: -5px; right: -5px; background: #fff; color: #ff6b00;
    font-size: 10px; font-weight: 900; width: 18px; height: 18px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* --- 2. CATEGORIAS ESTILO APP COM LINHA LARANJA --- */
.categorias-nav { background: #fff; position: sticky; top: 56px; z-index: 1000; border-bottom: 1px solid #eee; }
.categorias-scroll { display: flex; overflow-x: auto; padding: 0 15px; gap: 20px; height: 48px; align-items: center; scrollbar-width: none; }
.categorias-scroll::-webkit-scrollbar { display: none; }
.cat-item {
    font-size: 13px; font-weight: 600; color: #666; border: none; background: none;
    text-transform: uppercase; white-space: nowrap; cursor: pointer;
    transition: all 0.2s ease; border-bottom: 3px solid transparent;
}
.cat-item.active { color: #ff6b00; border-bottom: 3px solid #ff6b00; font-weight: 800; }

/* PRODUTOS E BOTÃO ADICIONAR */
.container-main { padding: 15px; max-width: 600px; margin: auto; }
.item-produto-lista {
    background: #fff; display: flex; justify-content: space-between;
    padding: 15px; border-radius: 15px; margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03); gap: 10px;
}
.info-produto strong { font-size: 14px; font-weight: 700; color: #333; display: block; margin-bottom: 4px; }
.info-produto span { font-size: 13px; font-weight: 700; color: #00a650; } /* Verde do botão escolher */
.foto-produto-lista { position: relative; width: 85px; height: 85px; flex-shrink: 0; }
.foto-produto-lista img { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; }
.btn-add-lista {
    position: absolute; bottom: -8px; right: -8px; width: 32px; height: 32px;
    background: #ff6b00; color: #fff; border: 3px solid #fff; border-radius: 10px;
    cursor: pointer; font-size: 18px; font-weight: bold;
}

/* --- 3. SELEÇÃO DE SABORES PROFISSIONAL (SEM BOLINHA SELECIONADORA) --- */
.secao-sabores h3 { margin-bottom: 15px; }
.instrucao-modal { font-size: 14px; color: #666; margin-bottom: 20px; }

/* Remove os botões de rádio originais e posiciona o efeito visual */
.lista-check-custom input[type="radio"], .lista-check-custom input[type="checkbox"] {
    position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0;
}

/* Estiliza o elemento inteiro como uma opção clicável */
.item-sabor-wizard {
    border: 1px solid #ddd; border-radius: 12px; padding: 15px;
    margin-bottom: 10px; cursor: pointer; display: flex;
    justify-content: space-between; align-items: center; transition: all 0.2s;
    background-color: #fff; /* Fundo original */
}

/* Efeito visual ao selecionar: A opção fica com borda verde e fundo suave */
.lista-check-custom input:checked + .item-sabor-wizard {
    border-color: #00a650; background-color: #f1fff3; /* Verde iFood suave */
}

/* Substitui a bolinha original por um check visual apenas quando selecionado */
.check-icon { display: none; } /* Esconde o check vazio */
.lista-check-custom input:checked + .item-sabor-wizard .check-icon {
    display: block; font-size: 16px; color: #00a650; /* Check verde visual */
}

/* --- 4. CARRINHO AJUSTADO COM BOTÃO DE EXCLUSÃO CIRCULAR COM 'X' E CORES AJUSTADAS --- */
.cart-items-list { max-height: 280px; overflow-y: auto; margin-bottom: 10px; padding-right: 8px; border-bottom: 1px solid #eee; }
.cart-item-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed #f0f0f0; }

.cart-item-info strong { font-size: 14px; font-weight: 700; color: #333; display: block; margin-bottom: 4px; }
.cart-item-info span { font-size: 13px; font-weight: 700; color: #00a650; } /* Verde do botão escolher */

/* Estilo para o botão de exclusão circular escuro com um 'X' branco centralizado, como solicitado */
.btn-excluir-item-x {
    background-color: #222; /* Fundo escuro conforme solicitado */
    color: #fff; /* 'X' branco */
    border: none; width: 36px; height: 36px; /* Tamanho circular */
    border-radius: 5px; /* Arredondamento conforme solicitado */
    font-size: 20px; font-weight: 800; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0; transition: background-color 0.3s;
}
.btn-excluir-item-x:hover { background-color: #ff4d4f; } /* Fica vermelho ao passar o mouse */

/* --- 5. CUPOM E RESUMO DE VALORES COM ESPAÇAMENTO PROFISSIONAL --- */
.cupom-secao { margin: 20px 0; padding-top: 15px; border-top: 1px dashed #ddd; }
.cupom-container { display: flex; gap: 8px; align-items: center; margin-bottom: 15px; /* Espaço para não colar no Subtotal */ }
#input-cupom { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 10px; font-size: 14px; outline: none; transition: border-color 0.3s; }
#input-cupom:focus { border-color: #ff6b00; }
#btn-aplicar-cupom { background: #222; color: #fff; border: none; padding: 10px 20px; border-radius: 10px; font-weight: 700; cursor: pointer; }

.summary-box { background: #f9f9f9; padding: 15px; border-radius: 15px; margin-top: 10px; margin-bottom: 20px; }
.summary-line { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.summary-line span:last-child { font-weight: 700; color: #00a650; /* Preço verde no resumo */ }
.total { font-weight: 800; font-size: 18px; color: #000; border-top: 1px dashed #ccc; padding-top: 8px; margin-top: 5px; }

/* MODAIS GERAIS (MANTIDO VISUAL ORIGINAL STYLE IFOOD) */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 2000; display: flex; align-items: flex-end; justify-content: center; }
.modal-box { background: #fff; width: 100%; max-width: 500px; border-radius: 25px 25px 0 0; padding: 20px; max-height: 85vh; overflow-y: auto; }
.modal-header-clean { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.btn-fechar-modal { background: #f0f0f0; border: none; width: 30px; height: 30px; border-radius: 50%; font-weight: bold; cursor: pointer; }

/* FORMULÁRIO ENTREGA GERAL (MANTIDO VISUAL ORIGINAL) */
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 12px; margin-bottom: 10px; border: 1px solid #ddd; border-radius: 10px; font-size: 14px; }
.row-inputs { display: flex; gap: 10px; }

/* BOTÕES DE AÇÃO GERAIS (MANTIDO VISUAL ORIGINAL) */
.btn-finalizar, .btn-whatsapp, .btn-principal { background: #ff6b00; color: #fff; border: none; padding: 15px; width: 100%; border-radius: 12px; font-weight: 800; font-size: 16px; margin-top: 10px; cursor: pointer; }
.btn-continuar, .btn-secundario { background: none; color: #ff6b00; border: none; width: 100%; padding: 10px; font-weight: 700; cursor: pointer; text-align: center; display: block; text-decoration: none; }

/* TOAST ADICIONAR PRODUTO (MANTIDO VISUAL ORIGINAL) */
.toast-custom { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 12px 25px; border-radius: 30px; font-weight: 600; display: none; z-index: 3000; }
/* --- SELEÇÃO DE PIZZA PROFISSIONAL --- */
.item-sabor-wizard {
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* Quando a pizza é clicada (Fica Verde) */
.item-sabor-wizard.selecionado {
    border-color: #00a650 !important;
    background-color: #f1fff3 !important; /* Fundo verde clarinho */
}
/* Quando atinge o limite (3 sabores), as que NÃO estão selecionadas ficam opacas */
.limite-atingido .item-sabor-wizard:not(.selecionado) {
    opacity: 0.5;
    filter: grayscale(1);
    cursor: not-allowed;
}
.check-icon {
    font-size: 18px;
}
/* --- BOTÃO X PRETO (FIXO) --- */
.btn-excluir-apenas-x {
    background-color: #000 !important; /* Preto total */
    color: #fff !important;            /* X Branco */
    border: none !important;
    width: 35px !important;
    height: 35px !important;
    border-radius: 8px !important;    /* Levemente arredondado */
    font-size: 18px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: transform 0.2s !important;
}
.btn-excluir-apenas-x:hover {
    background-color: #ff4d4f !important; /* Fica vermelho ao passar o mouse */
    transform: scale(1.1);
}

/* --- FIX: SOBREPOSIÇÃO DO LOADING (O QUE ESTAVA FALTANDO) --- */
#loading-geral {
    display: none; /* O JavaScript vai mudar para 'flex' */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9); /* Fundo branco semi-transparente */
    z-index: 9999; /* Garante que fica na frente do modal */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Ajuste do Spinner para garantir visibilidade */
.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #ff6b00; /* Laranja oficial Snoop */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- AJUSTE DOS BOTÕES NO RESUMO --- */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.btn-secundario {
    background: #f0f0f0 !important;
    color: #444 !important;
    padding: 12px !important;
    border-radius: 12px !important;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    border: none;
}
