/* Cardápio em vídeo · estilo Listar: preto, ouro discreto, o prato manda */
:root {
  --preto: #0B0B0C;
  --vidro: rgba(14, 14, 16, .52);
  --branco: #F7F4EE;
  --cinza: rgba(247, 244, 238, .72);
  --ouro: #FF8A1F;          /* laranja brasa: cor que abre o apetite (nome antigo mantido) */
  --ouro-forte: #FFA53D;
  --vermelho: #E8432A;
  --laranja-grad: linear-gradient(180deg, #FFA43A 0%, #FF7A12 100%);
  --sombra-laranja: 0 10px 26px -8px rgba(255, 122, 18, .75);
  --linha: rgba(255, 255, 255, .14);
  --titulo: "Bricolage Grotesque", system-ui, sans-serif;
  --texto: "Figtree", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: var(--preto); color: var(--branco); font: 400 15px/1.45 var(--texto); overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ouro); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* palco: no celular ocupa tudo; no computador vira uma coluna de celular no meio */
.palco { position: relative; height: 100dvh; max-width: 480px; margin: 0 auto; overflow: hidden; background: #000; }
@media (min-width: 700px) {
  body { display: grid; place-items: center; background: radial-gradient(ellipse at center, #2a160b 0%, #070707 70%); }
  .palco { height: min(100dvh - 40px, 900px); aspect-ratio: 9 / 18.5; width: auto; border-radius: 34px; box-shadow: 0 0 0 1px var(--linha), 0 40px 80px -20px rgba(0,0,0,.8); }
}

/* topo */
.topo { position: absolute; z-index: 5; inset: 0 0 auto; padding: calc(12px + env(safe-area-inset-top)) 14px 22px; background: linear-gradient(rgba(0,0,0,.62), rgba(0,0,0,0)); pointer-events: none; }
.topo > * { pointer-events: auto; }
.loja { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; }
.loja-logo { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--laranja-grad); color: #2A1203; font: 800 19px var(--titulo); box-shadow: var(--sombra-laranja); }
.loja b { display: block; font: 700 16px/1.1 var(--titulo); letter-spacing: -.01em; }
.loja small { color: var(--cinza); font-size: 12.5px; }
/* troca vídeo ⇄ lista */
.trocar { position: absolute; right: 14px; top: calc(16px + env(safe-area-inset-top)); display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--vidro); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--linha); color: var(--branco); font-size: 13px; font-weight: 600; text-decoration: none; }
.trocar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
/* categorias: quatro colunas iguais, centralizadas e simétricas */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 14px auto 0; max-width: 400px; }
.cats button { position: relative; padding: 4px 0 9px; text-align: center; font-weight: 600; font-size: 15px; color: rgba(247, 244, 238, .62); transition: color .2s; white-space: nowrap; }
@media (max-width: 360px) { .cats button { font-size: 13.5px; } }
.cats button.ativo { color: var(--branco); }
.cats button.ativo::after { content: ""; position: absolute; left: 50%; width: 22px; margin-left: -11px; bottom: 0; height: 2.5px; border-radius: 2px; background: var(--ouro); }

/* feed: um prato por tela, encaixa ao arrastar */
.feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.feed::-webkit-scrollbar { display: none; }
.prato { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; }
.prato video, .prato .capa { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prato .capa { transition: opacity .4s; }
.prato.tocando .capa { opacity: 0; }
.prato::after { content: ""; position: absolute; inset: auto 0 0; height: 58%; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.35) 35%, rgba(0,0,0,.86)); pointer-events: none; }

/* informações do prato */
.info { position: absolute; z-index: 2; left: 16px; right: 84px; bottom: calc(26px + env(safe-area-inset-bottom)); }
.selo { display: inline-block; margin-bottom: 8px; padding: 3px 9px; border-radius: 999px; background: var(--vermelho); color: #fff; font-size: 12px; font-weight: 700; }
.info h2 { margin: 0; font: 750 clamp(28px, 8.4vw, 36px)/1.02 var(--titulo); letter-spacing: -.02em; text-wrap: balance; }
.info p { margin: 8px 0 14px; color: var(--cinza); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.comprar { display: flex; align-items: center; gap: 12px; }
.preco { font: 700 24px var(--titulo); letter-spacing: -.01em; }
.add { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; background: var(--laranja-grad); color: #2A1203; box-shadow: var(--sombra-laranja), inset 0 1px 0 rgba(255, 255, 255, .35); font-weight: 700; font-size: 15px; transition: transform .15s; }
.add:active { transform: scale(.96); }
.add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.add .qtd { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--vermelho); color: #fff; font-size: 12.5px; display: grid; place-items: center; }

/* coluna de ações à direita */
.acoes { position: absolute; z-index: 2; right: 10px; bottom: calc(110px + env(safe-area-inset-bottom)); display: grid; gap: 18px; justify-items: center; }
.acao { display: grid; justify-items: center; gap: 3px; font-size: 12px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.acao span:first-child { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--vidro); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--linha); }
.acao svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acao[aria-pressed="true"] svg { fill: #FF4D5E; stroke: #FF4D5E; }
.acao[aria-pressed="true"] span:first-child { animation: pulo .35s ease; }
@keyframes pulo { 50% { transform: scale(1.18); } }

/* barra de progresso do vídeo (como nos Reels) */
.progresso { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 2.5px; background: rgba(255,255,255,.18); }
.progresso i { display: block; height: 100%; width: 0; background: var(--ouro); }

/* toque: pausa / coração no duplo toque */
.estado { position: absolute; z-index: 2; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.42); opacity: 0; transition: opacity .2s; pointer-events: none; }
.estado svg { width: 34px; height: 34px; fill: #fff; }
.prato.pausado .estado { opacity: 1; }
.coracao { position: absolute; z-index: 3; width: 96px; height: 96px; margin: -48px 0 0 -48px; pointer-events: none; animation: coracao .8s ease-out forwards; }
.coracao svg { width: 100%; height: 100%; fill: #FF4D5E; filter: drop-shadow(0 6px 18px rgba(255, 77, 94, .5)); }
@keyframes coracao { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 25% { transform: scale(1.1) rotate(-6deg); opacity: 1; } 60% { transform: scale(1) rotate(-6deg); opacity: 1; } 100% { transform: translateY(-60px) scale(1.1); opacity: 0; } }

/* dica de arrastar (só no começo) */
.dica { position: absolute; z-index: 4; left: 0; right: 0; bottom: calc(180px + env(safe-area-inset-bottom)); margin: 0; display: grid; justify-items: center; gap: 2px; font-size: 13px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.7); pointer-events: none; transition: opacity .4s; animation: sobe 1.6s ease-in-out infinite; }
.dica svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dica.sumiu { opacity: 0; }
@keyframes sobe { 50% { transform: translateY(-8px); } }

/* botão da sacola */
.sacola-btn { position: absolute; z-index: 6; left: 50%; transform: translateX(-50%); top: calc(104px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 999px; background: var(--laranja-grad); color: #2A1203; font-weight: 700; box-shadow: var(--sombra-laranja); animation: entra .3s ease; }
.sacola-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.sacola-btn span { min-width: 20px; height: 20px; border-radius: 10px; background: var(--vermelho); color: #fff; font-size: 12px; display: grid; place-items: center; }
@keyframes entra { from { transform: translate(-50%, -8px); opacity: 0; } }

/* sacola */
.sacola { width: 100%; max-width: 480px; margin: auto auto 0; padding: 0; border: 0; border-radius: 26px 26px 0 0; background: #141416; color: var(--branco); max-height: 86dvh; }
.sacola::backdrop { background: rgba(0,0,0,.6); }
.sacola[open] { animation: folha .3s cubic-bezier(.2,.8,.2,1); }
@keyframes folha { from { transform: translateY(40px); opacity: 0; } }
.sacola-caixa { padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
.sacola-cabeca { display: flex; align-items: center; justify-content: space-between; }
.sacola h2 { margin: 0; font: 700 22px var(--titulo); }
.x { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 22px; line-height: 1; }
.sacola-itens { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; max-height: 42dvh; overflow-y: auto; }
.sacola-itens li { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; }
.sacola-itens img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; }
.sacola-itens b { display: block; font-weight: 600; }
.sacola-itens small { color: var(--cinza); }
.mais-menos { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.08); border-radius: 999px; padding: 3px; }
.mais-menos button { width: 32px; height: 32px; border-radius: 50%; font-size: 18px; font-weight: 700; }
.mais-menos span { min-width: 18px; text-align: center; font-weight: 700; }
.modo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 14px; }
.modo label { position: relative; }
.modo input { position: absolute; opacity: 0; }
.modo span { display: grid; place-items: center; height: 44px; border-radius: 12px; border: 1px solid var(--linha); font-weight: 600; cursor: pointer; }
.modo input:checked + span { border-color: var(--ouro); color: var(--ouro); background: rgba(255, 138, 31, .1); }
.modo input:focus-visible + span { outline: 2px solid var(--ouro); outline-offset: 2px; }
.sacola-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--linha); }
.sacola-total b { font: 700 24px var(--titulo); }
.pedir { display: grid; place-items: center; height: 54px; border-radius: 16px; background: #25D366; color: #062814; font-weight: 700; font-size: 16px; text-decoration: none; }
.vazia { color: var(--cinza); text-align: center; padding: 18px 0; }

.aviso { position: fixed; z-index: 50; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translate(-50%, -20px); opacity: 0; padding: 10px 16px; border-radius: 999px; background: var(--branco); color: #111; font-weight: 700; font-size: 14px; transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap; }
.aviso.mostrar { opacity: 1; transform: translate(-50%, 0); }
