:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #c45c26;
  --accent-contrast: #ffffff;
  --font: "DM Sans", sans-serif;
  --display: "Fraunces", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.menu-theme {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  padding-bottom: 5rem;
}
body.drawer-open { overflow: hidden; }

.menu-hero {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.menu-hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 0%, transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 35%, #000) 0%, var(--bg) 100%);
  animation: heroIn 1s ease both;
}
.menu-hero-content {
  position: relative;
  padding: 1.5rem 1.25rem 1rem;
  animation: rise .8s .15s ease both;
}
.brand {
  font-family: var(--display);
  font-size: clamp(2rem, 8vw, 3rem);
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.menu-hero h1 {
  font-family: var(--font);
  font-weight: 500;
  font-size: 1.05rem;
  margin: .4rem 0 0;
  color: var(--muted);
}
.table-tag {
  display: inline-block;
  margin-top: .75rem;
  font-size: .85rem;
  color: var(--muted);
}
.logo { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; margin-bottom: .5rem; }

.cat-nav {
  display: flex; gap: .5rem; overflow-x: auto; padding: .75rem 1rem;
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  scrollbar-width: none;
}
.cat-nav a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
  padding: .4rem .85rem;
  border-bottom: 2px solid transparent;
  font-size: .9rem;
}
.cat-nav a:hover { border-color: var(--accent); }

.menu-main { padding: 0 1rem 2rem; max-width: 720px; margin: 0 auto; }
.cat-section { margin-top: 1.75rem; animation: rise .6s ease both; }
.cat-section h2 { font-family: var(--display); font-size: 1.5rem; margin: 0 0 .35rem; }
.cat-desc { color: var(--muted); margin: 0 0 1rem; font-size: .9rem; }

.product-list { display: flex; flex-direction: column; gap: 1rem; }
.product {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: .85rem;
  background: var(--surface);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .25s ease;
}
.product.added { transform: scale(1.02); }
.product img, .img-ph {
  width: 96px; height: 96px; object-fit: cover;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
}
.product-body { padding: .65rem .75rem .65rem 0; display: flex; flex-direction: column; }
.product-body h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.product-body p { margin: .25rem 0 0; font-size: .85rem; color: var(--muted); line-height: 1.35; }
.ingredients { font-style: italic; opacity: .9; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .5rem; }
.price { font-weight: 700; }

.btn {
  border: none; cursor: pointer; font: inherit;
  background: var(--accent); color: var(--accent-contrast);
  padding: .4rem .85rem; border-radius: 999px; font-weight: 600; font-size: .85rem;
}
.btn.primary { background: var(--accent); color: var(--accent-contrast); }
.btn.block { width: 100%; padding: .85rem; border-radius: 12px; margin-top: .75rem; }

.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 30%);
  animation: rise .4s ease;
}
.cart-bar button {
  width: 100%; max-width: 720px; margin: 0 auto; display: block;
  background: var(--accent); color: var(--accent-contrast);
  border: none; border-radius: 14px; padding: 1rem; font: inherit; font-weight: 700;
  cursor: pointer; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent);
}

.backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40;
}
.cart-drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--surface); color: var(--text);
  border-radius: 20px 20px 0 0;
  padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
  max-height: 85vh; overflow: auto;
  animation: slideUp .35s ease;
}
.cart-drawer header { display: flex; justify-content: space-between; align-items: center; }
.cart-drawer h2 { margin: 0; font-family: var(--display); }
#cart-close { background: none; border: none; font-size: 1.75rem; cursor: pointer; color: var(--muted); }
.cart-line { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid color-mix(in srgb, var(--muted) 25%, transparent); }
.qty { display: flex; align-items: center; gap: .5rem; }
.qty button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--muted); background: var(--bg); cursor: pointer; }
.item-note { width: 100%; margin-top: .35rem; font: inherit; font-size: .8rem; padding: .35rem; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent); background: var(--bg); color: var(--text); }
.note-label { display: block; margin-top: 1rem; font-size: .9rem; }
.note-label textarea { width: 100%; margin-top: .35rem; font: inherit; min-height: 70px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent); padding: .65rem; background: var(--bg); color: var(--text); }
.pay-opts { border: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.pay-opts legend { font-weight: 600; margin-bottom: .35rem; }

.orders-panel { max-width: 720px; margin: 0 auto; padding: 0 1rem 2rem; }
.orders-panel h2 { font-family: var(--display); font-size: 1.25rem; }
.open-order {
  background: var(--surface); border-radius: 12px; padding: .85rem 1rem; margin-top: .65rem;
}
.open-order .badge {
  display: inline-block; font-size: .75rem; padding: .15rem .5rem; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface)); margin-left: .25rem;
}
.open-order .badge.warn { background: #fef3c7; color: #92400e; }
.muted { color: var(--muted); }
.toast {
  position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-contrast);
  padding: .65rem 1rem; border-radius: 999px; z-index: 60; font-size: .9rem;
  animation: rise .4s ease;
}

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes heroIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

@media (min-width: 700px) {
  .product { grid-template-columns: 120px 1fr; }
  .product img, .img-ph { width: 120px; height: 120px; }
}
