/* SYBO Menu — the public menu's shared structure. Each template (t-*.css)
   sets the variables and adds its own character on top. Mobile first. */
@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap;
  src: url("/static/fonts/Vazirmatn_400_normal_arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Vazirmatn"; font-weight: 600; font-display: swap;
  src: url("/static/fonts/Vazirmatn_600_normal_arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Vazirmatn"; font-weight: 800; font-display: swap;
  src: url("/static/fonts/Vazirmatn_700_normal_arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --bg: #fbfaf7; --surface: #ffffff; --ink: #1b1b1b; --muted: #5f5a54; --line: #e7e2da;
  --radius: 16px; --gap: 1rem; --font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --title-weight: 800; --head-bg: var(--bg); --nav-bg: var(--bg);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 128px; }
body.sm { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.75 var(--font); }
[data-font="bold"] .sm-title, [data-font="bold"] .sm-section-title { font-weight: 800; letter-spacing: -.01em; }
img { max-width: 100%; }
a { color: var(--text-accent); }
:focus-visible { outline: 3px solid var(--text-accent); outline-offset: 2px; }
.sm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sm-banner { background: var(--accent); color: var(--accent-ink); text-align: center; padding: .5rem 1rem; font-size: .9rem; font-weight: 600; }
.sm-banner a { color: inherit; }

/* Header */
.sm-head { background: var(--head-bg); padding: 2rem 1rem 1.25rem; text-align: center; }
.sm-head-inner { max-width: 720px; margin: 0 auto; display: grid; justify-items: center; gap: .35rem; }
.sm-logo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.sm-logo-letter { display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: var(--accent-ink); background: var(--accent); }
.sm-title { margin: .4rem 0 0; font-size: 1.85rem; line-height: 1.35; font-weight: var(--title-weight); }
.sm-title-en { margin: 0; color: var(--muted); font-size: .95rem; letter-spacing: .04em; }
.sm-tagline { margin: .2rem 0 0; color: var(--muted); }
.sm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .9rem; }
.sm-action { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: .45rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem;
  background: var(--accent); color: var(--accent-ink); }

/* Sticky search + categories */
.sm-sticky { position: sticky; top: 0; z-index: 10; background: var(--nav-bg); border-bottom: 1px solid var(--line); }
.sm-search { max-width: 720px; margin: 0 auto; padding: .6rem 1rem .3rem; }
.sm-search input { width: 100%; font: inherit; min-height: 46px; padding: .55rem 1rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.sm-search input::placeholder { color: var(--muted); }
.sm-cats { display: flex; gap: .4rem; overflow-x: auto; padding: .4rem 1rem .65rem; max-width: 720px; margin: 0 auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.sm-cats::-webkit-scrollbar { display: none; }
.sm-cats a { flex: none; scroll-snap-align: start; padding: .4rem .95rem; min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); font-size: .92rem; white-space: nowrap; }
.sm-cats a.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Sections and items */
.sm-main { max-width: 720px; margin: 0 auto; padding: .5rem 1rem 1rem; }
.sm-section { padding-top: 1.25rem; }
.sm-section-title { font-size: 1.3rem; margin: 0 0 .75rem; font-weight: var(--title-weight); color: var(--text-accent); }
.sm-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.sm-item { display: flex; gap: .85rem; padding: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.sm-item.is-out { opacity: .6; }
.sm-item.is-out .sm-item-name { text-decoration: line-through; text-decoration-thickness: 1px; }
.sm-photo { width: 96px; height: 96px; flex: none; object-fit: cover; border-radius: calc(var(--radius) - 6px); background: var(--line); }
.sm-item-body { flex: 1; min-width: 0; }
.sm-item-top { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.sm-item-name { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.5; }
.sm-price { white-space: nowrap; color: var(--text-accent); }
.sm-price b { font-weight: 800; font-size: 1.02rem; }
.sm-price small { font-size: .75rem; color: var(--muted); }
.sm-desc { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; line-height: 1.7; white-space: pre-line; }
.sm-variants { list-style: none; padding: 0; margin: .45rem 0 0; display: grid; gap: .15rem; }
.sm-variants li { display: flex; justify-content: space-between; gap: .5rem; font-size: .93rem; border-top: 1px dashed var(--line); padding-top: .2rem; }
.sm-tags { margin: .45rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.sm-tag { font-size: .75rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; background: var(--line); color: var(--ink); }
.sm-tag-new, .sm-tag-chef { background: var(--accent); color: var(--accent-ink); }
.sm-tag-out { background: #b3261e; color: #fff; }
.sm-empty { text-align: center; color: var(--muted); padding: 2rem 0; }
.sm-item[hidden], .sm-section[hidden] { display: none; }

/* Info */
.sm-info { max-width: 720px; margin: 1.5rem auto 0; padding: 1rem; }
.sm-branch { background: var(--surface); border: 1px solid var(--line); border-radius: max(var(--radius), 18px); padding: 1.1rem 1.1rem .6rem; margin-bottom: .9rem; }
.sm-branch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.sm-branch h3 { margin: 0 0 .3rem; font-size: 1.08rem; }
.sm-address { display: flex; gap: .45rem; align-items: flex-start; margin: 0; line-height: 1.8; }
.sm-address svg { flex: none; margin-top: .35rem; color: var(--text-accent); }
.sm-open-now { flex: none; display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; white-space: nowrap; }
.sm-open-now::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sm-open-now.is-open { color: #1f8a5b; background: rgba(31, 138, 91, .12); }
.sm-open-now.is-closed { color: #b3261e; background: rgba(179, 38, 30, .1); }
.sm-branch-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; margin: .9rem 0 .4rem; }
.sm-branch-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; padding: .5rem .9rem; border-radius: 14px; text-decoration: none; font-weight: 700; font-size: .92rem;
  background: var(--accent); color: var(--accent-ink); }
.sm-branch-btn + .sm-branch-btn { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.sm-hours { width: 100%; border-collapse: collapse; font-size: .93rem; margin-top: .3rem; }
.sm-hours th, .sm-hours td { padding: .5rem .2rem; border-top: 1px solid var(--line); text-align: start; font-weight: 400; }
.sm-hours tr:first-child th, .sm-hours tr:first-child td { border-top: 0; }
.sm-hours td { text-align: end; font-variant-numeric: tabular-nums; }
.sm-today { display: none; margin-inline-start: .45rem; font-size: .7rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); vertical-align: middle; }
.sm-hours tr.is-today th, .sm-hours tr.is-today td { font-weight: 800; color: var(--text-accent); }
.sm-hours tr.is-today .sm-today { display: inline-block; }
.sm-hours tr.is-closed td { color: var(--muted); }

/* Footer */
.sm-foot { text-align: center; padding: 1.5rem 1rem 2.5rem; }
.sm-credit { color: var(--muted); font-size: .8rem; text-decoration: none; }
.sm-credit:hover { text-decoration: underline; }
.sm-inactive { max-width: 560px; margin: 0 auto; padding: 4rem 1rem 2rem; text-align: center; }

@media (min-width: 720px) {
  .sm-photo { width: 132px; height: 132px; }
  .sm-title { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .sm-item { transition: transform .2s ease, box-shadow .2s ease; }
  .sm-cats a { transition: background-color .2s ease, color .2s ease; }
}

/* Language switch (bilingual plans) */
.sm-head-inner { position: relative; }
.sm-lang { position: absolute; top: -1rem; inset-inline-end: 0; font-size: .85rem; font-weight: 600; text-decoration: none; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-height: 36px; display: inline-flex; align-items: center; }
html[dir="ltr"] body.sm { font-family: system-ui, -apple-system, "Segoe UI", var(--font); }

/* The café's own cover photo behind the header (any list template). */
.sm-head.has-cover { position: relative; padding-top: 11rem; color: #fff; isolation: isolate;
  background: linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, .82)), var(--cover) center / cover no-repeat; }
.sm-head.has-cover .sm-title, .sm-head.has-cover .sm-title-en, .sm-head.has-cover .sm-tagline { color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .5); }
.sm-head.has-cover .sm-logo { box-shadow: 0 0 0 4px rgba(255, 255, 255, .85), 0 14px 34px rgba(0, 0, 0, .45); }
.sm-head.has-cover .sm-head-inner::before, .sm-head.has-cover .sm-head-inner { border-color: rgba(255, 255, 255, .6); outline-color: rgba(255, 255, 255, .4); }
.sm-head.has-cover .sm-lang { top: -9rem; background: rgba(0, 0, 0, .4); color: #fff; border-color: rgba(255, 255, 255, .35); }
.sm-tag-left { background: #f5b649; color: #241400; }
.sm-price small { font-weight: 400; }

/* The cover keeps its focus point on every screen (set on the design page). */
.sm-head.has-cover { background-position: 0 0, var(--cover-pos, 50% 50%); }
@media (min-width: 900px) { .sm-head.has-cover { padding-top: 15rem; padding-bottom: 2rem; } }
body.sm .cin-cover { background-position: var(--cover-pos, 50% 50%); }
body.sm .atl-hero { object-position: var(--cover-pos, 50% 50%); }
body.sm .flv-cover { background-position: 0 0, var(--cover-pos, 50% 50%); }

/* The café's own logo: transparent, on the colour it chose, at its zoom. */
body.sm .sm-logo-box { display: grid; place-items: center; overflow: hidden; padding: 0; background: var(--logo-bg, transparent); }
body.sm .sm-logo-box img { width: 100%; height: 100%; object-fit: contain; transform: scale(var(--logo-zoom, 1)); border: 0; border-radius: 0; box-shadow: none; background: none; filter: none; }

/* A made logo («لوگو برایم بساز»): drawn by the browser in the menu's own font. */
body.sm .sm-mark { display: grid; place-items: center; overflow: hidden; font-weight: 900; line-height: 1; }
body.sm .sm-mark b { font-size: 2.3rem; }
body.sm .sm-mark-gold { border-radius: 50%; color: #1a1408; background: radial-gradient(circle at 30% 25%, #fbeec5, #d6b465 50%, #7c5e24); }
body.sm .sm-mark-ink { border-radius: 26%; color: #fff; background: #16161a; }
body.sm .sm-mark-ring { border-radius: 50%; color: var(--text-accent, var(--accent)); background: var(--surface); box-shadow: inset 0 0 0 3px currentColor, inset 0 0 0 7px var(--surface), inset 0 0 0 8px currentColor; }
body.sm .sm-mark-bean { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; color: #f7ead6; background: linear-gradient(150deg, #6b4128, #2c160c); transform: rotate(-12deg); }
body.sm .sm-mark-bean b { transform: rotate(12deg); }
body.sm .sm-mark-stamp { border-radius: 50%; color: var(--accent); background: transparent; border: 2px dashed currentColor; box-shadow: inset 0 0 0 5px var(--bg), inset 0 0 0 7px currentColor; }
body.sm .sm-mark-cup { border-radius: 18% 18% 46% 46%; color: var(--accent-ink); background: var(--accent); box-shadow: 10px 0 0 -4px var(--accent); }

/* ── Type layer (2026-11-29): one rhythm for every template ─────────────── */
body.sm { text-rendering: optimizeLegibility; }
.sm-title, .sm-section-title, .cin-info h2, .atl-id h1, .flv-cover h1, .cin-brand h1 { text-wrap: balance; }
.sm-desc, .cin-info > p, .flv-desc, .atl-sheet-body > p, .sm-tagline, .atl-tagline, .flv-tagline, .cin-tagline { text-wrap: pretty; }
.sm-desc { line-height: 1.85; }
.sm-item-name { letter-spacing: -.003em; }
.sm-section-title { line-height: 1.5; margin-bottom: .9rem; }
.sm-price b, .cin-buy > b, .atl-price, .flv-foot .sm-price, .sm-hours td { font-variant-numeric: tabular-nums; }
.sm-title-en, .atl-latin, .flv-latin, .cin-latin { line-height: 1.6; }
