/* ============================================================
   ADEGA DA ESQUINA - Design System
   WS WebSoftware

   Um unico arquivo de fundacao para a loja e para o painel.
   Tudo o que for cor, espaco, tipografia ou forma nasce aqui -
   nenhuma tela inventa um valor proprio.

   A paleta parte da marca que ja existe no uniforme (vermelho,
   preto, branco) e a aprofunda: o vermelho vira um tom de carne
   madura, sem neon; o preto vira carvao quente, nao azulado.
   ============================================================ */

/* ------------------------------------------------------------
   1. TOKENS
   ------------------------------------------------------------ */
:root {
    /* --- Marca ---------------------------------------------- */
    --marca-vermelho:       #F5B800;  /* acao, identidade, preco */
    --marca-vermelho-forte: #D49A00;  /* hover/pressionado */
    --marca-vermelho-claro: #FFD23F;
    --marca-texto:          #8A6100;  /* amarelo-ouro escuro: texto/preco sobre fundo claro */
    --marca-carvao:         #17120F;  /* preto quente, base escura */
    --marca-carvao-2:       #241D19;
    --marca-creme:          #FBF8F5;  /* branco que nao estala */
    --marca-osso:           #F2EBE4;

    /* --- Neutros -------------------------------------------- */
    --fundo:          #FBF8F5;
    --superficie:     #FFFFFF;
    --superficie-2:   #F6F1EC;
    --superficie-3:   #EFE8E1;
    --borda:          #E5DCD3;
    --borda-forte:    #D4C7BA;

    --texto:          #1C1614;
    --texto-2:        #5A4F48;
    --texto-3:        #8C7F75;
    --texto-invertido:#FFF9F4;

    /* --- Semanticos ----------------------------------------- */
    --sucesso:        #1E7A46;
    --sucesso-bg:     #E6F4EC;
    --alerta:         #9A6206;
    --alerta-bg:      #FDF3E0;
    --erro:           #B3261E;
    --erro-bg:        #FDECEA;
    --info:           #1C5B93;
    --info-bg:        #E8F1F9;

    /* --- Status do pedido ----------------------------------- */
    --st-novo:        #B3261E;
    --st-novo-bg:     #FDECEA;
    --st-aceito:      #1C5B93;
    --st-aceito-bg:   #E8F1F9;
    --st-preparando:  #9A6206;
    --st-preparando-bg:#FDF3E0;
    --st-pronto:      #6B21A8;
    --st-pronto-bg:   #F3EAFB;
    --st-entrega:     #0E6E6E;
    --st-entrega-bg:  #E2F3F3;
    --st-concluido:   #1E7A46;
    --st-concluido-bg:#E6F4EC;
    --st-cancelado:   #6B6259;
    --st-cancelado-bg:#EFEBE7;

    /* --- Tipografia ----------------------------------------- */
    /* Sora: titulos com presenca, sem parecer fonte de sistema.
       Inter: texto e numeros, legibilidade acima de tudo. */
    --fonte-titulo: 'Sora', 'Segoe UI', system-ui, sans-serif;
    --fonte-texto:  'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --fonte-numero: 'Inter', system-ui, sans-serif;

    --t-xs:   0.75rem;    /* 12 */
    --t-sm:   0.8125rem;  /* 13 */
    --t-base: 0.9375rem;  /* 15 - corpo no mobile */
    --t-md:   1rem;       /* 16 */
    --t-lg:   1.125rem;   /* 18 */
    --t-xl:   1.375rem;   /* 22 */
    --t-2xl:  1.75rem;    /* 28 */
    --t-3xl:  2.25rem;    /* 36 */

    /* --- Espaco (escala de 4) -------------------------------- */
    --e-1: 4px;   --e-2: 8px;   --e-3: 12px;  --e-4: 16px;
    --e-5: 20px;  --e-6: 24px;  --e-8: 32px;  --e-10: 40px;
    --e-12: 48px; --e-16: 64px; --e-20: 80px;

    /* --- Forma ---------------------------------------------- */
    --raio-xs: 6px;
    --raio-sm: 10px;
    --raio:    14px;
    --raio-lg: 20px;
    --raio-xl: 28px;
    --raio-pill: 999px;

    /* --- Elevacao: sutil, sempre ---------------------------- */
    --sombra-xs: 0 1px 2px rgba(28, 22, 20, .06);
    --sombra-sm: 0 2px 8px rgba(28, 22, 20, .07);
    --sombra:    0 6px 20px rgba(28, 22, 20, .09);
    --sombra-lg: 0 16px 44px rgba(28, 22, 20, .14);

    /* --- Movimento ------------------------------------------ */
    --rapido: 120ms cubic-bezier(.4, 0, .2, 1);
    --normal: 220ms cubic-bezier(.4, 0, .2, 1);
    --suave:  340ms cubic-bezier(.22, 1, .36, 1);

    /* --- Layout --------------------------------------------- */
    --largura-max: 1180px;
    --altura-barra-mobile: 68px;
    --altura-cabecalho: 60px;
    --z-cabecalho: 40;
    --z-barra: 45;
    --z-overlay: 60;
    --z-modal: 70;
    --z-toast: 90;
}

/* ------------------------------------------------------------
   2. RESET
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--fonte-texto);
    font-size: var(--t-base);
    line-height: 1.6;
    color: var(--texto);
    background: var(--fundo);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100dvh;
    /* Evita o "pulo" horizontal que um elemento largo causaria no celular */
    overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

/*
   O atributo hidden precisa SEMPRE vencer.

   O navegador implementa hidden como um display:none de baixa
   prioridade; qualquer classe ou style inline com "display" o anula.
   Foi assim que as categorias do painel apareceram todas abertas: o
   formulario tinha hidden E display:block inline. Esta regra impede
   que essa classe de erro volte em qualquer tela.
*/
[hidden] { display: none !important; }

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

table { border-collapse: collapse; width: 100%; }

h1, h2, h3, h4, h5 {
    font-family: var(--fonte-titulo);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -.02em;
    color: var(--texto);
}

h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); }

/* Foco visivel sempre - navegacao por teclado e requisito, nao extra */
:focus-visible {
    outline: 2.5px solid var(--marca-texto);
    outline-offset: 2px;
    border-radius: var(--raio-xs);
}

/* Respeita quem pediu menos movimento no sistema operacional */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------
   3. UTILITARIOS DE ACESSIBILIDADE
   ------------------------------------------------------------ */
.so-leitor {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pular-para-conteudo {
    position: absolute;
    left: -9999px;
    top: var(--e-2);
    z-index: 200;
    background: var(--marca-carvao);
    color: var(--texto-invertido);
    padding: var(--e-3) var(--e-5);
    border-radius: var(--raio-sm);
    font-weight: 600;
}

.pular-para-conteudo:focus { left: var(--e-4); }

/* ------------------------------------------------------------
   4. LAYOUT
   ------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: var(--largura-max);
    margin-inline: auto;
    padding-inline: var(--e-4);
}

@media (min-width: 768px) {
    .container { padding-inline: var(--e-6); }
}

.pilha       { display: flex; flex-direction: column; }
.pilha-2     { display: flex; flex-direction: column; gap: var(--e-2); }
.pilha-3     { display: flex; flex-direction: column; gap: var(--e-3); }
.pilha-4     { display: flex; flex-direction: column; gap: var(--e-4); }
.pilha-6     { display: flex; flex-direction: column; gap: var(--e-6); }
.linha       { display: flex; align-items: center; gap: var(--e-3); }
.linha-2     { display: flex; align-items: center; gap: var(--e-2); }
.entre       { display: flex; align-items: center; justify-content: space-between; gap: var(--e-3); }
.crescer     { flex: 1 1 auto; min-width: 0; }
.centralizado{ text-align: center; }
.direita     { text-align: right; }
.quebra      { flex-wrap: wrap; }

.mt-1 { margin-top: var(--e-2); }
.mt-2 { margin-top: var(--e-4); }
.mt-3 { margin-top: var(--e-6); }
.mt-4 { margin-top: var(--e-8); }
.mb-1 { margin-bottom: var(--e-2); }
.mb-2 { margin-bottom: var(--e-4); }
.mb-3 { margin-bottom: var(--e-6); }

/* ------------------------------------------------------------
   5. TIPOGRAFIA APLICADA
   ------------------------------------------------------------ */
.titulo-secao {
    font-family: var(--fonte-titulo);
    font-size: var(--t-xl);
    font-weight: 700;
    letter-spacing: -.02em;
}

.sobretitulo {
    font-size: var(--t-xs);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--marca-texto);
}

.suave   { color: var(--texto-2); }
.fraco   { color: var(--texto-3); }
.pequeno { font-size: var(--t-sm); }
.menor   { font-size: var(--t-xs); }
.forte   { font-weight: 600; }
.negrito { font-weight: 700; }

/* Preco: tabular-nums alinha os digitos em coluna nas listas */
.preco {
    font-family: var(--fonte-numero);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.preco-cifrao { font-size: .72em; font-weight: 600; margin-right: 1px; }
.preco-unidade { font-size: .74em; font-weight: 500; color: var(--texto-3); }

.preco-antigo {
    text-decoration: line-through;
    color: var(--texto-3);
    font-weight: 500;
    font-size: .86em;
}

.numero {
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

/* ------------------------------------------------------------
   6. BOTOES
   Altura minima 44px em todos: alvo de toque confortavel.
   ------------------------------------------------------------ */
.botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--e-2);
    min-height: 44px;
    padding: 0 var(--e-5);
    border-radius: var(--raio-sm);
    font-family: var(--fonte-texto);
    font-size: var(--t-base);
    font-weight: 600;
    letter-spacing: -.01em;
    white-space: nowrap;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background var(--rapido), border-color var(--rapido),
                color var(--rapido), transform var(--rapido), box-shadow var(--rapido);
    -webkit-tap-highlight-color: transparent;
}

.botao:active { transform: scale(.975); }

.botao-principal {
    background: var(--marca-vermelho);
    color: var(--marca-carvao);
    box-shadow: var(--sombra-xs);
}
.botao-principal:hover { background: var(--marca-vermelho-forte); }

.botao-escuro {
    background: var(--marca-carvao);
    color: var(--texto-invertido);
}
.botao-escuro:hover { background: var(--marca-carvao-2); }

.botao-contorno {
    background: var(--superficie);
    border-color: var(--borda-forte);
    color: var(--texto);
}
.botao-contorno:hover { border-color: var(--texto-2); background: var(--superficie-2); }

.botao-suave {
    background: var(--superficie-2);
    color: var(--texto);
}
.botao-suave:hover { background: var(--superficie-3); }

.botao-fantasma { background: transparent; color: var(--texto-2); }
.botao-fantasma:hover { background: var(--superficie-2); color: var(--texto); }

.botao-perigo { background: var(--erro); color: #fff; }
.botao-perigo:hover { background: #8F1E17; }

.botao-sucesso { background: var(--sucesso); color: #fff; }
.botao-sucesso:hover { background: #176037; }

.botao-bloco { width: 100%; }
.botao-grande { min-height: 52px; font-size: var(--t-md); padding-inline: var(--e-6); }
.botao-pequeno { min-height: 36px; font-size: var(--t-sm); padding-inline: var(--e-3); border-radius: var(--raio-xs); }

.botao[disabled], .botao.desativado {
    opacity: .5;
    pointer-events: none;
    cursor: not-allowed;
}

/* Botao so de icone - mantem os 44px de alvo mesmo sem texto */
.botao-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--raio-sm);
    color: var(--texto-2);
    transition: background var(--rapido), color var(--rapido);
    flex-shrink: 0;
}
.botao-icone:hover { background: var(--superficie-2); color: var(--texto); }

/* Estado de carregando: o texto some e entra um anel girando */
.botao.carregando {
    color: transparent !important;
    pointer-events: none;
    position: relative;
}
.botao.carregando::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: girar .6s linear infinite;
}
.botao-contorno.carregando::after,
.botao-suave.carregando::after {
    border-color: rgba(28,22,20,.2);
    border-top-color: var(--texto);
}

@keyframes girar { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------
   7. CARTAO
   ------------------------------------------------------------ */
.cartao {
    background: var(--superficie);
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    box-shadow: var(--sombra-xs);
    overflow: hidden;
}

.cartao-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--e-3);
    padding: var(--e-4) var(--e-5);
    border-bottom: 1px solid var(--borda);
}

.cartao-topo h3 {
    display: flex;
    align-items: center;
    gap: var(--e-2);
    font-size: var(--t-md);
}

.cartao-corpo { padding: var(--e-5); }
.cartao-rodape {
    padding: var(--e-4) var(--e-5);
    border-top: 1px solid var(--borda);
    background: var(--superficie-2);
}

.cartao-clicavel { transition: box-shadow var(--normal), transform var(--normal), border-color var(--normal); }
.cartao-clicavel:hover {
    box-shadow: var(--sombra);
    border-color: var(--borda-forte);
    transform: translateY(-2px);
}

/* ------------------------------------------------------------
   8. FORMULARIOS
   font-size 16px no mobile: abaixo disso o iOS da zoom sozinho
   ao focar o campo.
   ------------------------------------------------------------ */
.campo { margin-bottom: var(--e-4); }

.campo > label,
.rotulo {
    display: block;
    margin-bottom: var(--e-2);
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--texto);
}

.campo input[type=text],
.campo input[type=email],
.campo input[type=password],
.campo input[type=tel],
.campo input[type=url],
.campo input[type=number],
.campo input[type=date],
.campo input[type=time],
.campo input[type=search],
.campo select,
.campo textarea,
.entrada {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: var(--e-3) var(--e-4);
    font-size: 16px;
    color: var(--texto);
    background: var(--superficie);
    border: 1.5px solid var(--borda-forte);
    border-radius: var(--raio-sm);
    transition: border-color var(--rapido), box-shadow var(--rapido), background var(--rapido);
    -webkit-appearance: none;
    appearance: none;
}

.campo textarea, textarea.entrada {
    min-height: 100px;
    resize: vertical;
    line-height: 1.55;
}

.campo select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235A4F48' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--e-3) center;
    padding-right: var(--e-10);
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus,
.entrada:focus {
    outline: none;
    border-color: var(--marca-vermelho);
    box-shadow: 0 0 0 3.5px rgba(245,184,0, .13);
}

.campo input::placeholder, .campo textarea::placeholder { color: var(--texto-3); }

.campo input[readonly], .campo input[disabled],
.campo select[disabled], .campo textarea[disabled] {
    background: var(--superficie-2);
    color: var(--texto-2);
    cursor: not-allowed;
}

.campo .ajuda {
    display: block;
    margin-top: var(--e-2);
    font-size: var(--t-xs);
    color: var(--texto-3);
    line-height: 1.5;
}

/* Erro nunca depende so da cor: vem com texto e com icone */
.campo.com-erro input,
.campo.com-erro select,
.campo.com-erro textarea {
    border-color: var(--erro);
    background: var(--erro-bg);
}

.campo .erro-campo {
    display: flex;
    align-items: flex-start;
    gap: var(--e-1);
    margin-top: var(--e-2);
    font-size: var(--t-xs);
    font-weight: 600;
    color: var(--erro);
}

.campo .erro-campo svg { flex-shrink: 0; margin-top: 2px; }

.linha-campos { display: grid; gap: var(--e-3); }

@media (min-width: 560px) {
    .linha-campos { grid-template-columns: 1fr 1fr; }
    .linha-campos.tres { grid-template-columns: 1fr 1fr 1fr; }
    .linha-campos.dois-um { grid-template-columns: 2fr 1fr; }
    .linha-campos.um-dois { grid-template-columns: 1fr 2fr; }
}

/* Interruptor (liga/desliga) */
.interruptor {
    display: flex;
    align-items: center;
    gap: var(--e-3);
    cursor: pointer;
    user-select: none;
    padding: var(--e-1) 0;
    min-height: 44px;
}

.interruptor input { position: absolute; opacity: 0; width: 0; height: 0; }

.interruptor .trilho {
    position: relative;
    flex-shrink: 0;
    width: 48px; height: 28px;
    background: var(--borda-forte);
    border-radius: var(--raio-pill);
    transition: background var(--normal);
}

.interruptor .trilho::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 22px; height: 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--sombra-xs);
    transition: transform var(--normal);
}

.interruptor input:checked + .trilho { background: var(--sucesso); }
.interruptor input:checked + .trilho::after { transform: translateX(20px); }
.interruptor input:focus-visible + .trilho { outline: 2.5px solid var(--marca-texto); outline-offset: 2px; }

/* Opcao selecionavel em cartao (forma de pagamento, entrega, corte) */
.opcao-cartao {
    display: flex;
    align-items: center;
    gap: var(--e-3);
    padding: var(--e-4);
    background: var(--superficie);
    border: 1.5px solid var(--borda-forte);
    border-radius: var(--raio-sm);
    cursor: pointer;
    transition: border-color var(--rapido), background var(--rapido), box-shadow var(--rapido);
    min-height: 56px;
}

.opcao-cartao:hover { border-color: var(--texto-3); }

.opcao-cartao input { position: absolute; opacity: 0; width: 0; height: 0; }

.opcao-cartao .marcador {
    position: relative;
    flex-shrink: 0;
    width: 22px; height: 22px;
    border: 2px solid var(--borda-forte);
    border-radius: 50%;
    transition: border-color var(--rapido);
}

.opcao-cartao .marcador::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: var(--marca-vermelho);
    transform: scale(0);
    transition: transform var(--rapido);
}

.opcao-cartao input:checked ~ .marcador { border-color: var(--marca-vermelho); }
.opcao-cartao input:checked ~ .marcador::after { transform: scale(1); }

.opcao-cartao:has(input:checked) {
    border-color: var(--marca-vermelho);
    background: #FFFAE6;
    box-shadow: 0 0 0 3px rgba(245,184,0,.08);
}

.opcao-cartao:has(input:focus-visible) { outline: 2.5px solid var(--marca-texto); outline-offset: 2px; }

.opcao-cartao .texto { flex: 1; min-width: 0; }
.opcao-cartao .texto strong { display: block; font-size: var(--t-base); font-weight: 600; }
.opcao-cartao .texto span { display: block; font-size: var(--t-xs); color: var(--texto-3); }

/* ------------------------------------------------------------
   9. ETIQUETAS E SELOS
   Todo status tem cor + texto; a cor sozinha nunca informa.
   ------------------------------------------------------------ */
.etiqueta {
    display: inline-flex;
    align-items: center;
    gap: var(--e-1);
    padding: 4px var(--e-3);
    border-radius: var(--raio-pill);
    font-size: var(--t-xs);
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
    background: var(--superficie-3);
    color: var(--texto-2);
}

.etiqueta.sucesso   { background: var(--sucesso-bg); color: var(--sucesso); }
.etiqueta.alerta    { background: var(--alerta-bg);  color: var(--alerta); }
.etiqueta.erro      { background: var(--erro-bg);    color: var(--erro); }
.etiqueta.info      { background: var(--info-bg);    color: var(--info); }
.etiqueta.marca     { background: #FFF4CC;           color: var(--marca-texto); }
.etiqueta.escura    { background: var(--marca-carvao); color: var(--texto-invertido); }

.st-novo       { background: var(--st-novo-bg);       color: var(--st-novo); }
.st-aceito     { background: var(--st-aceito-bg);     color: var(--st-aceito); }
.st-preparando { background: var(--st-preparando-bg); color: var(--st-preparando); }
.st-pronto     { background: var(--st-pronto-bg);     color: var(--st-pronto); }
.st-entrega    { background: var(--st-entrega-bg);    color: var(--st-entrega); }
.st-concluido  { background: var(--st-concluido-bg);  color: var(--st-concluido); }
.st-cancelado  { background: var(--st-cancelado-bg);  color: var(--st-cancelado); }

/* Ponto pulsante do pedido novo - chama sem gritar */
.ponto-vivo {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulsar 1.8s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulsar {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%      { opacity: .45; transform: scale(.82); }
}

/* ------------------------------------------------------------
   10. AVISOS
   ------------------------------------------------------------ */
.aviso {
    display: flex;
    align-items: flex-start;
    gap: var(--e-3);
    padding: var(--e-4);
    border-radius: var(--raio-sm);
    font-size: var(--t-sm);
    line-height: 1.55;
    margin-bottom: var(--e-4);
    border: 1px solid transparent;
}

.aviso svg { flex-shrink: 0; margin-top: 1px; }
.aviso strong { font-weight: 700; }

.aviso.sucesso { background: var(--sucesso-bg); color: #145733; border-color: #BFE3CE; }
.aviso.alerta  { background: var(--alerta-bg);  color: #7A4E05; border-color: #F0DCB4; }
.aviso.erro    { background: var(--erro-bg);    color: #8F1E17; border-color: #F3C9C5; }
.aviso.info    { background: var(--info-bg);    color: #174B79; border-color: #C3DAEE; }

/* ------------------------------------------------------------
   11. ESTADO VAZIO
   ------------------------------------------------------------ */
.vazio {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--e-12) var(--e-5);
    gap: var(--e-3);
}

.vazio .simbolo {
    display: grid;
    place-items: center;
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--superficie-2);
    color: var(--texto-3);
    margin-bottom: var(--e-1);
}

.vazio h3 { font-size: var(--t-lg); }
.vazio p  { color: var(--texto-2); font-size: var(--t-sm); max-width: 38ch; }

/* ------------------------------------------------------------
   12. ESQUELETO (loading)
   ------------------------------------------------------------ */
.esqueleto {
    background: linear-gradient(90deg, var(--superficie-2) 25%, var(--superficie-3) 50%, var(--superficie-2) 75%);
    background-size: 200% 100%;
    animation: brilho 1.4s ease-in-out infinite;
    border-radius: var(--raio-xs);
}

@keyframes brilho {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.esqueleto-linha { height: 12px; margin-bottom: var(--e-2); }
.esqueleto-titulo { height: 20px; width: 55%; margin-bottom: var(--e-3); }

/* ------------------------------------------------------------
   13. TOAST
   ------------------------------------------------------------ */
.toasts {
    position: fixed;
    left: 50%;
    bottom: calc(var(--altura-barra-mobile) + var(--e-4) + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--e-2);
    width: calc(100% - var(--e-8));
    max-width: 420px;
    pointer-events: none;
}

@media (min-width: 900px) {
    .toasts { bottom: var(--e-6); left: auto; right: var(--e-6); transform: none; }
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--e-3);
    padding: var(--e-4);
    border-radius: var(--raio-sm);
    background: var(--marca-carvao);
    color: var(--texto-invertido);
    font-size: var(--t-sm);
    font-weight: 500;
    box-shadow: var(--sombra-lg);
    pointer-events: auto;
    animation: toast-entra var(--suave);
}

.toast svg { flex-shrink: 0; }
.toast.sucesso svg { color: #6EE7A8; }
.toast.erro    svg { color: #FCA5A5; }
.toast.saindo  { animation: toast-sai var(--normal) forwards; }

@keyframes toast-entra {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-sai {
    to { opacity: 0; transform: translateY(8px) scale(.97); }
}

/* ------------------------------------------------------------
   14. MODAL
   ------------------------------------------------------------ */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(23, 18, 15, .55);
    backdrop-filter: blur(3px);
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--normal), visibility var(--normal);
}

.overlay.aberto { opacity: 1; visibility: visible; }

.modal {
    position: fixed;
    z-index: var(--z-modal);
    background: var(--superficie);
    box-shadow: var(--sombra-lg);
    display: flex;
    flex-direction: column;
    max-height: 90dvh;

    /* No celular sobe de baixo, como o sistema faz. */
    left: 0; right: 0; bottom: 0;
    border-radius: var(--raio-lg) var(--raio-lg) 0 0;
    transform: translateY(100%);
    transition: transform var(--suave);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.modal.aberto { transform: translateY(0); }

@media (min-width: 720px) {
    .modal {
        left: 50%; right: auto; bottom: auto; top: 50%;
        width: min(560px, calc(100vw - var(--e-10)));
        border-radius: var(--raio-lg);
        transform: translate(-50%, -46%) scale(.97);
        opacity: 0;
        transition: transform var(--normal), opacity var(--normal);
    }
    .modal.aberto { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.modal-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--e-3);
    padding: var(--e-5);
    border-bottom: 1px solid var(--borda);
    flex-shrink: 0;
}

.modal-corpo { padding: var(--e-5); overflow-y: auto; -webkit-overflow-scrolling: touch; }

.modal-rodape {
    display: flex;
    gap: var(--e-3);
    padding: var(--e-4) var(--e-5);
    border-top: 1px solid var(--borda);
    background: var(--superficie-2);
    flex-shrink: 0;
}

.modal-rodape .botao { flex: 1; }

/* Alca do modal no celular: sinal de "arrasta para fechar" */
.modal-alca {
    width: 40px; height: 4px;
    background: var(--borda-forte);
    border-radius: var(--raio-pill);
    margin: var(--e-3) auto 0;
}

@media (min-width: 720px) { .modal-alca { display: none; } }

/* ------------------------------------------------------------
   15. CONTADOR DE QUANTIDADE (stepper)
   ------------------------------------------------------------ */
.contador {
    display: inline-flex;
    align-items: center;
    background: var(--superficie);
    border: 1.5px solid var(--borda-forte);
    border-radius: var(--raio-pill);
    overflow: hidden;
    flex-shrink: 0;
}

.contador button {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    color: var(--marca-texto);
    transition: background var(--rapido);
    flex-shrink: 0;
}

.contador button:hover { background: var(--superficie-2); }
.contador button:disabled { color: var(--texto-3); opacity: .45; pointer-events: none; }

.contador .valor {
    min-width: 62px;
    text-align: center;
    font-size: var(--t-sm);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    padding-inline: var(--e-1);
}

.contador.compacto button { width: 34px; height: 34px; }
.contador.compacto .valor { min-width: 48px; font-size: var(--t-xs); }

/* ------------------------------------------------------------
   16. DIVISORES E MISC
   ------------------------------------------------------------ */
.divisor { height: 1px; background: var(--borda); border: 0; margin: var(--e-5) 0; }

.divisor-texto {
    display: flex;
    align-items: center;
    gap: var(--e-3);
    margin: var(--e-5) 0;
    font-size: var(--t-xs);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--texto-3);
}

.divisor-texto::before, .divisor-texto::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--borda);
}

/* Faixa fina de destaque da marca */
.faixa-marca {
    height: 3px;
    background: linear-gradient(90deg, var(--marca-vermelho), var(--marca-vermelho-claro) 55%, var(--marca-carvao));
}

.oculto { display: none !important; }

@media (max-width: 767px)  { .so-desktop { display: none !important; } }
@media (min-width: 768px)  { .so-mobile  { display: none !important; } }

/* Impressao: some tudo que e navegacao */
@media print {
    .sem-impressao, .barra-mobile, .cabecalho-loja, .painel-lateral, .toasts { display: none !important; }
    body { background: #fff; }
    .cartao { box-shadow: none; border-color: #ddd; }
}
