/* =====================================================================
   Star 43 Burger - cardapio digital
   Design tokens extraidos do layout (amarelo/laranja + marrom escuro)
   ===================================================================== */

:root {
  --amarelo:        #f9b233;
  --amarelo-claro:  #ffc95c;
  --amarelo-escuro: #e89b1c;
  --laranja:        #f47b20;
  --laranja-escuro: #d9641a;

  --marrom:         #2b1810;
  --marrom-2:       #3d2718;
  --marrom-3:       #56382a;

  --creme:          #fdf6ec;
  --creme-2:        #f6ead8;
  --branco:         #ffffff;

  --texto:          #2b1810;
  --texto-suave:    #8a7565;
  --borda:          #efe3d3;

  --verde:          #2e9e5b;
  --vermelho:       #d94a3d;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  --sombra-sm: 0 2px 8px rgba(43, 24, 16, .07);
  --sombra-md: 0 6px 18px rgba(43, 24, 16, .10);
  --sombra-lg: 0 14px 34px rgba(43, 24, 16, .16);

  --header-h: 112px;
  --nav-h: 68px;
  --max: 520px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--creme);
  color: var(--texto);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Container central: em telas grandes o cardapio vira uma coluna centralizada */
.app {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--creme);
  position: relative;
  box-shadow: 0 0 40px rgba(43, 24, 16, .08);
  padding-bottom: calc(var(--nav-h) + 24px);
}

/* ---------------------------------------------------------------------
   Cabecalho amarelo com borda inferior ondulada
   --------------------------------------------------------------------- */
.topo {
  position: relative;
  background: linear-gradient(160deg, #fbbd42 0%, var(--amarelo) 45%, var(--amarelo-escuro) 100%);
  padding: 14px 18px 30px;
}

.topo::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 22px;
  z-index: 3; /* a onda fica acima do banner e do véu */
  background: var(--creme);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 22' preserveAspectRatio='none'%3E%3Cpath d='M0 22V8c40-10 90 6 140 2s80-12 130-7 90 15 140 10 110-14 190-6v15z' fill='%23000'/%3E%3C/svg%3E") no-repeat center/100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 22' preserveAspectRatio='none'%3E%3Cpath d='M0 22V8c40-10 90 6 140 2s80-12 130-7 90 15 140 10 110-14 190-6v15z' fill='%23000'/%3E%3C/svg%3E") no-repeat center/100% 100%;
}

.topo-barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-icone {
  width: 46px; height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform .15s ease;
}
.btn-icone:active { transform: scale(.92); }

.btn-menu { background: var(--marrom); color: var(--amarelo); }
.btn-carrinho { background: var(--branco); color: var(--marrom); position: relative; box-shadow: var(--sombra-sm); }

.badge-carrinho {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 21px; height: 21px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--laranja);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid var(--amarelo);
}
.badge-carrinho[hidden] { display: none; }

.logo { height: 58px; width: auto; }

.logo-texto {
  font-weight: 900;
  font-size: 24px;
  line-height: .95;
  color: var(--marrom);
  text-align: center;
  letter-spacing: -.5px;
}
.logo-texto span { color: var(--branco); }

/* ---------------------------------------------------------------------
   Banner do topo: preenche a faixa inteira, de ponta a ponta.
   A marca em texto sai e só os botões de menu/carrinho ficam por cima.
   --------------------------------------------------------------------- */
.topo-com-banner {
  padding: 0;
  background: var(--marrom); /* só aparece enquanto a imagem carrega */
}

.topo-banner {
  display: block;
  line-height: 0;
}
.topo-banner img {
  width: 100%;
  height: auto;
  min-height: 132px;
  object-fit: cover;
}

/* Véu no topo e no rodapé: mantém botões e status legíveis sobre a imagem */
.topo-com-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(20, 10, 5, .45) 0%,
    rgba(20, 10, 5, 0)  30%,
    rgba(20, 10, 5, 0)  58%,
    rgba(20, 10, 5, .62) 100%
  );
}

.topo-com-banner .topo-barra {
  position: absolute;
  top: 14px;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.topo-com-banner .loja-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px; /* acima da onda do rodapé, que tem 22px */
  z-index: 2;
  margin: 0;
  color: #fff;
  text-shadow: 0 1px 3px rgba(20, 10, 5, .6);
}

/* Banner no lugar do bloco "O sabor que você merece!".
   A arte muda, mas o botão "Ver cardápio" continua no mesmo canto. */
.hero-banner {
  display: block;
  position: relative;
  margin: 12px 18px 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sombra-sm);
  transition: transform .15s ease;
}
.hero-banner:active { transform: scale(.99); }
.hero-banner img { width: 100%; height: auto; }

/* Véu escuro no rodapé: garante contraste do botão sobre qualquer imagem */
.hero-banner::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 58%;
  background: linear-gradient(to top, rgba(20, 10, 5, .72) 0%, rgba(20, 10, 5, 0) 100%);
  pointer-events: none;
}

.hero-banner .btn-pill {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 1;
}

/* Status da loja */
.loja-status {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 7px;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--marrom);
  flex-wrap: wrap;
}
.loja-tempo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 7px;
  border-left: 1.5px solid currentColor;
}
.loja-status .ponto {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 0 3px rgba(46, 158, 91, .25);
}
.loja-status.fechada .ponto { background: var(--vermelho); box-shadow: 0 0 0 3px rgba(217, 74, 61, .25); }

/* ---------------------------------------------------------------------
   Busca
   --------------------------------------------------------------------- */
.busca-wrap { padding: 2px 18px 0; margin-top: -4px; }

.busca {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--branco);
  border-radius: var(--r-pill);
  padding: 13px 18px;
  box-shadow: var(--sombra-md);
}
.busca svg { flex: 0 0 20px; color: var(--texto-suave); }
.busca input {
  flex: 1;
  border: 0;
  outline: 0;
  background: none;
  font-size: 15.5px;
}
.busca input::placeholder { color: #b6a494; }

/* ---------------------------------------------------------------------
   Categorias (circulos com icone)
   --------------------------------------------------------------------- */
.categorias {
  display: flex;
  gap: 14px;
  padding: 15px 18px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.categorias::-webkit-scrollbar { display: none; }

.cat {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 74px;
}
.cat-bolha {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--branco);
  box-shadow: var(--sombra-sm);
  display: grid;
  place-items: center;
  color: var(--marrom);
  transition: all .18s ease;
}
.cat-nome {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--texto-suave);
  text-align: center;
  line-height: 1.2;
  position: relative;
  padding-bottom: 6px;
}
.cat.ativa .cat-bolha {
  background: var(--amarelo);
  box-shadow: 0 6px 14px rgba(249, 178, 51, .45);
}
.cat.ativa .cat-nome { color: var(--marrom); }
.cat.ativa .cat-nome::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 22px; height: 3px;
  border-radius: 3px;
  background: var(--amarelo);
}

/* ---------------------------------------------------------------------
   Banner hero
   --------------------------------------------------------------------- */
.hero {
  margin: 12px 18px 0;
  border-radius: var(--r-lg);
  background:
    linear-gradient(100deg, rgba(20,10,5,.96) 0%, rgba(20,10,5,.82) 42%, rgba(20,10,5,.15) 78%),
    var(--marrom);
  background-size: cover;
  background-position: right center;
  color: #fff;
  padding: 24px 22px 26px;
  position: relative;
  overflow: hidden;
  min-height: 186px;
}
.hero h2 {
  margin: 0 0 10px;
  font-size: 27px;
  font-weight: 900;
  line-height: 1.12;
  max-width: 62%;
}
.hero h2 em { color: var(--amarelo); font-style: normal; }
.hero p {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255,255,255,.82);
  max-width: 58%;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--amarelo);
  color: var(--marrom);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .7px;
  text-transform: uppercase;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  box-shadow: 0 6px 16px rgba(249, 178, 51, .35);
  transition: transform .15s ease;
}
.btn-pill:active { transform: scale(.96); }
.btn-pill.escuro { background: var(--marrom); color: var(--branco); box-shadow: var(--sombra-md); }

/* ---------------------------------------------------------------------
   Secoes
   --------------------------------------------------------------------- */
.secao { padding: 18px 18px 0; }

.secao-topo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 9px;
}
.secao-titulo {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 7px;
}
.secao-titulo .estrela { color: var(--amarelo); font-size: 17px; }
.secao-link {
  font-size: 13px;
  font-weight: 800;
  color: var(--laranja);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ---------------------------------------------------------------------
   Cards de produto
   --------------------------------------------------------------------- */
.carrossel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 18px 6px;
  margin: 0 -18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carrossel::-webkit-scrollbar { display: none; }
.carrossel .card { flex: 0 0 172px; scroll-snap-align: start; }

/* Linha mais apertada que a coluna: é o empilhamento vertical que
   dava sensação de cardápio espaçado demais. */
.grade {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 12px;
}

.card {
  background: var(--branco);
  border-radius: var(--r-md);
  box-shadow: var(--sombra-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:active { transform: scale(.985); }

.card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--creme-2);
  overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }

.card-badge {
  position: absolute;
  top: 9px; left: 9px;
  background: var(--laranja);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .6px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
}

.card-fav {
  position: absolute;
  top: 8px; right: 8px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  display: grid;
  place-items: center;
  color: var(--marrom-3);
  box-shadow: var(--sombra-sm);
}
.card-fav.ativo { background: var(--laranja); color: #fff; }

.card-corpo {
  padding: 10px 12px 11px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 3px;
}
.card-nome {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
}
.card-desc {
  font-size: 11.5px;
  line-height: 1.38;
  color: var(--texto-suave);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-rodape {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}
.card-preco {
  font-size: 16px;
  font-weight: 900;
  color: var(--laranja);
  line-height: 1;
}
.card-preco small {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--texto-suave);
  text-decoration: line-through;
  margin-bottom: 2px;
}
.card-preco small.a-partir { text-decoration: none; }
.btn-add {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: var(--amarelo);
  color: var(--marrom);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(249, 178, 51, .4);
  transition: transform .15s ease;
}
.btn-add:active { transform: scale(.88); }

.card.esgotado { opacity: .55; }
.card.esgotado .btn-add { background: #ddd; box-shadow: none; pointer-events: none; }

/* ---------------------------------------------------------------------
   Faixa de entrega
   --------------------------------------------------------------------- */
.faixa-entrega {
  margin: 16px 18px 0;
  background: linear-gradient(135deg, var(--amarelo-claro), var(--amarelo));
  border-radius: var(--r-md);
  padding: 14px 15px;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: var(--sombra-sm);
}
.faixa-entrega .icone { flex: 0 0 34px; color: var(--marrom); }
.faixa-entrega .txt { flex: 1; min-width: 0; }
.faixa-entrega strong { display: block; font-size: 14px; font-weight: 900; line-height: 1.25; }
.faixa-entrega span { font-size: 11.5px; color: var(--marrom-3); line-height: 1.35; display: block; }
.faixa-entrega .btn-pill { padding: 11px 15px; font-size: 11px; flex: 0 0 auto; }

/* ---------------------------------------------------------------------
   Navegacao inferior
   --------------------------------------------------------------------- */
.nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max);
  height: var(--nav-h);
  background: var(--marrom);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 40;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255,255,255,.62);
  padding-top: 6px;
}
.nav-item.ativo { color: var(--amarelo); }
.nav-item.central { position: relative; }
.nav-item.central .bolha {
  position: absolute;
  top: -30px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--amarelo);
  color: var(--marrom);
  display: grid;
  place-items: center;
  border: 5px solid var(--creme);
  box-shadow: 0 6px 16px rgba(249, 178, 51, .45);
}
.nav-item.central span { margin-top: 30px; }

/* ---------------------------------------------------------------------
   Drawer / modais
   --------------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 5, .55);
  backdrop-filter: blur(2px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.overlay.aberto { opacity: 1; pointer-events: auto; }

.folha {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: var(--max);
  max-height: 92vh;
  background: var(--creme);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  transition: transform .28s cubic-bezier(.22,.8,.3,1);
  overflow: hidden;
}
.folha.aberta { transform: translate(-50%, 0); }

.folha-topo {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--borda);
  background: var(--branco);
}
.folha-topo h3 { margin: 0; font-size: 18px; font-weight: 900; }
.folha-corpo { overflow-y: auto; flex: 1; padding: 16px 20px 20px; }
.folha-rodape {
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--borda);
  background: var(--branco);
}

.puxador {
  width: 42px; height: 4px;
  border-radius: 4px;
  background: var(--borda);
  margin: 8px auto 0;
}

.btn-fechar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--creme-2);
  display: grid;
  place-items: center;
  color: var(--marrom);
  flex: 0 0 34px;
}

/* Bloco de opcoes no modal do produto */
.grupo-opcoes { margin-bottom: 20px; }
.grupo-cab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.grupo-cab h4 { margin: 0; font-size: 15px; font-weight: 900; }
.tag {
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  background: var(--creme-2);
  color: var(--texto-suave);
}
.tag.obrigatorio { background: var(--marrom); color: var(--amarelo); }

.opcao {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--branco);
  border: 2px solid transparent;
  border-radius: var(--r-sm);
  padding: 12px 13px;
  margin-bottom: 8px;
  transition: border-color .15s ease;
  cursor: pointer;
}
.opcao.marcada { border-color: var(--amarelo); }
.opcao input { accent-color: var(--laranja); width: 18px; height: 18px; flex: 0 0 18px; }
.opcao .nome { flex: 1; font-size: 14px; font-weight: 700; }
.opcao .preco { font-size: 13px; font-weight: 800; color: var(--laranja); }

/* Opcao que pode repetir (4x molho verde): contador no lugar da caixinha */
.opcao-qtd { cursor: default; padding: 8px 8px 8px 13px; }
.opcao-qtd .stepper { box-shadow: none; background: var(--creme-2); padding: 3px; }
.opcao-qtd .stepper button { width: 30px; height: 30px; background: var(--branco); }
.opcao-qtd .stepper .qtd { min-width: 24px; font-size: 14px; }

/* Stepper de quantidade */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--branco);
  border-radius: var(--r-pill);
  padding: 4px;
  box-shadow: var(--sombra-sm);
}
.stepper button {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--creme-2);
  color: var(--marrom);
  font-weight: 900;
}
.stepper button:disabled { opacity: .4; }
.stepper .qtd { min-width: 30px; text-align: center; font-weight: 900; font-size: 15px; }

/* ---------------------------------------------------------------------
   Formularios
   --------------------------------------------------------------------- */
.campo { margin-bottom: 14px; }
.campo label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--texto-suave);
  margin-bottom: 6px;
}
.campo input, .campo select, .campo textarea {
  width: 100%;
  border: 2px solid var(--borda);
  border-radius: var(--r-sm);
  background: var(--branco);
  padding: 13px 14px;
  font-size: 15px;
  outline: 0;
  transition: border-color .15s ease;
}
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--amarelo); }
.campo textarea { resize: vertical; min-height: 78px; }
.campo-linha { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.campo .ajuda { font-size: 11.5px; color: var(--texto-suave); margin-top: 5px; text-transform: none; letter-spacing: 0; font-weight: 600; }

.btn-bloco {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--amarelo);
  color: var(--marrom);
  font-weight: 900;
  font-size: 15px;
  padding: 16px;
  border-radius: var(--r-pill);
  box-shadow: 0 6px 16px rgba(249, 178, 51, .38);
  transition: transform .15s ease, opacity .15s ease;
}
.btn-bloco:active { transform: scale(.98); }
.btn-bloco:disabled { opacity: .5; box-shadow: none; pointer-events: none; }
.btn-bloco.escuro { background: var(--marrom); color: var(--branco); box-shadow: var(--sombra-md); }
.btn-bloco .valor { margin-left: auto; }
.btn-bloco .rotulo { margin-right: auto; }

/* Seletor de tipo de pedido / pagamento */
.escolhas { display: flex; flex-direction: column; gap: 9px; }
.escolha {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--branco);
  border: 2px solid transparent;
  border-radius: var(--r-sm);
  padding: 14px;
  cursor: pointer;
}
.escolha.marcada { border-color: var(--amarelo); }
.escolha input { accent-color: var(--laranja); width: 18px; height: 18px; flex: 0 0 18px; }
.escolha .info { flex: 1; }
.escolha .info strong { display: block; font-size: 14.5px; font-weight: 800; }
.escolha .info span { font-size: 12px; color: var(--texto-suave); }
.escolha .valor { font-weight: 900; color: var(--laranja); font-size: 14px; }

/* ---------------------------------------------------------------------
   Carrinho
   --------------------------------------------------------------------- */
.carrinho-item {
  display: flex;
  gap: 12px;
  background: var(--branco);
  border-radius: var(--r-md);
  padding: 12px;
  margin-bottom: 10px;
}
.carrinho-item img {
  width: 62px; height: 62px;
  flex: 0 0 62px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--creme-2);
}
.carrinho-item .dados { flex: 1; min-width: 0; }
.carrinho-item .nome { font-size: 14px; font-weight: 800; margin: 0 0 3px; }
.carrinho-item .extras { font-size: 11.5px; color: var(--texto-suave); line-height: 1.4; margin: 0 0 6px; }
.carrinho-item .linha { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.carrinho-item .preco { font-weight: 900; color: var(--laranja); font-size: 14.5px; }
.carrinho-item .remover { color: var(--texto-suave); padding: 4px; }

.resumo { background: var(--branco); border-radius: var(--r-md); padding: 14px 16px; margin-top: 4px; }
.resumo-linha {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  color: var(--texto-suave);
  font-weight: 700;
}
.resumo-linha.total {
  border-top: 1px dashed var(--borda);
  margin-top: 6px;
  padding-top: 12px;
  font-size: 18px;
  font-weight: 900;
  color: var(--texto);
}
.resumo-linha.total span:last-child { color: var(--laranja); }

.vazio {
  text-align: center;
  padding: 50px 24px;
  color: var(--texto-suave);
}
.vazio .icone { font-size: 46px; margin-bottom: 12px; opacity: .45; }
.vazio p { margin: 0 0 4px; font-weight: 800; color: var(--texto); font-size: 16px; }
.vazio small { font-size: 13px; }

/* ---------------------------------------------------------------------
   Acompanhamento do pedido
   --------------------------------------------------------------------- */
.pedido-cab {
  background: var(--marrom);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 24px 22px;
  margin: 16px 18px 0;
  text-align: center;
}
.pedido-cab .codigo {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--amarelo);
  margin: 6px 0 4px;
}
.pedido-cab small { font-size: 12px; color: rgba(255,255,255,.7); }

.timeline { padding: 6px 4px; }
.etapa {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 22px;
}
.etapa:last-child { padding-bottom: 0; }
.etapa::before {
  content: '';
  position: absolute;
  left: 15px; top: 32px; bottom: 0;
  width: 2px;
  background: var(--borda);
}
.etapa:last-child::before { display: none; }
.etapa .bolinha {
  width: 32px; height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: var(--branco);
  border: 2px solid var(--borda);
  display: grid;
  place-items: center;
  color: var(--texto-suave);
  z-index: 1;
}
.etapa .conteudo strong { display: block; font-size: 14.5px; font-weight: 800; }
.etapa .conteudo span { font-size: 12px; color: var(--texto-suave); }
.etapa.feita .bolinha { background: var(--amarelo); border-color: var(--amarelo); color: var(--marrom); }
.etapa.feita::before { background: var(--amarelo); }
.etapa.atual .bolinha {
  background: var(--laranja);
  border-color: var(--laranja);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(244, 123, 32, .2);
}

/* ---------------------------------------------------------------------
   Avisos / toast
   --------------------------------------------------------------------- */
.aviso {
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 14px;
}
.aviso.erro { background: #fdecea; color: #a4342a; }
.aviso.ok { background: #e7f6ec; color: #226e41; }
.aviso.atencao { background: #fff5e0; color: #8a5d12; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 18px);
  transform: translate(-50%, 20px);
  background: var(--marrom);
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  padding: 13px 20px;
  border-radius: var(--r-pill);
  box-shadow: var(--sombra-lg);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  max-width: calc(var(--max) - 48px);
  text-align: center;
}
.toast.visivel { opacity: 1; transform: translate(-50%, 0); }

.faixa-mesa {
  background: var(--marrom);
  color: var(--amarelo);
  font-size: 12.5px;
  font-weight: 800;
  padding: 9px 12px;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Botões de chamar garçom / pedir a conta, na faixa da mesa */
.btn-chamar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(249, 178, 51, .16);
  border: 1.5px solid var(--amarelo);
  color: var(--amarelo);
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  transition: all .15s ease;
}
.btn-chamar:active { transform: scale(.95); }
.btn-chamar:disabled { opacity: .55; pointer-events: none; }
.btn-chamar.chamado {
  background: var(--verde);
  border-color: var(--verde);
  color: #fff;
}

.faixa-fechada {
  background: var(--vermelho);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
  padding: 9px 14px;
  line-height: 1.4;
}

/* Internet da loja instavel: avisa sem assustar (ambar, nao vermelho) */
.faixa-conexao {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff4dc;
  color: var(--marrom);
  border-bottom: 2px solid var(--amarelo-escuro);
  padding: 11px 12px 11px 14px;
  font-size: 13px;
  line-height: 1.45;
  animation: faixa-conexao-entra .25s ease-out;
}
.faixa-conexao[hidden] { display: none; }
/* A busca sobe -4px para encostar na onda do topo; com o aviso no meio, desce. */
.faixa-conexao:not([hidden]) + .busca-wrap { margin-top: 14px; }
.faixa-conexao-icone {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--amarelo);
  color: var(--marrom);
}
.faixa-conexao-texto { flex: 1; min-width: 0; }
.faixa-conexao-texto strong { display: block; font-weight: 900; font-size: 13.5px; }
.faixa-conexao-fechar {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--marrom-3);
  padding: 4px;
  cursor: pointer;
  border-radius: 50%;
}
@keyframes faixa-conexao-entra {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* Barra flutuante "ver carrinho" */
.barra-carrinho {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 12px);
  transform: translate(-50%, 130%);
  width: calc(100% - 36px);
  max-width: calc(var(--max) - 36px);
  z-index: 45;
  transition: transform .26s cubic-bezier(.22,.8,.3,1);
}
.barra-carrinho.visivel { transform: translate(-50%, 0); }

.pulando { animation: pulo .4s ease; }
@keyframes pulo {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.22); }
}

/* Skeleton de carregamento */
.skeleton {
  background: linear-gradient(90deg, #efe4d5 25%, #f7efe4 50%, #efe4d5 75%);
  background-size: 200% 100%;
  animation: brilho 1.3s infinite;
  border-radius: var(--r-md);
}
@keyframes brilho {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =====================================================================
   Desktop: cardápio largo com o carrinho sempre à vista na lateral
   ===================================================================== */
@media (min-width: 900px) {
  :root {
    --carrinho-w: 344px;
    --conteudo: 1080px; /* largura útil do miolo, centralizada */
  }

  body { background: var(--creme); }

  /*
   * Nada de coluna flutuando com sombra no meio da tela: o app ocupa a
   * largura toda e o fundo é contínuo. Quem fica centralizado e com
   * largura máxima é o CONTEÚDO, não o container.
   */
  .app {
    max-width: none;
    width: 100%;
    padding-bottom: 40px;
    min-height: 100vh;
    box-shadow: none;
  }

  /* Só o cardápio reserva a faixa do painel lateral */
  .app.com-carrinho { padding-right: var(--carrinho-w); }

  /* Cabeçalho de ponta a ponta, com o miolo alinhado ao resto da página */
  .topo-barra,
  .loja-status,
  .faixa-mesa,
  .faixa-fechada,
  .faixa-conexao {
    max-width: var(--conteudo);
    margin-left: auto;
    margin-right: auto;
  }

  /* Blocos do corpo: centralizados dentro da coluna disponível */
  .busca-wrap,
  .categorias,
  .secao {
    max-width: var(--conteudo);
    margin-left: auto;
    margin-right: auto;
  }

  .hero,
  .hero-banner,
  .faixa-entrega {
    max-width: calc(var(--conteudo) - 52px);
    margin-left: auto;
    margin-right: auto;
  }

  .app:not(.com-carrinho) { --conteudo: 800px; }

  /* ---------------------------------------- carrinho vira painel fixo */
  .com-carrinho #folhaCarrinho {
    position: fixed;
    top: 0;
    bottom: 0;
    left: auto;
    right: 0; /* encostado na borda da tela, como uma barra lateral */
    width: var(--carrinho-w);
    max-width: var(--carrinho-w);
    max-height: none;
    transform: none !important;
    border-radius: 0;
    border-left: 1px solid var(--borda);
    box-shadow: -6px 0 24px rgba(43, 24, 16, .07);
    z-index: 30;
  }
  .com-carrinho #folhaCarrinho .puxador,
  .com-carrinho #folhaCarrinho .btn-fechar { display: none; }
  /* Carrinho vazio: sem botão, o rodapé virava uma faixa branca à toa */
  .com-carrinho #folhaCarrinho .folha-rodape:empty { display: none; }
  .com-carrinho #folhaCarrinho .folha-corpo { background: var(--creme); }
  .com-carrinho #folhaCarrinho .folha-topo h3::before {
    content: '🛒 ';
    font-size: 15px;
  }

  /* ------------------------------- as outras folhas viram modais centrados */
  .folha:not(#folhaCarrinho),
  .app:not(.com-carrinho) .folha {
    top: 50%;
    bottom: auto;
    left: 50%;
    width: 100%;
    max-width: 470px;
    max-height: 86vh;
    border-radius: var(--r-xl);
    transform: translate(-50%, -46%);
    opacity: 0;
    /* Invisível no centro da tela ainda engoliria cliques dos produtos */
    pointer-events: none;
    transition: transform .22s ease, opacity .22s ease;
  }
  .folha.aberta:not(#folhaCarrinho),
  .app:not(.com-carrinho) .folha.aberta {
    transform: translate(-50%, -50%);
    opacity: 1;
    pointer-events: auto;
  }
  .folha:not(#folhaCarrinho) .puxador { display: none; }

  /* ---------------------------- some o que é só de celular */
  .nav,
  .barra-carrinho { display: none; }

  /* Fica invisível mas ocupando espaço, para a logo seguir centralizada */
  .btn-carrinho { visibility: hidden; pointer-events: none; }

  /* No cardápio o toast desvia do painel lateral; nas outras telas fica centrado */
  .com-carrinho .toast {
    left: auto;
    right: calc(var(--carrinho-w) + 24px);
    bottom: 26px;
    transform: translateY(20px);
    max-width: 320px;
  }
  .com-carrinho .toast.visivel { transform: translateY(0); }

  .toast { bottom: 26px; }

  /* ------------------------------------- mais produtos por linha */
  .grade { grid-template-columns: repeat(3, 1fr); gap: 14px 16px; }
  .carrossel .card { flex: 0 0 208px; }

  .card { cursor: pointer; }
  .card:hover { transform: translateY(-3px); box-shadow: var(--sombra-md); }
  .card:active { transform: translateY(-1px); }

  .card-nome { font-size: 15.5px; }
  .card-desc { font-size: 12.5px; }
  .card-preco { font-size: 17px; }
  .btn-add { width: 38px; height: 38px; flex: 0 0 38px; }

  /* ------------------------------------- respiro lateral maior */
  .busca-wrap { padding: 2px 26px 0; }
  .categorias { padding: 18px 26px 2px; }
  .secao { padding: 22px 26px 0; }
  .carrossel { padding: 2px 26px 8px; margin: 0 -26px; }
  /* hero e faixas: o alinhamento vem do margin auto lá de cima */

  .secao-titulo { font-size: 24px; }

  .hero { min-height: 250px; padding: 34px 32px; }
  .hero h2 { font-size: 34px; max-width: 58%; }
  .hero p { font-size: 15px; max-width: 50%; }

  .cat-bolha { width: 66px; height: 66px; }
  .cat { width: 80px; }
}

/* Telas bem largas: uma coluna a mais de produtos */
@media (min-width: 1400px) {
  :root { --max: 1360px; }
  .grade { grid-template-columns: repeat(4, 1fr); }
}
