/* Identidade da vitrine pública. Os painéis internos seguem seus próprios estilos. */
.public-menu {
  --bg: #f6f3ec;
  --surface: #fffefa;
  --surface-hover: #f0ece2;
  --muted: #777267;
  --border: #e7e1d5;
  --border-strong: #d8d0c1;
  background: var(--bg);
}

.public-menu .topbar {
  min-height: 72px;
  padding: 12px max(20px, calc((100vw - 1160px) / 2));
  background: rgba(255, 254, 250, 0.96);
  border-color: var(--border);
}

.public-menu .brand { gap: 12px; }
.public-menu .brand-mark {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  background: #eee6d8;
  color: var(--ink);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
}
.public-menu .brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.public-menu .brand h1 {
  max-width: min(52vw, 420px);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.12rem;
  letter-spacing: 0;
}
.public-menu .brand p { font-size: 0.68rem; letter-spacing: 0.04em; }
.public-menu .topbar-actions { gap: 9px; }
.public-menu .btn { min-height: 42px; border-radius: 7px; }
.public-menu .btn-ghost { border-color: transparent; }
.public-menu #btnOpenCart { padding-inline: 16px; }
.public-menu .cart-count { background: rgba(255, 255, 255, 0.2); }

.menu-intro {
  width: calc(100% - 40px);
  max-width: 1120px;
  margin: 42px auto 26px;
  padding: 0 4px;
}
.menu-kicker {
  margin-bottom: 9px;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.menu-intro h2 {
  color: var(--ink);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.menu-intro > p:last-child {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.96rem;
}

.public-menu .categories {
  width: min(100%, 1128px);
  max-width: none;
  padding: 0 4px 14px;
  margin-bottom: 0;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.public-menu .chip {
  padding: 8px 14px;
  border-color: var(--border);
  background: var(--surface);
  color: #605c53;
  font-size: 0.78rem;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}
.public-menu .chip:hover { border-color: var(--primary); color: var(--ink); background: var(--surface); }
.public-menu .chip.active { border-color: var(--ink); background: var(--ink); color: #fffefa; }

.public-menu .menu-grid {
  width: min(100%, 1128px);
  max-width: none;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 20px;
  padding: 12px 4px 110px;
}
.public-menu .dish-card {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(45, 39, 28, 0.035);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.public-menu .dish-open {
  display: flex;
  width: 100%;
  flex: 1;
  flex-direction: column;
  color: inherit;
  text-align: left;
}
.public-menu .dish-open:focus-visible { outline-offset: -3px; }
.public-menu .dish-open .dish-body { width: 100%; }
.public-menu .dish-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: 0 9px 22px rgba(45, 39, 28, 0.08);
}
.public-menu .dish-image {
  height: auto;
  aspect-ratio: 4 / 3;
  background: #eee8dc;
}
.public-menu .dish-image img { width: 100%; height: 100%; object-fit: cover; }
.public-menu .dish-image--placeholder {
  display: grid;
  place-items: center;
  background: #eee8dc;
}
.dish-placeholder-label {
  padding: 6px 10px;
  color: #817969;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
}
.public-menu .dish-body { gap: 7px; padding: 15px 16px 14px; }
.public-menu .dish-category {
  align-self: flex-start;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.09em;
}
.public-menu .dish-body h3 {
  color: var(--ink);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.25;
}
.public-menu .dish-desc {
  min-height: 2.7em;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  -webkit-line-clamp: 3;
}
.public-menu .dish-footer {
  position: relative;
  margin-top: 0;
  padding: 12px 16px 15px;
  border-top: 0;
}
.public-menu .dish-footer::before {
  position: absolute;
  top: 0;
  right: 16px;
  left: 16px;
  height: 1px;
  background: var(--border);
  content: '';
}
.public-menu .price { font-size: 0.98rem; font-weight: 650; }
.public-menu .btn-add {
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}
.menu-message {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 36px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.public-menu .cart-drawer { background: var(--surface); }
.public-menu .cart-header,
.public-menu .cart-footer { border-color: var(--border); }
.public-menu .cart-footer { background: var(--bg); }
.public-menu .cart-remove {
  padding: 5px 8px;
  color: var(--muted);
  font-size: 0.72rem;
}
.public-menu .cart-remove:hover { color: var(--danger); }
.public-menu .notes-label { color: var(--muted); font-size: 0.7rem; font-weight: 600; }
.public-menu .notes-input { margin-top: -3px; background: var(--surface); }
.public-menu .modal-card { border-radius: 10px; }
.public-menu .modal-card label { color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.public-menu .toast-success { background: #355b46; }

.product-details-card {
  position: relative;
  max-width: 520px;
  max-height: min(88dvh, 760px);
  overflow-y: auto;
  padding: 0;
  gap: 0;
  background: var(--surface);
}
.product-details-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 254, 250, 0.94);
  font-size: 1rem;
}
.product-details-image,
.product-details-placeholder {
  width: 100%;
  height: clamp(190px, 42vh, 300px);
  object-fit: cover;
  background: #eee8dc;
}
.product-details-image[hidden] { display: none; }
.product-details-placeholder {
  display: grid;
  place-items: center;
  color: #817969;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
}
.product-details-placeholder[hidden] { display: none; }
.product-details-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; }
.product-details-body .dish-category { padding: 0; background: transparent; color: var(--muted); }
.product-details-body h2 {
  color: var(--ink);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.2;
}
.product-details-description { color: var(--muted); font-size: 0.92rem; line-height: 1.65; white-space: pre-line; }
.product-details-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.product-details-footer .price { font-size: 1.15rem; }
.product-details-footer .btn { min-height: 44px; }

@media (max-width: 760px) {
  .public-menu .topbar { padding: 10px 14px; }
  .menu-intro { width: calc(100% - 32px); margin: 30px auto 20px; }
  .public-menu .categories { width: 100%; padding: 0 16px 12px; }
  .public-menu .menu-grid { width: 100%; padding: 10px 16px 100px; gap: 14px; }
}

@media (max-width: 480px) {
  .public-menu .topbar { align-items: center; }
  .public-menu .brand { flex: 1 1 100%; }
  .public-menu .brand h1 { max-width: calc(100vw - 90px); }
  .public-menu .topbar-actions { flex: 1 1 100%; justify-content: space-between; }
  .public-menu .topbar-actions .btn { flex: 1; padding-inline: 9px; font-size: 0.76rem; }
  .public-menu .table-badge { padding: 7px 10px; }
  .menu-intro { margin-top: 26px; }
  .menu-intro h2 { font-size: 2.1rem; }
  .public-menu .menu-grid { grid-template-columns: 1fr; }
  .public-menu .dish-image { aspect-ratio: 1.8 / 1; }
  .public-menu .dish-body { padding: 14px; }
  .product-details-body { padding: 18px; }
  .product-details-footer { align-items: stretch; flex-direction: column; }
  .product-details-footer .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .public-menu .dish-card,
  .public-menu .chip { transition: none; }
}
