/* Retro cafe menu — mobile-first, RTL */

:root {
  --bg: #f3ebde;
  --paper: #fbf6ec;
  --ink: #2b211a;
  --muted: #7c6a58;
  --accent: #b6512f;       /* retro brick/terracotta */
  --accent-soft: #e9d9c4;
  --line: #e0d2bc;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(43, 33, 26, 0.08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; max-width: 100%; }

body {
  margin: 0;
  background: #f3ebde;
  color: var(--ink);
  font-family: "Vazirmatn", "IRANSans", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.6;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

/* ---- Header / logo ---- */
.site-header {
  text-align: center;
  padding: 28px 20px 12px;
}

.logo-wrap { display: flex; justify-content: center; }

.logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--accent);
  border-radius: 50%;
  color: var(--accent);
  background: var(--paper);
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.cafe-name {
  margin: 14px 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
}

/* ---- Menu container ---- */
.menu {
  max-width: 640px;
  margin: 10px auto 40px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- Category (accordion) ---- */
.cat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cat-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-align: right;
  /* comfortable tap target */
  min-height: 56px;
}

.cat-header:hover { background: var(--accent-soft); }
.cat-header:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.cat-title { flex: 1; }

.chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);     /* points down when closed */
  transition: transform 0.25s ease;
  flex: none;
  margin-top: -4px;
}

.cat-header[aria-expanded="true"] .chevron {
  transform: rotate(-135deg);   /* points up when open */
}

/* Collapsible panel: animate max-height */
.cat-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.cat-panel.open { max-height: 2000px; }

.items {
  list-style: none;
  margin: 0;
  padding: 0 18px 10px;
}

.item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
}
.items .item:first-child { border-top: 0; }

.item-text { display: flex; flex-direction: column; min-width: 0; }
.item-name { font-weight: 600; }
.item-desc { color: var(--muted); font-size: 0.85rem; }

.item-price {
  flex: none;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.item-empty { color: var(--muted); justify-content: flex-start; }

.empty-menu { text-align: center; color: var(--muted); padding: 40px 16px; }

/* ---- Footer ---- */
.site-footer {
  max-width: 640px;
  margin: 0 auto 40px;
  padding: 0 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
