:root {
  --bg: #f4f8f6;
  --card: #ffffff;
  --text: #1f2a26;
  --muted: #60726b;
  --line: #d8e5df;
  --primary: #1fa35b;
  --primary-strong: #168d4d;
  --accent: #e9fff2;
  --danger: #c13e3e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-top: 94px;
}

.topo {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topo-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.topo-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.topo-cp {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text);
  text-decoration: none;
  background: #fff;
}

.conteudo {
  width: min(960px, 100% - 24px);
  margin: 12px auto 100px;
}

.cardapio-intro {
  background: linear-gradient(135deg, #ffffff, #ebfff4);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.cardapio-intro h1 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.cardapio-intro p {
  margin: 0;
  color: var(--muted);
}

.abas {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.aba-btn {
  border: 1px solid #c5ddd1;
  background: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  color: #2f5646;
  font-weight: 700;
  cursor: pointer;
}

.aba-btn.ativo {
  border-color: #71c598;
  background: #e9fff2;
  color: #106e3f;
}

.aviso-aba {
  margin: 0 0 10px;
  color: #4f695f;
  font-size: 0.92rem;
}

.hidden {
  display: none;
}

.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip {
  border: 1px solid #c2d9ce;
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.92rem;
  color: #27443a;
  cursor: pointer;
}

.chip.ativo {
  border-color: #7ac89f;
  background: var(--accent);
  color: #0f7a40;
}

.lista-produtos {
  display: grid;
  gap: 10px;
}

.categoria-bloco {
  display: grid;
  gap: 8px;
}

.categoria-titulo {
  margin: 2px 2px 0;
  font-size: 1.02rem;
  color: #1f5a3e;
}

.categoria-grid {
  display: grid;
  gap: 10px;
}

.categoria-toggle {
  justify-self: start;
  border: 1px solid #bcd8c8;
  background: #ffffff;
  color: #196f43;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

.produto-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  transition: 0.18s ease;
}

.produto-card.adicionado {
  transform: scale(1.01);
  border-color: #9ad8b5;
  box-shadow: 0 10px 20px rgba(31, 163, 91, 0.12);
}

.produto-thumb {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  background: #eef4f1;
}

.produto-info strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.produto-categoria {
  display: inline-block;
  font-size: 0.76rem;
  color: #44725e;
  background: #eef8f2;
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 6px;
}

.produto-preco {
  font-weight: 700;
  color: #145f38;
}

.produto-preco-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.produto-preco-antigo {
  color: #7e8f88;
  text-decoration: line-through;
  font-size: 0.88rem;
}

.btn-add {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.btn-ver-pedido {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 12px 24px rgba(18, 120, 67, 0.34);
  cursor: pointer;
}

.contador {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  color: #116939;
  font-size: 0.84rem;
  font-weight: 800;
}

.carrinho-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.carrinho-modal.aberto {
  opacity: 1;
  pointer-events: auto;
}

.carrinho-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.painel-carrinho {
  position: relative;
  width: min(1080px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
  padding: 14px;
  overflow: auto;
  transform: translateY(8px) scale(0.985);
  transition: transform 0.2s ease;
}

.carrinho-modal.aberto .painel-carrinho {
  transform: translateY(0) scale(1);
}

.carrinho-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
}

.carrinho-col {
  min-width: 0;
}

.carrinho-col-dados {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.tipo-atendimento label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
}

.tipo-atendimento input {
  margin: 0;
}

/* legado */
.painel-carrinho-legacy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100%;
  z-index: 40;
  background: #fff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  border: 1px solid var(--line);
  padding: 14px;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  transition: bottom 0.25s ease;
}

.painel-carrinho.aberto {
  bottom: 0;
}

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

.painel-header h2 {
  margin: 0;
}

.btn-fechar {
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  background: #fff;
  cursor: pointer;
}

.cliente-formulario {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.cliente-formulario label {
  display: grid;
  gap: 4px;
  font-size: 0.84rem;
  color: #3e5950;
}

.cliente-formulario input,
.cliente-formulario textarea,
.cliente-formulario select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.cliente-formulario textarea {
  resize: vertical;
  min-height: 62px;
}

.bairro-cep-feedback {
  margin: -2px 2px 2px;
  min-height: 16px;
  font-size: 0.8rem;
  color: #1e6a43;
}

.bairro-cep-feedback.erro {
  color: #b22b2b;
}

.historico-cliente {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #fbfefd;
}

.historico-cliente h3 {
  margin: 0 0 6px;
  font-size: 0.93rem;
  color: #1f5a3e;
}

.historico-cliente-lista {
  display: grid;
  gap: 6px;
}

.historico-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #e7f0ec;
  border-radius: 9px;
  padding: 6px 8px;
  background: #fff;
  font-size: 0.82rem;
}

.historico-item strong {
  color: #1f2a26;
}

.historico-item p {
  margin: 2px 0 0;
  color: #5e736a;
}

.historico-vazio {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.carrinho-lista {
  margin-top: 10px;
  overflow: auto;
  max-height: 42vh;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #fbfefd;
}

.carrinho-vazio {
  text-align: center;
  color: var(--muted);
  padding: 14px 8px;
}

.carrinho-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid #edf4f0;
}

.carrinho-item:last-child {
  border-bottom: none;
}

.carrinho-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.carrinho-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #e3eee9;
  background: #f6fbf8;
  flex-shrink: 0;
}

.carrinho-item h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.carrinho-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.item-controles {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.item-controles button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.item-remover {
  border: none;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.83rem;
  padding: 0;
}

.carrinho-resumo {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.btn-finalizar {
  margin-top: 10px;
  border: none;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.btn-finalizar:disabled {
  opacity: 0.55;
  cursor: wait;
}

.feedback-pedido {
  min-height: 20px;
  margin: 8px 2px 0;
  font-size: 0.86rem;
  color: #2d6e4f;
}

.feedback-pedido.erro {
  color: #b22b2b;
}

.cupom-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefd;
  padding: 10px;
}

.cupom-box label {
  display: block;
  font-size: 0.84rem;
  color: #3e5950;
  margin-bottom: 6px;
}

.cupom-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.cupom-input-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
}

.cupom-input-wrap button {
  border: none;
  border-radius: 10px;
  padding: 0 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  cursor: pointer;
}

.cupom-feedback {
  margin: 6px 2px 0;
  min-height: 16px;
  font-size: 0.82rem;
  color: #196f43;
}

.cupom-feedback.erro {
  color: #b22b2b;
}

.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  place-items: center;
  padding: 16px;
}

.promo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 16, 0.58);
}

.promo-modal-card {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  background: #fff;
  border: 1px solid #dbe9e2;
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.35);
}

.promo-modal-card.somente-imagem {
  grid-template-columns: 1fr;
  width: min(620px, 100%);
}

.promo-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.promo-modal-content {
  padding: 24px 22px;
  background: linear-gradient(145deg, #0f2518 0%, #163827 100%);
  color: #fff;
  display: grid;
  align-content: center;
  gap: 12px;
}

.promo-modal-content h3 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.05;
}

.promo-modal-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.promo-modal-cta {
  width: fit-content;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  color: #124f31;
  background: #6ef39d;
  cursor: pointer;
}

.promo-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
}

@media (min-width: 960px) {
  .conteudo {
    margin-bottom: 28px;
  }

  .btn-ver-pedido {
    width: 340px;
    left: auto;
    right: 24px;
  }

  .painel-carrinho {
    width: min(1080px, calc(100% - 28px));
  }
}

@media (max-width: 900px) {
  .carrinho-layout {
    grid-template-columns: 1fr;
  }

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

  .promo-modal-media img {
    max-height: 44vh;
  }
}


/* ===== HEADER DO CARDÁPIO - AJUSTE FINAL ===== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e7ece9;
}

.header-content {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  width: 78px;
  height: auto;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
  justify-content: center;
}

.nav a {
  text-decoration: none;
  color: #1f2a26;
  font-size: 0.95rem;
}

.header-cta {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.btn-acompanhar,
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  transition: 0.2s ease;
}

.btn-acompanhar {
  background: #fff;
  border: 1px solid #cfe3d8;
  color: #1f2a26;
}

.btn-whatsapp {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border: none;
  color: #fff;
}

.menu-toggle {
  display: none;
}

.mobile-cta {
  display: none;
}

.desktop-whatsapp {
  display: inline-flex;
}

/* espaço correto abaixo do header */
body {
  padding-top: 110px;
}

.conteudo {
  width: min(960px, 100% - 24px);
  margin: 24px auto 100px;
}

/* MOBILE */
@media (max-width: 900px) {
  .header-content {
    min-height: 76px;
    width: calc(100% - 24px);
    gap: 14px;
  }

  .logo img {
    width: 64px;
  }

  .menu-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
  }

  .menu-toggle span {
    width: 22px;
    height: 2px;
    background: #222;
    display: block;
    border-radius: 999px;
  }

  .nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 14px;
    background: #fff;
    border: 1px solid #e4ebe7;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
  }

  .nav.active {
    display: flex;
  }

  .mobile-cta {
    display: grid;
    gap: 10px;
    margin-top: 4px;
  }

  .desktop-whatsapp,
  .header-cta {
    display: none;
  }

  body {
    padding-top: 92px;
  }

  .conteudo {
    margin-top: 16px;
  }
}

body {
  padding-top: 0;
}

.conteudo {
  margin-top: 110px;
}

.produto-card {
  display: grid;
  grid-template-columns: 64px 1fr 44px;
  align-items: start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.produto-thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #eef4f1;
  border: 1px solid #e4ece8;
  align-self: start;
  margin-top: 34px;
}

.produto-info {
  min-width: 0;
}

.produto-info strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
  line-height: 1.3;
}

.produto-categoria {
  display: inline-block;
  font-size: 0.74rem;
  color: #44725e;
  background: #eef8f2;
  border-radius: 999px;
  padding: 3px 8px;
  margin-bottom: 8px;
}

.produto-descricao {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
}

.produto-descricao.colapsada {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.produto-descricao-toggle {
  margin: -2px 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #196f43;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.produto-descricao-toggle:hover {
  text-decoration: underline;
}

.produto-preco-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.produto-preco {
  font-weight: 700;
  color: #145f38;
  font-size: 1.05rem;
}

.produto-preco-antigo {
  color: #7e8f88;
  text-decoration: line-through;
  font-size: 0.88rem;
}

.btn-add {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  align-self: center;
  justify-self: end;
  margin-top: 38px;
}

@media (max-width: 640px) {
  .produto-card {
    grid-template-columns: 54px 1fr 40px;
    gap: 10px;
    padding: 12px;
  }

  .produto-thumb {
    width: 54px;
    height: 54px;
    margin-top: 32px;
  }

  .produto-info strong {
    font-size: 0.95rem;
  }

  .produto-descricao {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .btn-add {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
    margin-top: 34px;
  }
}

/* ===== Visual Refresh (Public Cardapio) ===== */

body {
  background:
    radial-gradient(1200px 520px at 20% -10%, rgba(31, 163, 91, 0.08), transparent 52%),
    radial-gradient(900px 420px at 96% 0%, rgba(22, 141, 77, 0.06), transparent 56%),
    var(--bg);
}

.conteudo {
  width: min(1080px, calc(100% - 28px));
  margin-top: 118px;
}

.cardapio-intro {
  border-radius: 20px;
  padding: 22px 20px;
  background:
    linear-gradient(135deg, rgba(31, 163, 91, 0.06) 0%, rgba(31, 163, 91, 0) 46%),
    linear-gradient(145deg, #ffffff 0%, #f4fff9 100%);
  border: 1px solid #d7e8df;
  box-shadow: 0 10px 28px rgba(17, 77, 48, 0.08);
}

.cardapio-intro h1 {
  font-size: clamp(1.5rem, 1.9vw, 2rem);
  letter-spacing: -0.02em;
}

.cardapio-intro p {
  margin-top: 4px;
  max-width: 74ch;
}

.prazo-entrega-destaque {
  margin-top: 10px;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  background: #e9fff2;
  border: 1px solid #bfe4cf;
  color: #145f38;
  font-weight: 700;
}

.abas {
  gap: 10px;
  margin-top: 16px;
}

.aba-btn {
  padding: 10px 16px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.aba-btn:hover {
  border-color: #8ecfae;
  transform: translateY(-1px);
}

.aba-btn.ativo {
  box-shadow: inset 0 0 0 1px rgba(20, 97, 58, 0.14), 0 6px 16px rgba(24, 129, 73, 0.14);
}

.filtros {
  gap: 10px;
  margin-bottom: 16px;
}

.chip {
  padding: 9px 14px;
  font-weight: 600;
  transition: 0.16s ease;
}

.chip:hover {
  border-color: #9ad3b3;
  transform: translateY(-1px);
}

.categoria-bloco {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid #ddebe4;
  border-radius: 18px;
  padding: 14px;
  gap: 12px;
  box-shadow: 0 8px 22px rgba(24, 98, 60, 0.06);
}

.categoria-titulo {
  margin: 0 2px;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.categoria-grid {
  gap: 12px;
}

.produto-card {
  border-radius: 16px;
  border-color: #d9e8e1;
  box-shadow: 0 6px 18px rgba(14, 71, 43, 0.06);
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 166px;
}

.produto-card:hover {
  transform: translateY(-2px);
  border-color: #bfd9ca;
  box-shadow: 0 14px 26px rgba(14, 71, 43, 0.12);
}

.produto-info strong {
  font-size: 1.03rem;
}

.produto-categoria {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.produto-descricao.colapsada {
  min-height: 4.1em;
}

.produto-preco {
  letter-spacing: -0.01em;
}

.btn-add {
  box-shadow: 0 8px 18px rgba(22, 121, 70, 0.3);
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-add:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 12px 22px rgba(22, 121, 70, 0.36);
  filter: saturate(1.05);
}

.btn-ver-pedido {
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(18, 120, 67, 0.36);
}

@media (min-width: 1180px) {
  .categoria-grid {
    grid-template-columns: 1fr 1fr;
  }
}
