:root {
    --primary: #FF441F; /* Cor PedidosYa - ou mude para #2D5A27 para Verde */
    --bg: #F9F9F9;
    --dark: #333;
    --gray: #888;
    --border: #EEE;
}

* { margin:0; padding:0; box-sizing:border-box; font-family:'Rubik', sans-serif; -webkit-tap-highlight-color:transparent; }
html { height: 100%; }
body { 
    background: var(--bg); 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* padding-bottom: 80px; espaço para cart-float */
}
main.menu-container { flex: 1; }

/* Header */
.app-header {
    position: relative; 
    background: #fff;
    padding: 15px 20px;
    z-index: 80;
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; gap: 10px; }
.logo-area img { width: 40px; height: 40px; border-radius: 50%; }
.store-details h1 { font-size: 1.1rem; color: var(--dark); }
.badge-status { font-size: 0.7rem; color: #28a745; font-weight: 600; background: #e6ffea; padding: 2px 8px; border-radius: 4px; }
.header-info p { font-size: 0.8rem; color: var(--gray); text-align: right; }

/* Banner */
.banner-area { overflow: hidden; margin: 15px 20px; border-radius: 12px; height: 160px; }
.banner-track { display: flex; width: 200%; animation: slide 10s infinite; }
.banner-track img { width: 50%; height: 160px; object-fit: cover; }
@keyframes slide { 0%, 45% { transform: translateX(0); } 55%, 100% { transform: translateX(-50%); } }

/* --- CSS PARA O CARD DE REPETIR PEDIDO --- */
#buy-again-container {
    background: #fff8e1; /* Fundo amarelinho suave */
    border: 1px solid #ffe082; /* Borda dourada */
    border-radius: 12px;
    padding: 15px 20px;
    margin: 20px; /* Afastamento das laterais */
    
    /* Layout interno */
    display: flex; /* Para alinhar texto e botão lado a lado */
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#buy-again-container h3 {
    font-size: 0.95rem;
    color: #f57f17; /* Laranja escuro */
    margin-bottom: 4px;
    display: flex; 
    align-items: center; 
    gap: 8px;
}

/* O texto do último pedido */
.last-order-text {
    font-size: 0.85rem;
    color: #666;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Coloca ... se for mto grande */
}

/* O botão de "Adicionar" */
.repeat-btn {
    background: #f57f17;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(245, 127, 23, 0.3);
}

/* Nav Categorias */
.category-nav {
    /* 1. Fixar no topo */
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 95;
    background: #fff;
    padding: 15px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);

    /* 2. Habilitar Scroll Lateral */
    display: flex;
    flex-wrap: nowrap;       /* Importante: Não deixa cair para a linha de baixo */
    overflow-x: auto;        /* Importante: Habilita o scroll */
    gap: 10px;               /* Espaço entre os botões */
    white-space: nowrap;     /* Garante que o texto não quebre */
    
    /* 3. Estética da Rolagem */
    -webkit-overflow-scrolling: touch; /* Rolagem macia no iPhone */
    scrollbar-width: none;             /* Esconde barra no Firefox */
}

/* Esconde a barra de rolagem no Chrome/Android */
.category-nav::-webkit-scrollbar {
    display: none;
}

/* --- ESTILO DOS BOTÕES (PILLS) --- */
.cat-pill {
    /* O SEGREDO ESTÁ AQUI: */
    flex: 0 0 auto;  
    flex-shrink: 0;  
    text-transform: capitalize;
    background: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #eee;
    font-size: 0.9rem;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cat-pill:hover {
    border-color: #ccc;
}

.cat-pill.active {
    background: #333; /* Ou var(--primary) se preferir colorido */
    color: #fff;
    border-color: #333;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Menu */
.menu-container { padding: 0 20px; }
.section-title { margin: 25px 0 15px; font-size: 1.2rem; font-weight: 700; color: var(--dark); text-transform: capitalize; }
.product-item {
    background: #fff; border-radius: 12px; padding: 15px; margin-bottom: 15px;
    display: flex; gap: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); cursor: pointer;
}
.prod-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.prod-title { font-size: 1rem; font-weight: 600; color: var(--dark); margin-bottom: 5px; text-transform: capitalize;}
.prod-desc { font-size: 0.8rem; color: var(--gray); margin-bottom: 8px; line-height: 1.3; }
.prod-price { font-weight: 600; color: var(--primary); }
.prod-img { width: 90px; height: 90px; border-radius: 10px; object-fit: cover; background: #eee; }

/* Aplica cor primária em todos os elementos de destaque */
.badge-primary, .highlight, .price-highlight {
    color: var(--primary);
}

.tracker-step-active {
    background: var(--primary) !important;
    color: #fff;
}

/* Barra Carrinho */
.cart-float {
    position: fixed; bottom: 20px; left: 20px; right: 20px;
    background: var(--primary); color: #fff; height: 60px;
    border-radius: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2); transform: translateY(150%); transition: 0.3s; z-index: 95; cursor: pointer;
}
.cart-float.show { transform: translateY(0); }
.cart-count { background: #fff; color: var(--primary); width: 25px; height: 25px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.8rem; }
.cart-text { font-weight: 600; }

/* Modais */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 100; display: none; justify-content: center; align-items: flex-end;
}
.modal-overlay.active { display: flex; }
.modal-bottom-sheet {
    background: #fff; width: 100%; max-width: 500px;
    border-radius: 20px 20px 0 0; padding: 25px; max-height: 90vh; display: flex; flex-direction: column;
    animation: slideUpSmooth 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.full-height { height: 95vh; }
@keyframes slideUpSmooth { 
    from { 
        transform: translateY(100%); 
        opacity: 0.8;
    } 
    to { 
        transform: translateY(0); 
        opacity: 1;
    } 
}

.close-btn, .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
}
.close-btn:hover {
    background: #ff441f; /* Cor da marca */
    color: white;
}

/* Elementos Internos Modal */
.options-list { flex: 1; overflow-y: auto; margin: 15px 0; }
.option-item {
    display: flex; justify-content: space-between; padding: 12px;
    border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; cursor: pointer;
}
.option-item.selected { border-color: var(--primary); background: #fff0ee; }

.modal-actions { display: flex; gap: 15px; }
.stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; padding: 0 10px; }
.stepper button { border: none; background: none; font-size: 1.2rem; color: var(--primary); width: 30px; cursor: pointer; }
.btn-add, .btn-finish {
    flex: 1; background: var(--primary); color: #fff; border: none; padding: 14px;
    border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 1rem;
}

/* Checkout Específico */
.checkout-header {
    display: flex;
    justify-content: space-between; /* Joga um pra cada canto e um no meio */
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.checkout-header h3 {
    font-size: 1.1rem;
    margin: 0;
    color: #333;
}

.btn-limpar {
    background: none;
    border: none;
    color: #e74c3c; /* Vermelho bonito */
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-fechar {
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%; /* Bolinha */
    font-size: 1.2rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.checkout-body { flex: 1; overflow-y: auto; padding-bottom: 20px; }

.delivery-toggle {
    display: flex;
    gap: 10px;
    background: #f2f2f2;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

.delivery-toggle button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 15px; /* Botão grande */
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: #777;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.delivery-toggle button.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid var(--primary);
    transform: scale(1.02); /* Leve aumento para destaque */
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(255, 68, 31, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 68, 31, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 68, 31, 0); }
}

.delivery-toggle {
    animation: pulse-border 2s infinite; /* Chama atenção */
}

.form-section { margin-bottom: 20px; }
.form-section h4 { font-size: 0.9rem; margin-bottom: 10px; color: var(--dark); }
/* --- CSS PARA INPUTS MAIS ROBUSTOS --- */
.form-section label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.input-field {
    width: 100%;
    padding: 14px; /* Mais alto, mais fácil de clicar */
    background: #fff;
    border: 1px solid #ccc; /* Borda visível */
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    margin-bottom: 15px;
    transition: 0.2s;
}

.input-field:focus {
    border-color: #FF441F; /* Sua cor principal */
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 68, 31, 0.1);
}

/* Arrumar o DDI cortado */
.row {
    display: flex;
    gap: 10px;
}

.input-field.small {
    width: 120px !important; /* Força largura fixa suficiente */
    flex-shrink: 0; /* Impede de encolher */
    text-overflow: ellipsis;
}

.small { width: 35%; }
.mt-10 { margin-top: 10px; } .hidden { display: none; }
.btn-gps { width: 100%; background: #007bff; color: #fff; padding: 12px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; }
.frete-info { margin-top: 8px; font-size: 0.9rem; font-weight: 600; color: #28a745; text-align: center; }

.upsell-scroller { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.upsell-card {
    min-width: 120px; border: 1px solid #eee; border-radius: 8px; padding: 10px; text-align: center; cursor: pointer;
}
.upsell-card h5 { font-size: 0.8rem; margin-bottom: 4px; }
.upsell-card span { font-size: 0.8rem; color: var(--primary); font-weight: bold; }

/* --- ADICIONE ISSO NO FINAL DO SEU CSS --- */

/* Lista de Itens no Carrinho */
.cart-items-list {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.cart-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #eee;
}

.cart-details {
    flex: 1;
}

.cart-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

.cart-variant {
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 4px;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

/* Controle de Quantidade Pequeno (Para o Carrinho) */
.qty-mini {
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
}
.qty-mini button {
    border: none;
    background: none;
    width: 28px;
    height: 28px;
    font-size: 1rem;
    color: var(--primary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.qty-mini span {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.mt-20 { margin-top: 20px; }

/* Caixa de Informação Extra de Pagamento */
.payment-info-box {
    background: #e3f2fd; /* Azulzinho claro */
    border: 1px solid #90caf9;
    color: #0d47a1;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.payment-info-box strong {
    font-weight: 700;
    font-size: 1rem;
    display: block;
    margin-bottom: 5px;
}

.modal-bottom-sheet {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    margin-bottom: 10px;
}

/* Área de Observação */
.obs-area {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}
.obs-area label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    display: block;
    margin-bottom: 5px;
}
.obs-area textarea {
    width: 100%;
    height: 60px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    font-family: 'Rubik', sans-serif;
    resize: none;
}

/* Lista de Montagem (Poke) */
.montagem-group { margin-bottom: 20px; }
.montagem-title { 
    background: #f0f0f0; 
    padding: 8px; 
    border-radius: 5px; 
    font-weight: 700; 
    font-size: 0.9rem; 
    color: var(--dark);
    margin-bottom: 8px;
}
.montagem-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 5px;
    border-bottom: 1px solid #f9f9f9;
    cursor: pointer;
}
.montagem-item input {
    width: 18px; height: 18px; accent-color: var(--primary);
}
.montagem-item span { font-size: 0.95rem; color: #555; }

@keyframes blink-red {
    0% { border-color: #ff0000; box-shadow: 0 0 0 2px rgba(255,0,0,0.1); }
    50% { border-color: #ffcccc; box-shadow: 0 0 5px rgba(255,0,0,0.5); }
    100% { border-color: #ff0000; box-shadow: 0 0 0 2px rgba(255,0,0,0.1); }
}

.erro-validacao {
    animation: blink-red 1s infinite !important;
    border: 2px solid red !important;
    background-color: #fff0f0 !important;
}

/* Texto de ajuda (Help Text) */
.msg-erro-texto {
    color: red;
    font-size: 0.8rem;
    margin-top: 4px;
    font-weight: bold;
    display: none; /* Escondido por padrão */
}

.scroll-horizontal {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 5px 0;
    /* Esconde a barra de rolagem feia em alguns navegadores */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}
.scroll-horizontal::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* A IMAGEM CORRIGIDA */
.upsell-item img {
    width: 70px;          /* Largura fixa */
    height: 70px;         /* Altura fixa (formando um quadrado) */
    object-fit: cover;    /* O PULO DO GATO: preenche o quadrado sem distorcer */
    border-radius: 12px;  /* Bordas arredondadas bonitas */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Sombra suave */
    margin-bottom: 5px;   /* Espaço para o texto abaixo */
}

/* Ajustes finos no texto do upsell */
.upsell-info h4 {
    font-size: 0.8rem;
    margin: 0;
    white-space: nowrap;       /* Não quebra linha */
    overflow: hidden;          /* Esconde o que passar */
    text-overflow: ellipsis;   /* Coloca "..." se o nome for longo */
    max-width: 100%;
}

.upsell-info span {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: bold;
    display: block;
    margin-bottom: 3px;
}

/* Botãozinho de adicionar (+) */
.upsell-info button {
    background: var(--primary);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* ===== TRACKER DE PEDIDO ===== */
@keyframes slideUp {
    from { opacity:0; transform:translateX(-50%) translateY(30px); }
    to   { opacity:1; transform:translateX(-50%) translateY(0); }
}
.tracker-step {
    flex:1; text-align:center; font-size:0.62rem; padding:5px 2px;
    border-radius:6px; color:#aaa; font-weight:600;
    transition: all 0.3s;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.tracker-step-active {
    background:var(--primary, #FF441F); color:#fff;
}
.tracker-step-done {
    background:#e8f5e9; color:#2e7d32;
}

/* === CUPOM DE DESCONTO === */
.cupom-area {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

.cupom-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: stretch; /* CORREÇÃO: alinha altura */
}

.cupom-input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    min-width: 0; /* CORREÇÃO: permite encolher */
}

.cupom-input-group button {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap; /* CORREÇÃO: não quebra texto */
    flex-shrink: 0; /* CORREÇÃO: não encolhe */
}

/* === RODAPÉ FIXO === */
footer {
    margin-top: auto !important;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* === ESTILOS MODERNOS PARA MODAIS DE CUPOM === */
.modal-card-modern {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0,0,0,0.35);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header-modern {
    background: linear-gradient(135deg, var(--primary) 0%, #e63b1f 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-modern h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn-modern {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn-modern:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-body-modern {
    padding: 25px;
    max-height: calc(85vh - 160px);
    overflow-y: auto;
}

.form-group-modern {
    margin-bottom: 20px;
}

.form-group-modern label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #34495e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group-modern label i {
    color: var(--primary);
}

/* Badge de status */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}
/* =============================================
   TRACKING CARD - ESTILOS
   ============================================= */
.track-step {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 1.2rem;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.track-step.active {
    opacity: 1;
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}