/* =========================================================
   Embraza · cardápio em vídeo
   Celular: um vídeo por tela, como Reels. Computador: o vídeo no meio,
   índice à esquerda e sacola sempre aberta à direita.
   ========================================================= */

:root {
  --carvao: #141110;
  --carvao-2: #1e1916;
  --carvao-3: #2e2622;
  --brasa: #e8232b;
  --brasa-viva: #ff3b30;
  --ambar: #ffb23f;
  --creme: #f2e4c4;
  --fumaca: #a39486;
  --verde-whats: #25d366;

  --f-display: "Bungee", Impact, "Arial Black", sans-serif;
  --f-texto: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --chama-miolo: var(--carvao);
  --topo-h: 56px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--carvao);
  color: var(--creme);
  font: 400 15px/1.45 var(--f-texto);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul, li { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.chama { display: block; width: 100%; height: 100%; color: var(--brasa); }

/* ---------- Palco e feed ---------- */

.palco { position: relative; height: 100vh; height: 100dvh; overflow: hidden; background: #000; }
.feed {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }

.reel {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: var(--carvao) var(--capa, none) center / cover no-repeat;
}
.reel__midia { position: absolute; inset: 0; cursor: pointer; }
.reel__midia video { width: 100%; height: 100%; object-fit: cover; }
.reel__sombra {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(20,17,16,.7) 0, transparent 18%),
    linear-gradient(to top, rgba(20,17,16,.96) 0, rgba(20,17,16,.75) 30%, transparent 62%);
  cursor: pointer;
}
/* pausado: um "play" discreto no meio */
.reel.is-pausado .reel__sombra::after {
  content: ""; position: absolute; left: 50%; top: 45%;
  width: 0; height: 0; margin: -26px 0 0 -16px;
  border-style: solid; border-width: 26px 0 26px 42px;
  border-color: transparent transparent transparent rgba(242,228,196,.85);
  filter: drop-shadow(0 4px 20px rgba(0,0,0,.5));
}

.reel__sem-video {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  background: radial-gradient(60% 45% at 50% 62%, rgba(232,35,43,.35), transparent 70%), var(--carvao);
  color: var(--fumaca);
  font: 600 13px/1 var(--f-texto); letter-spacing: .14em; text-transform: uppercase;
}
.reel__sem-video .chama { width: 90px; height: 112px; animation: tremula 1.6s ease-in-out infinite; }
@keyframes tremula {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.06, 1.1) rotate(2deg); }
}

.reel__info {
  position: absolute; left: 0; right: 76px; bottom: 0;
  padding: 0 0 calc(22px + env(safe-area-inset-bottom)) 18px;
  display: grid; gap: 10px; justify-items: start;
  pointer-events: none;
}
.reel__info > * { pointer-events: auto; }
.reel__selo {
  padding: 6px 10px 5px;
  background: var(--ambar); color: var(--carvao);
  border-radius: 4px;
  font: 800 12px/1 var(--f-texto); letter-spacing: .06em; text-transform: uppercase;
  transform: rotate(-2deg);
}
.reel__cat { font: 600 12px/1 var(--f-texto); letter-spacing: .16em; text-transform: uppercase; color: var(--fumaca); }
.reel__nome {
  font: 400 clamp(30px, 9vw, 42px)/.95 var(--f-display);
  text-transform: uppercase;
  text-shadow: 0 3px 24px rgba(0,0,0,.6);
  text-wrap: balance;
}
.reel__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(242,228,196,.12);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font: 500 12.5px/1.1 var(--f-texto);
}
.tag--forte { background: rgba(232,35,43,.9); color: #fff; font-weight: 700; }
.tag--leve { background: none; padding-left: 2px; color: var(--fumaca); }
.reel__acao { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.reel__preco { font: 400 28px/1 var(--f-display); color: var(--ambar); text-shadow: 0 2px 16px rgba(0,0,0,.5); }

.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border: 0; border-radius: 999px;
  font: 800 16px/1 var(--f-texto);
  text-decoration: none;
}
.botao .chama, .botao svg { width: 18px; height: 22px; flex: none; }
.botao--quero { background: var(--brasa); color: #fff; box-shadow: 0 8px 24px -8px rgba(232,35,43,.8); --chama-miolo: var(--brasa); }
.botao--quero .chama { color: var(--ambar); }
.botao--quero:active { transform: scale(.96); }

/* trilho da direita, como nos Reels */
.reel__trilho {
  position: absolute; right: 10px; bottom: calc(110px + env(safe-area-inset-bottom));
  display: grid; gap: 18px;
}
.trilho__botao {
  display: grid; justify-items: center; gap: 4px;
  width: 56px; padding: 0; border: 0; background: none;
  font: 700 12px/1 var(--f-texto);
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.trilho__botao .chama, .trilho__botao svg {
  width: 48px; height: 48px; padding: 11px 12px;
  border-radius: 50%;
  background: rgba(20,17,16,.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--creme);
  --chama-miolo: transparent;
}
.trilho__botao.tem .chama { color: var(--brasa-viva); background: rgba(242,228,196,.92); --chama-miolo: rgba(242,228,196,.92); }

.reel__barra { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(242,228,196,.15); }
.reel__barra i { display: block; height: 100%; background: var(--brasa); transform-origin: left; transform: scaleX(0); }

/* ---------- Bebidas ---------- */
.reel--bebidas {
  display: grid; align-content: center;
  padding: calc(var(--topo-h) + 12px) 14px calc(86px + env(safe-area-inset-bottom));
  background: radial-gradient(80% 50% at 50% 100%, rgba(232,35,43,.25), transparent 70%), var(--carvao);
}
.bebidas { display: grid; gap: 10px; }
.bebidas .reel__nome { font-size: 28px; margin-bottom: 4px; }
.bebidas__lista { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bebida {
  width: 100%; min-height: 44px; height: 100%;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center;
  column-gap: 6px;
  padding: 5px 6px 5px 10px;
  border: 1px solid var(--carvao-3); border-radius: 12px;
  background: var(--carvao-2);
  text-align: left;
}
.bebida__nome { font: 600 12.5px/1.12 var(--f-texto); }
.bebida__preco { grid-row: 2; font: 700 12px/1.25 var(--f-texto); color: var(--ambar); }
.bebida__mais {
  grid-row: 1 / 3; grid-column: 2;
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--carvao-3); font: 800 15px/1 var(--f-texto);
}
.bebida.tem { border-color: var(--brasa); }
.bebida.tem .bebida__mais { background: var(--brasa); color: #fff; }

/* ---------- Topo: abas ---------- */
.topo {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0;
  height: calc(var(--topo-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  display: flex; align-items: center; gap: 6px;
  pointer-events: none;
}
.topo > * { pointer-events: auto; }
.topo__voltar, .topo__grade {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(20,17,16,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--creme);
}
.topo__voltar span { width: 20px; height: 25px; }
.topo__voltar { --chama-miolo: rgba(20,17,16,.9); }
.topo__grade svg { width: 18px; height: 18px; }
.abas {
  flex: 1; min-width: 0;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 4px;
  border-radius: 999px;
  background: rgba(20,17,16,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.abas::-webkit-scrollbar { display: none; }
.aba {
  flex: none; min-height: 36px; padding: 0 13px;
  border: 0; border-radius: 999px; background: none;
  font: 700 13.5px/1 var(--f-texto); color: rgba(242,228,196,.75);
}
.aba.is-ativa { background: var(--creme); color: var(--carvao); }

/* ---------- Dica, estouro, toast ---------- */
.dica-deslize {
  position: absolute; z-index: 4; left: 50%; top: 42%;
  display: grid; justify-items: center; gap: 10px;
  padding: 16px 20px; border-radius: 16px;
  background: rgba(20,17,16,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 700 14px/1.3 var(--f-texto); text-align: center;
  transform: translate(-50%, -50%);
  opacity: 0; pointer-events: none; transition: opacity .4s;
}
.dica-deslize.is-visivel { opacity: 1; }
.dica-deslize__seta {
  width: 16px; height: 16px;
  border-left: 3px solid var(--ambar); border-top: 3px solid var(--ambar);
  transform: rotate(45deg);
  animation: sobe 1.2s ease-in-out infinite;
}
@keyframes sobe { 0%, 100% { translate: 0 6px; } 50% { translate: 0 -6px; } }

.estouro {
  position: fixed; z-index: 50;
  width: 46px; height: 58px; margin: -29px 0 0 -23px;
  pointer-events: none;
  --chama-miolo: var(--ambar);
  animation: estoura .85s cubic-bezier(.2,.8,.3,1) forwards;
}
.estouro--grande { width: 110px; height: 138px; margin: -69px 0 0 -55px; }
@keyframes estoura {
  0% { transform: scale(.3) rotate(var(--giro)); opacity: 0; }
  20% { transform: scale(1.15) rotate(var(--giro)); opacity: 1; }
  45% { transform: scale(1) rotate(var(--giro)); }
  100% { transform: translateY(-90px) scale(.7) rotate(var(--giro)); opacity: 0; }
}

.toast {
  position: fixed; z-index: 60; left: 50%; top: calc(70px + env(safe-area-inset-top));
  padding: 10px 16px; border-radius: 999px;
  background: var(--creme); color: var(--carvao);
  font: 700 14px/1.2 var(--f-texto); white-space: nowrap;
  transform: translate(-50%, -12px); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.is-visivel { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Sacola ---------- */
.sacola-pilula {
  position: absolute; z-index: 6; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  display: none; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 8px 0 8px;
  border: 0; border-radius: 999px;
  background: var(--creme); color: var(--carvao);
  font: 700 15px/1 var(--f-texto);
  white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.7);
  transform: translateX(-50%);
}
.sacola-pilula strong { padding: 0 12px 0 4px; }
.sacola-pilula__qtd {
  display: grid; place-items: center;
  min-width: 36px; height: 36px; padding: 0 8px; border-radius: 999px;
  background: var(--brasa); color: #fff; font-weight: 800;
}
.sacola-pilula.is-pulando { animation: pula .4s ease; }
@keyframes pula { 40% { transform: translateX(-50%) scale(1.08); } }
/* no celular a pílula fica por cima do texto do reel: sobe o texto quando ela aparece */
.sacola-pilula:not([hidden]) { display: flex; }
.palco:has(.sacola-pilula:not([hidden])) .reel__info { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
.palco:has(.sacola-pilula:not([hidden])) .reel__trilho { bottom: calc(170px + env(safe-area-inset-bottom)); }

.sacola {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--carvao-2);
  transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.8,.3,1);
}
.sacola.is-aberta { transform: none; }
.veu { position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.55); }
.sacola__cabeca { position: sticky; top: -8px; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 12px 0 10px; background: var(--carvao-2); }
.sacola__cabeca h2 { font: 400 22px/1 var(--f-display); text-transform: uppercase; }
.fechar {
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--carvao-3); font: 400 24px/1 var(--f-texto);
}
.sacola__vazia { display: grid; justify-items: center; gap: 12px; padding: 30px 10px; color: var(--fumaca); text-align: center; }
.sacola__vazia span { width: 46px; height: 58px; opacity: .6; --chama-miolo: var(--carvao-2); }
.sacola__itens { display: grid; gap: 8px; margin-bottom: 18px; }
.item-sacola {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px;
  padding: 6px; border-radius: 12px; background: var(--carvao);
}
.item-sacola img, .item-sacola__ph { width: 44px; height: 56px; border-radius: 8px; object-fit: cover; }
.item-sacola__ph { display: grid; place-items: center; padding: 10px; background: var(--carvao-3); --chama-miolo: var(--carvao-3); }
.item-sacola__txt { display: grid; gap: 2px; min-width: 0; }
.item-sacola__txt strong { font: 700 14px/1.2 var(--f-texto); }
.item-sacola__txt span { font: 600 13px/1 var(--f-texto); color: var(--ambar); }
.qtd { display: flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; background: var(--carvao-3); }
.qtd button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; font: 700 18px/1 var(--f-texto); }
.qtd span { min-width: 18px; text-align: center; font-weight: 800; }

.pedido { display: grid; gap: 14px; }
.pedido fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.pedido legend, .campo { font: 700 12px/1.2 var(--f-texto); letter-spacing: .1em; text-transform: uppercase; color: var(--fumaca); }
.pedido legend { margin-bottom: 8px; }
.campo { display: grid; gap: 6px; }
.campo span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.campo input, .campo select {
  width: 100%; min-height: 46px; padding: 0 14px;
  border: 1px solid var(--carvao-3); border-radius: 12px;
  background: var(--carvao); color: var(--creme);
  font: 500 16px/1 var(--f-texto); letter-spacing: 0; text-transform: none;
}
.campo input:focus, .campo select:focus { outline: 2px solid var(--brasa); outline-offset: 1px; }
.lojas-opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.loja-opcao {
  position: relative; display: block; cursor: pointer;
  padding: 10px 12px; border: 1px solid var(--carvao-3); border-radius: 12px; background: var(--carvao);
}
.loja-opcao input { position: absolute; opacity: 0; }
.loja-opcao:has(input:checked) { border-color: var(--brasa); box-shadow: inset 0 0 0 1px var(--brasa); }
.loja-opcao:has(input:focus-visible) { outline: 2px solid var(--creme); }
.loja-opcao__txt { display: grid; gap: 3px; }
.loja-opcao__txt strong { font: 700 14px/1.2 var(--f-texto); }
.loja-opcao__txt small { font: 500 11.5px/1.25 var(--f-texto); color: var(--fumaca); }
.loja-opcao__txt small.aberta { color: var(--verde-whats); }
.pedido__aviso { font: 500 13px/1.4 var(--f-texto); color: var(--ambar); }
.segmento { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--carvao); }
.segmento label { display: grid; place-items: center; min-height: 40px; border-radius: 10px; font: 700 14px/1 var(--f-texto); cursor: pointer; }
.segmento input { position: absolute; opacity: 0; }
.segmento label:has(input:checked) { background: var(--creme); color: var(--carvao); }
.pedido__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--carvao-3); }
.pedido__total strong { font: 400 24px/1 var(--f-display); color: var(--ambar); }
.pedido__nota { margin-top: -8px; font-size: 13px; color: var(--fumaca); }
.botao--whats { width: 100%; min-height: 54px; background: var(--verde-whats); color: #0b2b16; }
.botao--whats svg { width: 22px; height: 22px; }

/* ---------- Grade ---------- */
.grade {
  position: fixed; inset: 0; z-index: 30; overflow-y: auto;
  padding: calc(8px + env(safe-area-inset-top)) 12px 30px;
  background: var(--carvao);
}
.grade__cabeca { position: sticky; top: -8px; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 10px 4px 12px; background: var(--carvao); }
.grade__cabeca h2 { font: 400 24px/1 var(--f-display); text-transform: uppercase; }
.grade__lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cartao {
  position: relative; display: block; overflow: hidden; aspect-ratio: 9 / 14;
  padding: 0; border: 0; border-radius: 14px; background: var(--carvao-2); text-align: left;
}
.cartao img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cartao:hover img { transform: scale(1.05); }
.cartao__ph { display: grid; place-items: center; height: 100%; padding: 40px; --chama-miolo: var(--carvao-2); }
.cartao__txt {
  position: absolute; inset: auto 0 0 0; display: grid; gap: 3px; padding: 30px 10px 10px;
  background: linear-gradient(transparent, rgba(20,17,16,.95));
}
.cartao__txt strong { font: 400 15px/1 var(--f-display); text-transform: uppercase; }
.cartao__txt small { font: 700 13px/1 var(--f-texto); color: var(--ambar); }

/* ---------- Índice (só no computador) ---------- */
.indice { display: none; }

/* =========================================================
   Computador: índice | vídeo | sacola
   ========================================================= */
@media (min-width: 1000px) {
  body {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(380px, 440px) minmax(320px, 1fr);
    gap: 28px;
    padding: 20px 28px;
    height: 100vh;
  }
  /* o vídeo da vez, desfocado, pinta o fundo */
  body::before {
    content: ""; position: fixed; inset: -80px; z-index: -1;
    background: var(--fundo, none) center / cover no-repeat, var(--carvao);
    filter: blur(60px) brightness(.32) saturate(1.3);
    transition: background-image .6s;
  }
  .palco { height: calc(100vh - 40px); border-radius: 26px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(242,228,196,.08); }
  .sacola-pilula { display: none !important; }
  .palco:has(.sacola-pilula:not([hidden])) .reel__info { padding-bottom: 22px; }
  .palco:has(.sacola-pilula:not([hidden])) .reel__trilho { bottom: 110px; }

  .indice { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--carvao-3) transparent; }
  .marca { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--creme); text-decoration: none; }
  .marca__chama { width: 38px; height: 48px; }
  .marca__nome { display: grid; font: 400 28px/.9 var(--f-display); text-transform: uppercase; }
  .marca__nome small { font: 700 12px/1.4 var(--f-texto); letter-spacing: .4em; }
  .indice__dica { margin-bottom: 14px; font-size: 13px; color: var(--fumaca); max-width: 30ch; }
  .indice h3 { margin: 14px 0 4px; font: 700 12px/1 var(--f-texto); letter-spacing: .16em; text-transform: uppercase; color: var(--fumaca); }
  .indice__item {
    display: flex; justify-content: space-between; gap: 10px;
    width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: none;
    font: 600 14px/1.2 var(--f-texto); text-align: left; color: rgba(242,228,196,.75);
  }
  .indice__item small { font-weight: 700; color: var(--fumaca); white-space: nowrap; }
  .indice__item:hover { background: rgba(242,228,196,.06); color: var(--creme); }
  .indice__item.is-ativo { background: var(--brasa); color: #fff; }
  .indice__item.is-ativo small { color: #fff; }

  .sacola {
    position: static; transform: none; max-height: none; height: calc(100vh - 40px);
    border-radius: 22px; padding: 8px 20px 20px;
    background: rgba(30,25,22,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 0 0 1px rgba(242,228,196,.08);
  }
  .sacola__cabeca { background: none; position: static; }
  .sacola .fechar { display: none; }
  .veu { display: none !important; }
  .dica-deslize { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .feed { scroll-behavior: auto; }
}
