/* =====================================================
   قالب «مدرن» — منوی دیجیتال
   طراحی: کاغذی/گرم، ادیتوریال، Mobile First
===================================================== */

:root {
  --bg: #faf6ef;
  --paper: #f3ead9;
  --ink: #241f1a;
  --ink-soft: rgba(36, 31, 26, .62);
  --ink-faint: rgba(36, 31, 26, .38);
  --line: rgba(36, 31, 26, .10);
  --line-strong: rgba(36, 31, 26, .16);
  --card: #ffffff;
  --primary: #b5502e;
  --primary-deep: #8a3a1f;
  --primary-soft: rgba(181, 80, 46, .10);
  --accent: #56624a;
  --accent-soft: rgba(86, 98, 74, .12);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 14px 34px rgba(36, 31, 26, .08);
  --shadow-sm: 0 4px 14px rgba(36, 31, 26, .06);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Vazirmatn", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.sheet-open { overflow: hidden; }

button, input, a { font-family: inherit; }
button { border: 0; background: none; cursor: pointer; }
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }

.display-font { font-family: "Lalezar", "Vazirmatn", sans-serif; font-weight: 400; }

.container { width: calc(100% - 32px); max-width: 1160px; margin: auto; }

/* =====================================================
   HEADER
===================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(to bottom, var(--bg) 65%, transparent);
}

.header-inner {
  height: 54px;
  max-width: 720px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 8px 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-sm);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-symbol {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-family: "Lalezar", sans-serif;
  font-size: 16px;
}
.brand-symbol img { width: 100%; height: 100%; object-fit: cover; }

.brand-info { min-width: 0; line-height: 1.25; }
.brand-info strong { display: block; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-info span { display: block; margin-top: 1px; color: var(--ink-faint); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.header-button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}
.header-button svg { width: 12px; height: 12px; }

/* =====================================================
   HERO
===================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 34px 16px 64px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(480px 320px at 12% 0%, var(--primary-soft), transparent 60%),
    radial-gradient(420px 300px at 100% 30%, var(--accent-soft), transparent 55%),
    var(--bg);
}

.hero-bg-image {
  position: absolute;
  inset: -10%;
  z-index: -2;
  opacity: .16;
  filter: blur(38px) saturate(120%);
  transform: scale(1.1);
}
.hero-bg-image img { width: 100%; height: 100%; object-fit: cover; }

.hero-inner {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: "Lalezar", sans-serif;
  font-size: 38px;
  color: var(--primary);
  animation: riseIn .7s var(--ease) both;
}
.hero-badge img { width: 100%; height: 100%; object-fit: cover; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: 10px;
  font-weight: 700;
  animation: riseIn .7s .05s var(--ease) both;
}

.hero h1 {
  margin-top: 16px;
  font-family: "Lalezar", "Vazirmatn", sans-serif;
  font-weight: 400;
  font-size: clamp(30px, 8vw, 52px);
  line-height: 1.25;
  animation: riseIn .8s .1s var(--ease) both;
}

.hero p {
  max-width: 380px;
  margin: 12px auto 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.9;
  animation: riseIn .8s .16s var(--ease) both;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 16px;
  color: var(--ink-faint);
  font-size: 10.5px;
  animation: riseIn .8s .2s var(--ease) both;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 5px; }

.hero-cta {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--shadow);
  animation: riseIn .8s .24s var(--ease) both;
}
.hero-cta svg { width: 13px; height: 13px; }

.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; z-index: -1; line-height: 0; }
.hero-wave svg { width: 100%; height: 46px; display: block; }
.hero-wave path { fill: var(--paper); }

@keyframes riseIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* =====================================================
   SEARCH + CATEGORIES
===================================================== */
.filter-band {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 14px 0 12px;
  background: linear-gradient(to bottom, var(--paper) 78%, transparent);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  margin-bottom: 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.search-box svg { width: 15px; height: 15px; color: var(--ink-faint); flex-shrink: 0; }
.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
}
.search-box input::placeholder { color: var(--ink-faint); }
.search-clear { display: none; color: var(--ink-faint); font-size: 16px; line-height: 1; }
.search-box.has-value .search-clear { display: block; }

.categories {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.categories::-webkit-scrollbar { display: none; }

.category {
  position: relative;
  flex: 0 0 auto;
  padding: 9px 4px;
  margin: 0 10px;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.category::after {
  content: "";
  position: absolute;
  right: 0; left: 0; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform .35s var(--ease);
}
.category.active { color: var(--ink); }
.category.active::after { transform: scaleX(1); }

.no-results {
  display: none;
  padding: 40px 16px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 12px;
}
.no-results.visible { display: block; }

/* =====================================================
   MENU LIST (mobile) / GRID (desktop)
===================================================== */
.menu-section { background: var(--paper); padding: 4px 0 90px; }

.section-header { padding: 22px 0 16px; }
.section-overline { color: var(--primary-deep); font-size: 10px; font-weight: 700; }
.section-header h2 { margin-top: 6px; font-family: "Lalezar", sans-serif; font-weight: 400; font-size: 26px; }

.menu-list { display: flex; flex-direction: column; gap: 10px; }

.menu-card.reveal { opacity: 0; transform: translateY(14px); }
.menu-card.reveal.visible { opacity: 1; transform: translateY(0); transition: opacity .5s var(--ease), transform .5s var(--ease); }

.menu-card {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.menu-card:active { transform: scale(.98); }

.card-thumb {
  position: relative;
  flex-shrink: 0;
  width: 86px;
  height: 86px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--primary-soft);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: "Lalezar", sans-serif;
  font-size: 24px;
  color: var(--primary);
}
.card-badge {
  position: absolute;
  top: 5px; right: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
}

.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 2px 2px; }
.card-body h3 { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-body p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-foot { margin-top: 8px; display: flex; align-items: baseline; gap: 3px; }
.card-foot .price { font-size: 13px; font-weight: 700; color: var(--primary-deep); }
.card-foot .unit { font-size: 9px; color: var(--ink-faint); }
.card-unavailable { margin-top: 8px; display: inline-flex; width: fit-content; padding: 3px 9px; border-radius: 999px; background: var(--line); color: var(--ink-faint); font-size: 9px; font-weight: 700; }

.category-empty-note { padding: 40px 0; text-align: center; color: var(--ink-faint); font-size: 12px; }

/* =====================================================
   FOOTER
===================================================== */
.footer { padding: 50px 20px max(28px, env(safe-area-inset-bottom)); text-align: center; background: var(--paper); border-top: 1px solid var(--line); }
.footer-brand { font-family: "Lalezar", sans-serif; font-size: 20px; }
.footer p { margin-top: 6px; color: var(--ink-faint); font-size: 10px; }
.footer-divider { width: 34px; height: 1px; margin: 22px auto; background: var(--line-strong); }
.footer-credit { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-faint); font-size: 9px; }
.footer-credit a { color: var(--primary-deep); font-weight: 600; }
.footer-credit a:hover { color: var(--ink); }

/* =====================================================
   PREVIEW BANNER
===================================================== */
.preview-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  background: rgba(36, 31, 26, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  text-align: center;
}
.preview-banner a { font-weight: 700; color: #fff; text-decoration: underline; }


/* =====================================================
   BOTTOM SHEET
===================================================== */
.sheet { position: fixed; inset: 0; z-index: 500; visibility: hidden; pointer-events: none; }
.sheet.active { visibility: visible; pointer-events: auto; }

.sheet-backdrop { position: absolute; inset: 0; background: rgba(36, 31, 26, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .4s ease; }
.sheet.active .sheet-backdrop { opacity: 1; }

.sheet-panel {
  position: absolute;
  right: 0; bottom: 0; left: 0;
  max-height: 90svh;
  overflow-y: auto;
  border-radius: 28px 28px 0 0;
  background: var(--bg);
  transform: translateY(105%);
  transition: transform .55s var(--ease);
}
.sheet.active .sheet-panel { transform: translateY(0); }

.sheet-handle { position: absolute; top: 10px; right: 50%; transform: translateX(50%); width: 34px; height: 4px; border-radius: 999px; background: var(--line-strong); z-index: 5; }

.sheet-image { position: relative; width: 100%; aspect-ratio: 1.3; background: var(--primary-soft); }
.sheet-image img { width: 100%; height: 100%; object-fit: cover; }
.sheet-image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: "Lalezar", sans-serif; font-size: 46px; color: var(--primary); }

.sheet-close {
  position: absolute; top: 16px; left: 16px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  font-size: 20px;
  color: var(--ink);
}

.sheet-content { padding: 20px 20px max(26px, env(safe-area-inset-bottom)); }
.sheet-category { color: var(--primary-deep); font-size: 10px; font-weight: 700; }
.sheet-content h2 { margin-top: 6px; font-size: 20px; font-weight: 800; }
.sheet-content p { margin-top: 10px; color: var(--ink-soft); font-size: 12px; line-height: 1.9; }
.sheet-price {
  margin-top: 18px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}
.sheet-price span { color: var(--accent); font-size: 11px; font-weight: 600; }
.sheet-price strong { font-size: 16px; font-weight: 800; color: var(--ink); }

/* =====================================================
   TABLET
===================================================== */
@media (min-width: 620px) {
  .menu-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .menu-card { flex-direction: column; padding: 0; overflow: hidden; }
  .card-thumb { width: 100%; height: auto; aspect-ratio: 1.25; border-radius: 0; }
  .card-body { padding: 14px 16px 16px; }
  .card-body p { min-height: 32px; }
}

/* =====================================================
   DESKTOP
===================================================== */
@media (min-width: 960px) {
  .hero { padding: 56px 40px 90px; }
  .hero h1 { font-size: clamp(40px, 4.4vw, 64px); }
  .menu-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .section-header h2 { font-size: 32px; }

  .menu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
  .menu-card:hover .card-thumb img { transform: scale(1.05); }
  .card-thumb img { transition: transform .6s var(--ease); }

  .sheet { display: flex; align-items: center; justify-content: center; padding: 30px; }
  .sheet-panel {
    position: relative;
    width: 100%; max-width: 460px; max-height: 88vh;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(36, 31, 26, .25);
    opacity: 0;
    transform: translateY(24px) scale(.97);
    transition: transform .5s var(--ease), opacity .35s ease;
  }
  .sheet.active .sheet-panel { opacity: 1; transform: translateY(0) scale(1); }
}

/* =====================================================
   ACCESSIBILITY
===================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
