:root {
  --bg: #f3efe7;
  --bg-soft: #fbf7f0;
  --panel: #fffaf2;
  --card: #ffffff;
  --ink: #241f1a;
  --muted: #6b6259;
  --brand-red: #c62828;
  --brand-red-dark: #9f1f1f;
  --brand-yellow: #ffca28;
  --brand-green: #2e7d32;
  --line: #e4d8c9;
  --shadow: 0 18px 48px rgba(44, 30, 14, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top, #fff7df 0%, var(--bg) 55%, #efe5d7 100%);
  color: var(--ink);
  min-height: 100%;
}

button, input, textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

img {
  max-width: 100%;
  display: block;
}

.hidden {
  display: none !important;
}

.tela {
  display: none;
  min-height: 100vh;
}

.tela-ativa {
  display: block;
}

.bv-bg {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(198, 40, 40, 0.94), rgba(255, 202, 40, 0.92)),
    linear-gradient(180deg, #fff4d1, #ffe082);
}

.bv-logo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 64px;
  background: rgba(255, 255, 255, 0.18);
  border: 4px solid rgba(255, 255, 255, 0.28);
  box-shadow: var(--shadow);
}

.bv-titulo {
  margin: 0;
  font-size: clamp(42px, 7vw, 74px);
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.bv-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(18px, 2vw, 28px);
}

.bv-panel {
  width: min(980px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(8px);
}

.bv-label {
  display: block;
  margin-bottom: 10px;
  text-align: left;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.bv-input {
  width: 100%;
  height: 76px;
  padding: 0 22px;
  border-radius: 20px;
  border: 0;
  background: #fff;
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.bv-input::placeholder {
  color: #9a948c;
}

.bv-erro {
  margin-top: 10px;
  text-align: left;
  color: #fff7df;
  font-size: 15px;
  font-weight: 800;
}

.teclado-virtual {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.teclado-linha {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
}

.teclado-linha:nth-child(2) {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.teclado-linha:nth-child(3) {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.teclado-linha-final {
  grid-template-columns: 180px 1fr;
}

.tecla {
  min-height: 68px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.tecla:active {
  transform: translateY(1px);
}

.tecla-acao {
  background: #3a2a1f;
  color: #fff;
  font-size: 20px;
}

.tecla-espaco {
  font-size: 22px;
}

.btn-start {
  min-width: 280px;
  padding: 20px 28px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-red);
  font-weight: 900;
  font-size: 22px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.header-cardapio {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255, 250, 242, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-logo {
  font-size: 28px;
  font-weight: 900;
  color: var(--brand-red);
}

.header-sacola {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.sacola-icon {
  font-size: 22px;
}

.sacola-badge {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand-yellow);
  color: #000;
  font-weight: 800;
}

.sacola-total {
  font-weight: 800;
}

.fluxo-bar {
  display: flex;
  gap: 14px;
  padding: 18px 22px 6px;
}

.fluxo-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 800;
}

.fluxo-item.ativo {
  background: #fff7df;
  color: var(--ink);
}

.fluxo-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--brand-red);
  color: #fff;
  font-size: 14px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
  padding: 10px 22px 120px;
}

.grupo-sidebar {
  position: sticky;
  top: 116px;
  align-self: start;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #301f14, #1f140d);
  color: #fff;
  box-shadow: var(--shadow);
}

.grupo-sidebar-head {
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 900;
}

.grupo-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grupo-side-btn {
  width: 100%;
  padding: 16px 14px;
  text-align: left;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
}

.grupo-side-btn.ativo {
  background: var(--brand-yellow);
  color: #000;
}

.catalog-main {
  min-width: 0;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 18px;
  padding: 24px 26px;
  border-radius: 28px;
  background:
    radial-gradient(circle at right top, rgba(255, 202, 40, 0.42), transparent 35%),
    linear-gradient(135deg, #c62828, #8e1e1e);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 800;
  opacity: 0.85;
}

.hero-card h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1;
}

.hero-text {
  max-width: 720px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
}

.hero-highlight {
  min-width: 220px;
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.13);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-highlight-top {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
}

.hero-highlight strong {
  margin-top: 8px;
  font-size: 34px;
}

.hero-highlight small {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.84);
}

.grupos-nav {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 18px 0 8px;
  scrollbar-width: none;
}

.grupo-btn {
  white-space: nowrap;
  padding: 14px 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  border: 2px solid transparent;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.grupo-btn.ativo {
  background: var(--brand-red);
  color: #fff;
}

.catalog-status {
  margin: 8px 0 8px;
  padding: 18px 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.catalog-status-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.catalog-status strong {
  font-size: 24px;
}

.catalog-status-tip {
  color: var(--muted);
  font-weight: 700;
}

.produtos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding: 8px 0 0;
}

.produto-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 440px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.produto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(44, 30, 14, 0.18);
}

.produto-foto {
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #f5ece0, #eadbc7);
}

.produto-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.produto-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.produto-grupo {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.produto-nome {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.produto-obs {
  min-height: 48px;
  color: var(--muted);
  font-size: 15px;
}

.produto-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.produto-preco {
  font-size: 34px;
  font-weight: 900;
  color: var(--brand-green);
}

.produto-btn {
  min-width: 122px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--brand-yellow);
  color: #000;
  font-weight: 900;
  font-size: 16px;
}

.loading, .vazio {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 20px;
  padding: 40px 0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 8, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 40;
}

.modal-box {
  width: min(1100px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: var(--panel);
  border-radius: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  position: relative;
}

.modal-fechar {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  font-size: 22px;
}

.modal-imagem-wrap {
  background: linear-gradient(180deg, #f7ead7, #ead8bf);
  min-height: 420px;
}

.modal-imagem-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  padding: 28px;
}

.modal-info h2 {
  margin: 0 0 8px;
  font-size: 36px;
  line-height: 1;
}

.modal-obs {
  margin: 0 0 18px;
  color: var(--muted);
}

.bloco {
  margin-bottom: 20px;
}

.bloco h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.seletores-status {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.seletores-status.erro {
  color: var(--brand-red);
}

.chips-fracoes {
  margin-bottom: 12px;
}

.chip-fracao {
  min-width: 118px;
  text-align: center;
}

.sabores-escolhidos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.sabor-escolhido {
  padding: 10px 14px;
  border-radius: 18px;
  background: #fff3d5;
  color: var(--ink);
  border: 2px solid var(--brand-yellow);
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.sabor-escolhido-preco {
  background: #ffe6e0;
  border-color: #ff8a65;
}

.sabor-escolhido-fracao {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.sabor-escolhido-nome {
  font-size: 14px;
}

.sabor-escolhido-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 999px;
  background: #c62828;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.sabores-vazio {
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid var(--line);
  font-weight: 700;
}

.chip-sabor {
  text-align: left;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  min-width: 150px;
  max-width: 210px;
}

.chip-sabor-nome {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.chip-sabor-desc {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  white-space: normal;
  line-height: 1.3;
}

.chip-sabor-preco {
  font-size: 13px;
  font-weight: 900;
  color: #b8860b;
}

.chip-sabor.ativo .chip-sabor-preco {
  color: #7a5900;
}

.chip.ativo {
  background: #fff3d5;
  border-color: var(--brand-yellow);
}

.chip small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

textarea {
  width: 100%;
  min-height: 94px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  resize: vertical;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.qtd-ctrl {
  display: flex;
  align-items: center;
  gap: 16px;
}

.qtd-btn {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  font-size: 28px;
}

.qtd-valor {
  font-size: 28px;
  font-weight: 900;
}

.btn-adicionar,
.btn-finalizar,
.btn-continuar,
.btn-novo-pedido {
  padding: 16px 24px;
  border-radius: 16px;
  font-weight: 900;
  font-size: 18px;
}

.btn-adicionar,
.btn-finalizar,
.btn-novo-pedido {
  background: var(--brand-red);
  color: #fff;
}

.btn-continuar {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--line);
}

.painel-sacola {
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 100%);
  height: 100vh;
  background: #fff;
  box-shadow: -10px 0 40px rgba(0,0,0,0.18);
  z-index: 45;
  display: flex;
  flex-direction: column;
}

.sacola-header,
.sacola-acoes {
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.sacola-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sacola-header h2 {
  margin: 0;
}

.sacola-header button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f3f3f3;
}

.sacola-itens {
  flex: 1;
  overflow: auto;
  padding: 16px 20px;
}

.sacola-item {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.sacola-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
}

.sacola-item-desc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.sacola-item-actions {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sacola-remove {
  background: transparent;
  color: var(--brand-red);
  font-weight: 800;
}

.sacola-resumo {
  padding: 18px 20px;
  border-top: 1px solid #eee;
}

.sacola-linha {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
}

.sacola-linha-total {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
}

.sacola-acoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid #eee;
  border-bottom: 0;
}

.confirm-box {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: linear-gradient(180deg, #f7f4ef, #fffaf2);
}

.confirm-icon {
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  font-size: 54px;
  background: #dff3e2;
  border-radius: 50%;
  margin-bottom: 18px;
}

.confirm-box h1 {
  margin: 0 0 8px;
  font-size: 48px;
}

.confirm-numero {
  margin: 14px 0;
  padding: 16px 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 22px;
}

.confirm-aguarde {
  color: var(--muted);
  margin-bottom: 18px;
}

@media (max-width: 920px) {
  .fluxo-bar {
    padding: 14px 14px 4px;
    overflow-x: auto;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
    padding: 8px 14px 110px;
  }

  .grupo-sidebar {
    display: none;
  }

  .hero-card {
    flex-direction: column;
    padding: 20px;
  }

  .catalog-status {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }

  .modal-box {
    grid-template-columns: 1fr;
  }

  .modal-imagem-wrap {
    min-height: 260px;
  }
}

@media (max-width: 640px) {
  .header-cardapio {
    padding: 14px;
  }

  .header-logo {
    font-size: 21px;
  }

  .header-sacola {
    padding: 10px 12px;
  }

  .fluxo-item {
    padding: 10px 12px;
    font-size: 13px;
  }

  .bv-panel {
    padding: 18px;
  }

  .bv-input {
    height: 64px;
    font-size: 22px;
  }

  .teclado-linha,
  .teclado-linha:nth-child(2),
  .teclado-linha:nth-child(3) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .teclado-linha-final {
    grid-template-columns: 1fr;
  }

  .tecla {
    min-height: 58px;
    font-size: 20px;
  }

  .produtos-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 8px 0 100px;
  }

  .produto-card {
    min-height: 0;
  }

  .produto-nome {
    font-size: 24px;
  }

  .produto-preco {
    font-size: 28px;
  }

  .produto-btn {
    min-width: 110px;
    padding: 14px 12px;
    font-size: 15px;
  }

  .modal-info {
    padding: 18px;
  }

  .modal-info h2 {
    font-size: 28px;
  }

  .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .sacola-acoes {
    grid-template-columns: 1fr;
  }
}
