/* ══════════════════════════════════════════════════════════
   Fluxo Menu — demonstracao interativa
   Estende marketing.css: mesmas cores e tipografia, com o
   cardapio em moldura de celular ao lado do painel.
   ══════════════════════════════════════════════════════════ */

.demo-body { background: var(--cream-2); }

/* ── Cabecalho ─────────────────────────────────────────── */
.demo-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(250,249,246,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.demo-header-inner {
  width: min(1320px, 100% - 40px); margin-inline: auto;
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px;
  padding: 14px 0 12px;
}
.demo-badge {
  font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase;
  background: var(--purple-soft); color: var(--purple-dk);
  padding: 6px 11px; border-radius: 999px;
}
.demo-header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.ghost-button {
  padding: 10px 16px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--paper);
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.ghost-button:hover { border-color: var(--purple); color: var(--purple); }

.segment-switch {
  display: flex; gap: 4px; padding: 4px;
  background: var(--cream-2); border-radius: 999px;
}
.segment-switch button {
  padding: 9px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.segment-switch button:hover { color: var(--ink); }
.segment-switch button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

.demo-warning {
  width: min(1320px, 100% - 40px); margin: 0 auto;
  padding-bottom: 12px; font-size: 12.5px; color: var(--ink-3);
}

/* ── Layout ────────────────────────────────────────────── */
.demo-main { width: min(1320px, 100% - 40px); margin: 0 auto; padding: 28px 0 64px; }

.demo-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 20px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
}
.demo-tabs button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: 999px;
  font-size: 14.5px; font-weight: 650; color: var(--ink-2);
}
.demo-tabs button[aria-selected="true"] { background: var(--purple); color: #fff; }
.tab-count {
  min-width: 20px; padding: 1px 6px; border-radius: 999px;
  background: var(--yellow); color: var(--ink);
  font-size: 11.5px; font-weight: 750;
}
.tab-count[hidden] { display: none; }

.demo-panes { display: grid; gap: 28px; align-items: start; }
.demo-pane[hidden] { display: none; }

.pane-title {
  display: flex; align-items: center; gap: 11px;
  font-family: 'Manrope', sans-serif; font-size: 19px; font-weight: 750;
  letter-spacing: -.02em; margin-bottom: 16px;
}
.pane-step {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none;
  border-radius: 50%; background: var(--purple); color: #fff; font-size: 13px; font-weight: 700;
}
.pane-note { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* ── Cardapio no celular ───────────────────────────────── */
.phone-frame {
  position: relative; width: min(400px, 100%); margin-inline: auto;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 30px; box-shadow: var(--sh-lg); overflow: hidden;
}
.phone-scroll { max-height: min(70vh, 660px); overflow-y: auto; padding-bottom: 84px; }

.loja-capa { position: relative; aspect-ratio: 16 / 9; }
.loja-capa img { width: 100%; height: 100%; object-fit: cover; }
.loja-capa-tag {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  color: #fff; font-size: 15px; font-weight: 650;
  text-shadow: 0 1px 12px rgba(0,0,0,.65);
}
.loja-cabecalho { padding: 0 16px 4px; }
.loja-avatar {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 17px;
  color: #fff; font-weight: 800; font-size: 22px;
  margin-top: -26px; border: 3px solid var(--paper); position: relative;
}
.loja-titulo { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.loja-titulo strong { font-family: 'Manrope', sans-serif; font-size: 22px; letter-spacing: -.025em; }
.loja-resumo { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.loja-meta { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }

.categorias-atalho {
  position: sticky; top: 0; z-index: 2;
  display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none;
  padding: 12px 16px; margin-top: 8px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.categorias-atalho::-webkit-scrollbar { display: none; }
.categorias-atalho button {
  flex: none; padding: 7px 14px; border-radius: 999px;
  background: var(--cream-2); color: var(--ink-2);
  font-size: 13px; font-weight: 600;
}
.categorias-atalho button.active { background: var(--ink); color: var(--cream); }

.categoria { padding: 20px 16px 4px; scroll-margin-top: 56px; }
.categoria h3 { font-size: 17px; margin-bottom: 12px; }

.produto {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  border: 1px solid var(--line); border-radius: 18px;
  padding: 13px; margin-bottom: 10px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.produto:hover { border-color: var(--purple-line); box-shadow: var(--sh); }
.produto-texto { flex: 1; min-width: 0; }
.produto h4 { font-family: 'Manrope', sans-serif; font-size: 16px; font-weight: 750; letter-spacing: -.02em; margin: 3px 0 3px; }
.produto p { font-size: 13px; color: var(--ink-3); line-height: 1.4; margin-bottom: 8px; }
.produto strong { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.produto img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; flex: none; }

.cart-bar {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-radius: 18px;
  background: var(--ink); color: var(--cream);
  font-size: 15px; font-weight: 600; box-shadow: var(--sh-lg);
  animation: cart-in .28s var(--ease);
}
.cart-bar[hidden] { display: none; }
.cart-count {
  display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 999px; background: var(--yellow); color: var(--ink);
  font-size: 13px; font-weight: 750;
}
.cart-bar strong { margin-left: auto; font-variant-numeric: tabular-nums; }
@keyframes cart-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── Painel ────────────────────────────────────────────── */
.panel-window {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--sh-lg); overflow: hidden;
}
.panel-top {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  background: var(--cream); font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.panel-board { padding: 18px; max-height: min(70vh, 660px); overflow-y: auto; }

.panel-counters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.counter {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--cream-2); color: var(--ink-2);
  font-size: 12.5px; font-weight: 600;
}
.counter b { font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--ink); }
.counter-novo { background: var(--purple-soft); color: var(--purple-dk); }
.counter-novo b { color: var(--purple-dk); }

.panel-empty {
  display: grid; justify-items: center; gap: 8px; text-align: center;
  border: 1.5px dashed var(--line-2); border-radius: var(--r-lg);
  padding: 46px 22px; color: var(--ink-3);
}
.panel-empty-icon { font-size: 30px; }
.panel-empty strong { font-family: 'Manrope', sans-serif; font-size: 17px; color: var(--ink); }
.panel-empty p { font-size: 14px; max-width: 34ch; }

.panel-list { display: flex; flex-direction: column; gap: 14px; }
.panel-order {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; background: var(--paper);
}
.panel-order.status-novo { border-color: var(--purple-line); box-shadow: 0 0 0 3px var(--purple-soft); }
.panel-order.status-concluido { opacity: .66; }
.panel-order.entrando { animation: order-in .4s var(--ease); }
@keyframes order-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.panel-order-top { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.panel-order-top strong { font-variant-numeric: tabular-nums; font-size: 15px; }
.panel-order-time { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip {
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  background: var(--cream-2); color: var(--ink-2);
}
.chip-novo { background: var(--purple-soft); color: var(--purple-dk); }
.chip-preparo { background: #FDF1DF; color: #8A5300; }
.chip-pronto { background: #E6F4EE; color: var(--ok); }
.chip-concluido { background: var(--cream-2); color: var(--ink-3); }

.panel-order h3 { font-size: 17px; margin: 10px 0 2px; }
.panel-order-mode { font-size: 13px; color: var(--ink-3); }

.panel-items {
  display: flex; flex-direction: column; gap: 8px;
  margin: 13px 0; padding: 13px 0;
  border-block: 1px dashed var(--line); font-size: 14px;
}
.panel-item-top { display: flex; justify-content: space-between; gap: 12px; font-weight: 550; }
.panel-item-price { font-variant-numeric: tabular-nums; color: var(--ink-2); flex: none; }
.panel-items small { display: block; font-size: 12.5px; color: var(--ink-3); padding-left: 16px; }
.panel-item-note { color: var(--purple-dk) !important; font-weight: 600; }

.panel-order-total { margin-top: 2px; }
.panel-order-fee { display: block; font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.panel-order-grand { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.panel-order-grand strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.panel-advance { width: 100%; margin-top: 14px; }
.panel-done { margin-top: 12px; font-size: 13px; color: var(--ink-3); }

/* ── Chamada final ─────────────────────────────────────── */
.demo-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px;
  margin-top: 40px; padding: 34px 32px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl);
}
.demo-cta h2 { font-size: 26px; }
.demo-cta p { font-size: 15.5px; color: var(--ink-2); margin-top: 8px; max-width: 46ch; }
.demo-cta .button-row { margin-left: auto; }

/* ── Folhas (dialog) ───────────────────────────────────── */
.sheet {
  width: min(520px, 100% - 24px); max-height: min(88vh, 780px);
  padding: 0; border: none; border-radius: 26px;
  background: var(--paper); color: var(--ink);
  box-shadow: var(--sh-xl);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.sheet:not([open]) { display: none; }
.sheet::backdrop { background: rgba(23,19,31,.52); backdrop-filter: blur(3px); }

.sheet-close-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px 8px;
}
.sheet-close-row h2 { font-size: 20px; }
.sheet-close-row:only-child, .sheet-close-row:has(> .icon-button:only-child) { justify-content: flex-end; }
.icon-button {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 50%; background: var(--cream-2); color: var(--ink-2); font-size: 15px;
  transition: background .18s var(--ease);
}
.icon-button:hover { background: var(--line); }

.sheet-scroll { overflow-y: auto; flex: 1; min-height: 0; }
.sheet-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.sheet-body { padding: 18px 22px 24px; }
.sheet-body h2 { font-size: 24px; }
.sheet-description { font-size: 14.5px; color: var(--ink-2); margin-top: 8px; }

.grupo { border: none; margin-top: 22px; }
.grupo legend {
  display: flex; align-items: baseline; gap: 10px; width: 100%;
  padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line);
}
.grupo-nome { font-family: 'Manrope', sans-serif; font-size: 16px; font-weight: 750; letter-spacing: -.02em; }
.grupo-regra {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
}
.opcao {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px; cursor: pointer; font-size: 15px;
  border-bottom: 1px solid var(--cream-2);
}
.opcao input { width: 19px; height: 19px; flex: none; accent-color: var(--purple); cursor: pointer; }
.opcao-nome { flex: 1; }
.opcao-preco { font-size: 13.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.opcao-bloqueada { opacity: .45; cursor: not-allowed; }
.opcao-bloqueada input { cursor: not-allowed; }

.field { display: block; margin-top: 22px; }
.field > span { display: block; font-size: 13.5px; font-weight: 650; margin-bottom: 7px; }
.field textarea {
  width: 100%; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line-2); background: var(--cream);
  font: inherit; font-size: 14.5px; color: inherit; resize: vertical;
}
.field textarea:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; }

.sheet-footer {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-top: 1px solid var(--line); background: var(--paper);
}
.sheet-action { flex: 1; }
.sheet-action:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.sheet-action strong { font-variant-numeric: tabular-nums; }

.qty-control {
  display: flex; align-items: center; gap: 4px; flex: none;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 4px;
}
.qty-control button {
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 18px; font-weight: 600; color: var(--ink-2);
  transition: background .15s var(--ease);
}
.qty-control button:hover { background: var(--cream-2); color: var(--ink); }
.qty-control span { min-width: 24px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Carrinho ──────────────────────────────────────────── */
.cart-list { display: flex; flex-direction: column; gap: 14px; }
.cart-item { border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.cart-item-top { display: flex; justify-content: space-between; gap: 14px; font-size: 15.5px; }
.cart-item-price { font-variant-numeric: tabular-nums; flex: none; }
.cart-item-options { margin-top: 7px; display: flex; flex-direction: column; gap: 2px; }
.cart-item-options li { font-size: 13px; color: var(--ink-3); padding-left: 14px; position: relative; }
.cart-item-options li::before { content: '+'; position: absolute; left: 0; }
.cart-item-note { margin-top: 7px; font-size: 13px; color: var(--purple-dk); }
.cart-item-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.link-button { font-size: 13.5px; font-weight: 600; color: var(--ink-3); text-decoration: underline; }
.link-button:hover { color: #B42318; }
.cart-empty { padding: 26px 4px; text-align: center; color: var(--ink-3); font-size: 14.5px; }

.delivery-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-top: 22px;
  background: var(--cream-2); border-radius: 999px;
}
.delivery-switch button {
  padding: 11px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.delivery-switch button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--sh); }

.cart-summary { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.cart-summary > div { display: flex; justify-content: space-between; color: var(--ink-2); }
.cart-summary > div[hidden] { display: none; }
.cart-summary dd { font-variant-numeric: tabular-nums; }
.cart-summary-total {
  padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 17px; font-weight: 700; color: var(--ink) !important;
}
.cart-summary-total dd { font-size: 19px; font-family: 'Manrope', sans-serif; }

/* ── Previa do WhatsApp ────────────────────────────────── */
.whats-bubble {
  margin-top: 18px; padding: 16px 18px;
  background: #E7F6E4; border-radius: 18px 18px 18px 6px;
  border: 1px solid #CDE8C8;
}
.whats-bubble pre {
  font: inherit; font-size: 14px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word; color: #17311B;
}

.demo-live {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* O logo tem fundo creme chapado (sem alpha), entao o rodape da demo
   volta ao creme claro para o retangulo nao aparecer. */
.demo-body footer.site-footer {
  width: 100%; max-width: none; padding-inline: max(20px, calc((100% - 1320px) / 2));
  margin-top: 0; background: var(--cream); border-top: 1px solid var(--line-2);
}

/* ── Responsivo ────────────────────────────────────────── */
@media (min-width: 1000px) {
  .demo-tabs { display: none; }
  .demo-panes { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 32px; }
}

@media (max-width: 999px) {
  .demo-cta .button-row { margin-left: 0; }
}

@media (max-width: 820px) {
  .field textarea { font-size: 16px; }
  .icon-button, .qty-control button { width: 44px; height: 44px; }
  .link-button, .segment-switch button, .categorias-atalho button { min-height: 44px; }
}

@media (max-width: 720px) {
  .sheet-footer { flex-wrap: wrap; flex-shrink: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .sheet-action { flex-basis: 100%; white-space: normal; }
  .demo-header-inner, .demo-warning, .demo-main { width: calc(100% - 32px); }
  .demo-header-inner { padding-bottom: 10px; }
  .segment-switch { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segment-switch::-webkit-scrollbar { display: none; }
  .segment-switch button { flex: none; }
  .demo-header-actions { margin-left: auto; }
  .demo-header-actions .button { display: none; }
  .phone-frame { width: 100%; border-radius: 24px; }
  .phone-scroll { max-height: none; }
  .demo-cta { padding: 26px 22px; }
  .demo-cta .button-row { width: 100%; }
  .sheet { width: 100%; max-height: 92vh; max-height: 92dvh; margin: auto auto 0; border-radius: 26px 26px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cart-bar, .panel-order.entrando { animation: none; }
}
