/* Café menu — warm, clean, mobile-first. Vazirmatn is self-hosted (fonts.css). */
* { box-sizing: border-box; }
:root {
  --bg: #faf6ef;
  --card: #fffdf8;
  --ink: #2f2420;
  --muted: #8a7a70;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --line: #eadfd2;
  --green: #15803d;
  --red: #b91c1c;
  --radius: 16px;
}
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  line-height: 1.7;
}
.container { max-width: 860px; margin: 0 auto; padding: 0 16px 48px; }
a { color: var(--accent); }

/* slogan hero (logo image) */
.slogan-hero { text-align: center; padding: 18px 16px 4px; }
.slogan-img { max-width: 520px; width: 100%; height: auto; display: block; margin: 0 auto; }
.insta-link {
  display: inline-block; margin-top: 2px; font-size: 15px; font-weight: 700;
  color: var(--ink); text-decoration: none; direction: ltr;
}
.insta-link:hover { color: var(--accent); }

/* free delivery banner */
.delivery-banner {
  background: #15803d; color: #fff; text-align: center;
  font-weight: 700; font-size: 15px; padding: 9px 16px;
  border-radius: 12px; max-width: calc(860px - 32px);
  margin: 12px auto 0;
}

/* sample menu notice */
.sample-banner {
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a;
  border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 700;
  text-align: center; margin: 16px 0 4px;
}

/* top bar */
.topbar { background: #2f2420; color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar-inner {
  max-width: 860px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--accent); display: grid; place-items: center; font-size: 24px;
}
.brand h1 { font-size: 20px; margin: 0; line-height: 1.3; }
.tagline { margin: 0; font-size: 12px; color: #d6c9bd; }
.admin-link {
  color: #fde68a; text-decoration: none; font-size: 13px; white-space: nowrap;
  border: 1px solid #6b543d; border-radius: 999px; padding: 6px 12px;
}

/* special banner */
.special {
  margin: 20px 0 8px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #78350f, #b45309); color: #fff;
  display: flex; gap: 0; align-items: stretch;
  box-shadow: 0 6px 20px rgba(120, 53, 15, .25);
}
.special img { width: 150px; object-fit: cover; flex: none; }
.special-body { padding: 16px 18px; }
.special-badge {
  display: inline-block; background: #fde68a; color: #78350f;
  font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 10px;
}
.special-body h2 { margin: 6px 0 2px; font-size: 20px; }
.special-body p { margin: 0 0 8px; color: #fde68a; font-size: 14px; }
.special-price { font-weight: 800; font-size: 18px; }

/* category chips */
.chips {
  position: sticky; top: 68px; z-index: 10; background: var(--bg);
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer;
  color: var(--ink); text-decoration: none;
}
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* menu sections */
.cat-title {
  font-size: 19px; margin: 26px 0 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--line); scroll-margin-top: 130px;
}
.items { display: grid; gap: 12px; }
.item {
  display: flex; gap: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; align-items: center;
}
.item img {
  width: 92px; height: 92px; object-fit: cover; border-radius: 12px; flex: none;
}
.item-body { flex: 1; min-width: 0; }
.item-body h3 { margin: 0 0 2px; font-size: 16px; }
.item-body p { margin: 0; font-size: 13px; color: var(--muted); }
.item-price { font-weight: 800; font-size: 15px; white-space: nowrap; }
.item-price small { color: var(--muted); font-weight: 400; font-size: 12px; }
.item.unavailable img { filter: grayscale(1); opacity: .55; }
.item.unavailable .item-body h3 { color: var(--muted); }
.badge-na {
  display: inline-block; background: #fee2e2; color: var(--red);
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 9px;
  margin-inline-start: 6px; vertical-align: middle;
}

/* admin */
.admin-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-top: 20px;
}
.admin-card h2 { margin: 0 0 4px; font-size: 18px; }
.admin-card .hint { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.btn {
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  border: none; border-radius: 10px; padding: 10px 18px;
  background: var(--accent); color: #fff;
}
.btn.secondary { background: #e7ddd0; color: var(--ink); }
.btn.danger { background: #fee2e2; color: var(--red); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.err { color: var(--red); font-size: 14px; min-height: 1.4em; }
.ok-msg { color: var(--green); font-size: 14px; }

/* admin item rows */
.admin-item {
  display: flex; gap: 10px; align-items: center;
  border-top: 1px solid var(--line); padding: 10px 0; flex-wrap: wrap;
}
.admin-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.admin-item .nm { flex: 1; min-width: 140px; font-weight: 700; }
.admin-item .nm small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.price-input { width: 130px; font: inherit; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.switch input { accent-color: var(--green); width: 18px; height: 18px; }
.edit-form {
  border: 1px dashed var(--line); border-radius: 12px; padding: 12px;
  margin: 6px 0 12px; background: #fff;
}
.photo-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-grid img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 10px;
  cursor: pointer; border: 3px solid transparent;
}
.photo-grid img.sel { border-color: var(--accent); }
.cat-row { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.cat-row input { flex: 1; font: inherit; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 16px 28px; border-top: 1px solid var(--line); margin-top: 32px; }
.footer p { margin: 4px 0; }
.footer p:first-child { font-weight: 700; color: var(--ink); font-size: 14px; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }

@media (max-width: 560px) {
  .special img { width: 110px; }
  .item img { width: 76px; height: 76px; }
  .brand h1 { font-size: 17px; }
}
