:root {
  color-scheme: light;
  --menu-bg: #f4f0e5;
  --menu-paper: #fffdf6;
  --menu-ink: #171714;
  --menu-muted: #665f50;
  --menu-yellow: #f2cb37;
  --menu-orange: #ff5a1f;
  --menu-line: rgba(23, 23, 20, 0.15);
  --menu-shadow: 0 16px 32px rgba(23, 23, 20, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--menu-bg); color: var(--menu-ink); font-family: "Plus Jakarta Sans", sans-serif; line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
.menu-container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.menu-promo { padding: 9px 16px; background: var(--menu-yellow); text-align: center; font-size: 0.73rem; font-weight: 800; letter-spacing: 0.1em; }
.menu-header { position: sticky; top: 0; z-index: 10; background: var(--menu-ink); color: var(--menu-paper); }
.menu-header-inner { min-height: 82px; display: flex; align-items: center; gap: 28px; }
.menu-brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.menu-brand img { width: 54px; height: 54px; object-fit: contain; }
.menu-brand span { display: grid; }
.menu-brand strong { font-size: 1rem; }
.menu-brand small { color: #d6d0c1; font-size: 0.67rem; letter-spacing: 0.06em; text-transform: uppercase; }
.menu-header-links { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.back-link { color: #e0dacb; font-size: 0.83rem; font-weight: 700; }
.back-link:hover { color: var(--menu-yellow); }
.bag-button { display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgba(255,255,255,0.24); border-radius: 3px; background: transparent; color: white; padding: 11px 15px; font-weight: 700; }
.bag-button b { min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--menu-yellow); color: var(--menu-ink); font-size: 0.76rem; }
.menu-main { padding-top: 62px; padding-bottom: 100px; }
.menu-intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 34px; }
.menu-kicker { color: #a94b21; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.menu-intro h1 { margin: 6px 0 3px; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: clamp(3.6rem, 7vw, 6rem); font-weight: 800; line-height: 0.92; text-transform: uppercase; }
.menu-intro h1 span { color: #db4e1d; }
.menu-intro p { max-width: 560px; margin: 13px 0 0; color: var(--menu-muted); }
.search-box { width: min(100%, 340px); height: 48px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--menu-line); background: var(--menu-paper); padding: 0 13px; }
.search-box > span:first-child { font-size: 1.4rem; line-height: 1; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--menu-ink); }
.search-box:focus-within { outline: 2px solid var(--menu-orange); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.menu-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 28px; }
.catalog-panel { min-width: 0; }
.filter-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter-chip { min-height: 40px; padding: 8px 14px; border: 1px solid var(--menu-line); border-radius: 2px; background: transparent; color: var(--menu-ink); font-size: 0.77rem; font-weight: 800; text-transform: uppercase; }
.filter-chip:hover, .filter-chip.is-active { border-color: var(--menu-ink); background: var(--menu-ink); color: white; }
.filter-chip:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--menu-orange); outline-offset: 3px; }
.menu-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.menu-product { min-width: 0; overflow: hidden; background: var(--menu-paper); border: 1px solid rgba(23,23,20,0.08); box-shadow: var(--menu-shadow); }
.menu-product[hidden] { display: none; }
.menu-product > img { width: 100%; aspect-ratio: 1.4; object-fit: cover; background: #e4ddcd; }
.menu-product-placeholder { display: grid; aspect-ratio: 1.4; place-items: center; background: var(--menu-yellow); color: var(--menu-ink); font-family: "Barlow Condensed", sans-serif; font-size: 1.7rem; font-weight: 800; text-transform: uppercase; }
.product-copy { padding: 17px; }
.product-title-row { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.product-title-row h2 { margin: 0; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 1.65rem; line-height: 1; text-transform: uppercase; }
.product-tag { flex: 0 0 auto; padding: 4px 7px; background: #fae8a8; font-size: 0.62rem; font-weight: 800; text-transform: uppercase; }
.product-copy p { min-height: 4.5em; margin: 11px 0 16px; color: var(--menu-muted); font-size: 0.86rem; }
.product-action-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--menu-line); padding-top: 13px; }
.price-note { color: var(--menu-muted); font-size: 0.75rem; font-weight: 700; }
.add-button, .checkout-button { border: 0; border-radius: 2px; background: var(--menu-orange); color: var(--menu-ink); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; }
.add-button { display: inline-flex; align-items: center; gap: 9px; padding: 10px 12px; box-shadow: 0 5px 14px rgba(255,90,31,0.2); }
.add-button:disabled { opacity: 0.45; cursor: not-allowed; }
.add-button span { font-size: 1.1rem; line-height: 0.8; }
.add-button:hover, .checkout-button:not(.is-disabled):hover { background: #ff7738; transform: translateY(-1px); }
.empty-results { padding: 24px; color: var(--menu-muted); background: var(--menu-paper); }
.bag-panel { position: sticky; top: 105px; min-width: 0; padding: 20px; background: var(--menu-paper); border-top: 4px solid var(--menu-yellow); box-shadow: var(--menu-shadow); }
.bag-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--menu-line); }
.bag-heading h2 { margin: 3px 0 0; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 2rem; line-height: 1; text-transform: uppercase; }
.bag-heading .menu-kicker { font-size: 0.62rem; }
.bag-close { display: none; width: 38px; height: 38px; border: 1px solid var(--menu-line); background: transparent; color: var(--menu-ink); font-size: 1.6rem; line-height: 1; }
.bag-items { display: grid; gap: 14px; padding: 16px 0; }
.bag-empty { margin: 0; padding: 12px 0; color: var(--menu-muted); font-size: 0.86rem; }
.bag-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 10px; align-items: center; }
.bag-line strong { font-size: 0.83rem; }
.bag-line-price { grid-column: 1; color: var(--menu-muted); font-size: 0.69rem; }
.bag-line-controls { display: flex; align-items: center; gap: 9px; }
.bag-line-controls { grid-column: 2; grid-row: 1 / span 2; }
.quantity-button { width: 28px; height: 28px; border: 1px solid var(--menu-line); background: transparent; color: var(--menu-ink); font-weight: 800; }
.quantity { min-width: 14px; text-align: center; font-size: 0.82rem; font-weight: 800; }
.bag-total { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--menu-line); font-size: 0.82rem; }
.bag-total[hidden] { display: none; }
.bag-total strong { font-size: 1rem; }
.bag-delivery-fee { padding-top: 0; border-top: 0; color: var(--menu-muted); font-size: 0.74rem; }
.bag-footer { padding-top: 14px; border-top: 1px solid var(--menu-line); }
.checkout-form { display: grid; gap: 11px; }
.payment-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; border: 0; padding: 0; margin: 0; }
.payment-options legend { margin-bottom: 7px; font-size: 0.75rem; font-weight: 800; }
.fulfillment-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; border: 0; padding: 0; margin: 0; }
.fulfillment-options legend { margin-bottom: 7px; font-size: 0.75rem; font-weight: 800; }
.payment-option { min-height: 39px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--menu-line); background: #fff; font-size: 0.69rem; font-weight: 800; cursor: pointer; }
.payment-option:has(input:checked) { border-color: var(--menu-ink); background: #fae8a8; }
.payment-option input { width: 14px; height: 14px; accent-color: var(--menu-orange); }
.checkout-field { display: grid; gap: 4px; font-size: 0.71rem; font-weight: 800; }
.checkout-field[hidden] { display: none; }
.optional-label { color: var(--menu-muted); font-size: 0.68rem; font-weight: 600; }
.checkout-field input, .checkout-field textarea { width: 100%; min-width: 0; border: 1px solid var(--menu-line); border-radius: 0; background: #fff; color: var(--menu-ink); padding: 9px 10px; font: inherit; font-size: 0.82rem; resize: vertical; }
.checkout-field input:focus, .checkout-field textarea:focus { outline: 2px solid var(--menu-orange); outline-offset: 1px; }
.checkout-notice { margin: 0; color: var(--menu-muted); font-size: 0.68rem; }
.checkout-status { min-height: 0; margin: 0; color: #983b16; font-size: 0.72rem; font-weight: 700; }
.checkout-status:empty { display: none; }
.whatsapp-notification-link { display: block; padding: 11px; background: #d9f5df; color: #124f29; font-size: 0.72rem; font-weight: 800; text-align: center; }
.whatsapp-notification-link[hidden] { display: none; }
.checkout-button { display: flex; min-height: 47px; align-items: center; justify-content: center; gap: 8px; padding: 12px; text-align: center; }
.checkout-button:disabled { opacity: 0.45; cursor: not-allowed; }
.bag-backdrop, .mobile-bag-bar { display: none; }
.menu-footer { padding: 21px 0; background: var(--menu-ink); color: #eee8d9; font-size: 0.76rem; }
.menu-footer .menu-container { display: flex; justify-content: space-between; align-items: center; gap: 15px; flex-wrap: wrap; }
.footer-info { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-separator { opacity: 0.5; }

@media (max-width: 900px) {
  .menu-layout { grid-template-columns: minmax(0, 1fr) 285px; gap: 18px; }
  .menu-products { gap: 12px; }
  .product-copy { padding: 14px; }
  .product-title-row h2 { font-size: 1.45rem; }
}

@media (max-width: 700px) {
  .menu-header-inner { min-height: 70px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand bag" "links links"; gap: 8px 9px; padding-block: 8px; }
  .menu-brand { grid-area: brand; }
  .menu-header-links { grid-area: links; justify-content: center; gap: 22px; margin: 0; padding: 4px 0 2px; }
  .menu-header-links a { font-size: 0.73rem; }
  .bag-button { grid-area: bag; }
  .menu-brand img { width: 46px; height: 46px; }
  .menu-brand strong { font-size: 0.9rem; }
  .menu-brand small { font-size: 0.57rem; }
  .back-link { font-size: 0.75rem; }
  .bag-button { padding: 9px 8px; font-size: 0.75rem; }
  .menu-main { padding-top: 36px; padding-bottom: 100px; }
  .menu-intro { display: grid; align-items: start; gap: 18px; margin-bottom: 24px; }
  .menu-intro h1 { font-size: clamp(3.5rem, 14vw, 5rem); }
  .menu-intro p { font-size: 0.9rem; }
  .search-box { width: 100%; }
  .menu-layout { display: block; }
  .menu-products { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .product-copy { padding: 12px; }
  .product-title-row { display: block; }
  .product-title-row h2 { font-size: 1.35rem; }
  .product-tag { display: inline-block; margin-top: 8px; }
  .product-copy p { min-height: 0; font-size: 0.8rem; }
  .product-action-row { align-items: start; flex-direction: column; }
  .add-button { width: 100%; justify-content: space-between; }
  .bag-panel { position: fixed; z-index: 31; top: auto; right: 0; bottom: 0; left: 0; display: flex; max-height: min(88vh, 760px); flex-direction: column; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); border-top-width: 5px; transform: translateY(105%); transition: transform 0.25s ease; }
  .bag-panel.is-open { transform: translateY(0); }
  .bag-heading { flex: 0 0 auto; }
  .bag-close { display: block; }
  .bag-items { min-height: 60px; overflow-y: auto; }
  .bag-footer { flex: 0 0 auto; max-height: 54vh; overflow-y: auto; }
  .bag-backdrop.is-visible { position: fixed; z-index: 30; inset: 0; display: block; background: rgba(0,0,0,0.55); }
  .mobile-bag-bar { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; display: flex; min-height: 60px; justify-content: space-between; align-items: center; gap: 12px; padding: 8px max(16px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: var(--menu-ink); color: white; font-size: 0.82rem; }
  .mobile-bag-bar button { border: 0; background: var(--menu-orange); color: var(--menu-ink); padding: 10px 13px; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; }
  .menu-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); text-align: center; }
  .menu-footer .menu-container { flex-direction: column; justify-content: center; gap: 10px; }
  .footer-info { flex-direction: column; gap: 4px; }
  .footer-separator { display: none; }
  body.bag-open { overflow: hidden; }
}

@media (max-width: 380px) {
  .menu-container { width: calc(100% - 24px); }
  .menu-header-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .menu-brand { gap: 7px; }
  .menu-brand img { width: 40px; height: 40px; }
  .menu-header-links { gap: 18px; }
  .bag-button { justify-content: center; }
  .menu-products { grid-template-columns: 1fr; }
  .menu-product { display: grid; grid-template-columns: 38% minmax(0, 1fr); }
  .menu-product > img { height: 100%; min-height: 190px; aspect-ratio: auto; }
  .product-title-row h2 { font-size: 1.4rem; }
  .product-copy p { margin: 8px 0 12px; }
}

/* =========================================================
   MODAL DE PAGAMENTO PIX AUTOMÁTICO
   ========================================================= */
.pix-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(18, 18, 16, 0.78);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.pix-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pix-modal {
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  width: min(440px, calc(100% - 32px));
  max-height: min(92vh, 760px);
  overflow-y: auto;
  background: var(--menu-paper);
  border: 1px solid rgba(23, 23, 20, 0.15);
  border-top: 6px solid #00bfa5;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.pix-modal.is-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.pix-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--menu-line);
  background: #fff;
}
.pix-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #00897b;
  font-weight: 800;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pix-brand-tag svg {
  color: #00bfa5;
}
.pix-modal-close {
  background: transparent;
  border: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--menu-muted);
  padding: 4px;
}
.pix-modal-close:hover {
  color: var(--menu-ink);
}

.pix-modal-body {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pix-amount-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: #fdf8e8;
  border: 1px solid #ebdcb2;
  padding: 12px 16px;
  border-radius: 4px;
}
.pix-amount-row span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--menu-muted);
}
.pix-amount-row strong {
  font-size: 1.45rem;
  font-family: "Barlow Condensed", sans-serif;
  color: var(--menu-ink);
}

.pix-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: 20px;
  font-size: 0.77rem;
  font-weight: 700;
  text-align: center;
}
.pix-status-badge.pending {
  background: #e0f2f1;
  color: #004d40;
  border: 1px solid #b2dfdb;
}
.pix-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #00bfa5;
  box-shadow: 0 0 0 0 rgba(0, 191, 165, 0.7);
  animation: pix-pulse 1.6s infinite;
}
@keyframes pix-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 191, 165, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 191, 165, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 191, 165, 0); }
}

.pix-qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  background: #fff;
  border: 2px dashed #b2dfdb;
  border-radius: 8px;
  padding: 16px;
}
.pix-qr-container img {
  width: 220px;
  height: 220px;
  object-fit: contain;
}
.pix-qr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--menu-muted);
  font-size: 0.8rem;
  font-weight: 700;
}
.pix-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(0, 191, 165, 0.2);
  border-top-color: #00bfa5;
  border-radius: 50%;
  animation: pix-spin 0.8s linear infinite;
}
@keyframes pix-spin {
  to { transform: rotate(360deg); }
}

.pix-instruction {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--menu-muted);
  text-align: center;
}

.pix-copy-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pix-copy-box input {
  width: 100%;
  padding: 9px 12px;
  font-size: 0.72rem;
  background: #f7f5ed;
  border: 1px solid var(--menu-line);
  color: var(--menu-muted);
  font-family: monospace;
  outline: none;
}
.pix-copy-button {
  background: #00bfa5;
  color: #fff;
  border: 0;
  padding: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 3px;
  transition: background 0.2s;
}
.pix-copy-button:hover {
  background: #00897b;
}

.pix-copy-feedback {
  color: #00796b;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.pix-demo-banner {
  background: #fff8e1;
  border: 1px solid #ffe082;
  padding: 12px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}
.pix-demo-banner small {
  color: #795548;
  font-size: 0.73rem;
}
.pix-demo-approve-btn {
  background: #ff9800;
  color: #fff;
  border: 0;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 3px;
}
.pix-demo-approve-btn:hover {
  background: #f57c00;
}

.pix-timer-row {
  text-align: center;
  color: var(--menu-muted);
  font-size: 0.73rem;
}

/* Sucesso do Pix */
.pix-success-view {
  text-align: center;
  align-items: center;
  gap: 16px;
  padding: 32px 20px;
}
.pix-success-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #00bfa5;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 191, 165, 0.35);
  animation: pix-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes pix-pop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.pix-success-view h2 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 2.2rem;
  color: #004d40;
  text-transform: uppercase;
}
.pix-success-msg {
  margin: 0;
  color: var(--menu-muted);
  font-size: 0.86rem;
}
.pix-order-summary-box {
  width: 100%;
  background: #f4f0e5;
  padding: 14px;
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--menu-ink);
  text-align: left;
}
.pix-whatsapp-btn {
  display: block;
  width: 100%;
  background: #25d366;
  color: #fff;
  padding: 13px;
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  border-radius: 3px;
  text-align: center;
}
.pix-whatsapp-btn:hover {
  background: #1eb956;
}
.pix-finish-btn {
  width: 100%;
  background: var(--menu-ink);
  color: #fff;
  border: 0;
  padding: 11px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 3px;
}
