*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg, #FBF7F2); color: var(--text, #2A211C);
  font: 15px/1.5 var(--body, system-ui, sans-serif); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
[dir="rtl"] body, :lang(ar), :lang(fa), :lang(he) { font-family: 'Noto Sans Arabic', 'Noto Sans Hebrew', var(--body); }
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.app { max-width: 720px; margin: 0 auto; padding-bottom: env(safe-area-inset-bottom); }

/* ---------- Hero ---------- */
.hero { position: relative; text-align: center; padding: 0 20px 22px; }
.cover { height: 210px; margin: 0 -20px; overflow: hidden; position: relative; background: var(--chip); }
.has-cover .cover { height: 260px; }
.cover img { width: 100%; height: 100%; object-fit: cover; animation: coverIn 1.2s cubic-bezier(.2, .7, .2, 1) both; }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .18) 0%, transparent 35%, transparent 55%, var(--bg) 100%); }
.cover-pattern {
  background:
    radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--accent) 35%, transparent) 0 22%, transparent 23%),
    radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--accent) 22%, transparent) 0 16%, transparent 17%),
    radial-gradient(circle at 70% 85%, color-mix(in srgb, var(--accent) 18%, transparent) 0 25%, transparent 26%),
    linear-gradient(160deg, var(--chip), var(--bg));
}
@keyframes coverIn { from { transform: scale(1.08); opacity: .4; } to { transform: none; opacity: 1; } }
.topbar { position: absolute; top: calc(14px + env(safe-area-inset-top)); inset-inline-end: 14px; z-index: 3; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; letter-spacing: .04em;
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12); color: var(--text);
}
.lang-btn svg { width: 17px; height: 17px; }
.hero-inner { position: relative; z-index: 2; margin-top: -58px; animation: rise .8s .1s cubic-bezier(.2, .7, .2, 1) both; }
.logo {
  width: 104px; height: 104px; border-radius: 30px; margin: 0 auto 14px; object-fit: cover; background: var(--surface);
  border: 4px solid var(--bg); box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
}
.logo-mono { display: grid; place-items: center; font: 700 46px/1 var(--head); color: var(--on-accent); background: var(--accent); }
.hero-name { font: 700 clamp(30px, 8vw, 42px)/1.08 var(--head); margin: 0; letter-spacing: -.015em; text-wrap: balance; }
.hero-tag { margin: 8px auto 0; max-width: 460px; color: var(--muted); font-size: 15.5px; text-wrap: balance; }
.quicks { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.quick {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0, 0, 0, .04); transition: transform .15s;
}
.quick svg { width: 17px; height: 17px; color: var(--accent); }
.quick:active { transform: scale(.96); }
.skeleton { padding-top: 120px; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Category bar ---------- */
.catbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 6px; padding: 10px 0 10px 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
[dir="rtl"] .catbar { padding: 10px 12px 10px 0; }
.search-toggle { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); flex: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 6px 12px 8px 6px; margin: -6px 0 -8px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap;
  color: var(--muted); background: transparent; border: 1px solid transparent; transition: all .25s; scroll-snap-align: center;
}
.chip i { font-style: normal; }
.chip.on { color: var(--on-accent); background: var(--accent); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.searchbar { position: sticky; top: 61px; z-index: 9; padding: 8px 16px 12px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.search-field { display: flex; align-items: center; gap: 10px; padding: 0 8px 0 14px; height: 46px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.search-field svg { color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--text); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }

/* ---------- Sections ---------- */
.sections { padding: 6px 16px 10px; }
.cat { padding-top: 26px; scroll-margin-top: 80px; }
.cat-head { margin: 0 4px 14px; }
.cat-head h2 { font: 700 26px/1.15 var(--head); margin: 0; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.cat-head h2::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); margin-inline-start: 6px; }
[dir="rtl"] .cat-head h2::after { background: linear-gradient(270deg, var(--line), transparent); }
.cat-emoji { font-size: 24px; }
.cat-head p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }

.item { display: block; width: 100%; position: relative; }
.item:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.name { display: block; font-weight: 700; font-size: 16.5px; line-height: 1.3; color: var(--text); }
.desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 4px; }
.price { font-weight: 800; color: var(--accent); font-size: 15.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tags { display: inline-flex; flex-wrap: wrap; gap: 5px; vertical-align: middle; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--chip); color: var(--text); }
.tag i { font-style: normal; font-size: 12px; }
.tag.hi { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }
.tag.ico { padding: 3px 6px; font-size: 12px; }
.sold-badge { display: inline-block; margin-top: 8px; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--text); color: var(--bg); }
.sold-badge.float { position: absolute; top: 10px; inset-inline-start: 10px; margin: 0; z-index: 2; }
.item.sold .item-img img { filter: grayscale(1); opacity: .6; }
.item.sold .name, .item.sold .price { opacity: .55; }

/* cards */
.items-cards { display: grid; gap: 12px; }
.card {
  display: flex; gap: 14px; align-items: stretch; padding: 14px; border-radius: 20px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 8px 24px -14px rgba(0, 0, 0, .14); transition: transform .2s, box-shadow .2s;
}
.card:active { transform: scale(.985); }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.card .item-img { width: 112px; height: 112px; border-radius: 16px; overflow: hidden; flex: none; background: var(--chip); }
.card .item-img img, .tile .item-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card.noimg { padding: 16px 18px; }

/* grid */
.items-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .items-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px -16px rgba(0, 0, 0, .2); display: flex; flex-direction: column; }
.tile .item-img { aspect-ratio: 1 / 1; overflow: hidden; background: var(--chip); }
.tile .item-img.ph { display: grid; place-items: center; font: 700 40px var(--head); color: var(--accent); aspect-ratio: 16 / 9; }
.tile-body { padding: 11px 12px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile-body .price { margin-top: auto; }
.tile .name { font-size: 15px; }

/* list */
.items-list { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 6px 18px; }
.row { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.row:last-child { border-bottom: 0; }
.row-top { display: flex; align-items: baseline; gap: 8px; }
.row-top .name { flex: none; max-width: 70%; }
.dots { flex: 1; border-bottom: 2px dotted var(--faint); opacity: .5; transform: translateY(-4px); min-width: 16px; }
.row .desc { -webkit-line-clamp: 3; }
.row-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.row-meta:empty { display: none; }
.row .sold-badge { margin-top: 0; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.foot { padding: 26px 16px 40px; }
.note { text-align: center; color: var(--muted); font-size: 14px; margin: 0 auto 18px; max-width: 520px; white-space: pre-line; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.info-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; font-weight: 600; width: 100%; }
.info-card svg { color: var(--accent); margin-top: 2px; }
.info-card small { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.branding { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 30px auto 0; padding: 14px 18px; border-radius: 18px; max-width: 360px; background: var(--chip); font-size: 13.5px; font-weight: 700; }
.branding small { display: block; font-weight: 600; color: var(--accent); }
.qrr-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #15131A; color: #FFC24B; font: 800 18px/1 system-ui; flex: none; }

/* ---------- Sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 8, 6, .5); opacity: 0; transition: opacity .25s; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-panel {
  position: relative; width: 100%; max-width: 620px; max-height: 90vh; overflow: auto; overscroll-behavior: contain; background: var(--bg); color: var(--text);
  border-radius: 28px 28px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .25);
}
@media (min-width: 640px) { .sheet { align-items: center; } .sheet-panel { border-radius: 28px; padding-bottom: 24px; } }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: none; }
.sheet-close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.detail-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--chip); }
.detail-img img { width: 100%; height: 100%; object-fit: cover; animation: coverIn .8s cubic-bezier(.2, .7, .2, 1) both; }
.detail { padding: 22px 22px 8px; }
.sheet:not(.with-img) .detail { padding-top: 28px; }
.detail.center { text-align: center; }
.detail h3 { font: 700 26px/1.15 var(--head); margin: 0; letter-spacing: -.01em; padding-inline-end: 40px; }
.detail.center h3 { padding: 0; }
.with-img .detail h3 { padding-inline-end: 0; }
.detail-cat { margin: 0 0 6px; color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.detail-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.price.big { font-size: 22px; }
.detail-desc { color: var(--text); opacity: .85; font-size: 16px; margin: 12px 0 0; }
.detail-block { margin-top: 18px; }
.detail-block h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ingredients { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ingredients li { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.detail .tag { font-size: 13px; padding: 6px 11px; }
.kcal { color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.lang-list { display: grid; gap: 8px; margin-top: 18px; }
.lang-opt { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.lang-opt small { color: var(--muted); font-weight: 700; }
.lang-opt.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; color: var(--accent); }
.sheet-icon { width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--chip); color: var(--accent); }
.sheet-icon svg { width: 30px; height: 30px; }
.kv { margin-top: 16px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.kv small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.kv b { font-size: 19px; word-break: break-all; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .02em; }
.copy-btn { margin-top: 14px; width: 100%; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; background: var(--accent); color: var(--on-accent); }
.copy-btn svg { display: none; }
.copy-btn.done svg { display: block; }
.hours { font-size: 16px; line-height: 1.7; margin: 14px 0 0; }

/* ---------- Messages ---------- */
.msg { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; max-width: 440px; margin: 0 auto; }
.msg-icon { font-size: 54px; margin-bottom: 10px; animation: rise .7s both; }
.msg-name { font-weight: 800; color: var(--accent); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; }
.msg h1 { font: 700 28px/1.15 var(--head); margin: 0 0 10px; }
.msg p { color: var(--muted); margin: 0; }
.msg-link { margin-top: 28px; font-size: 13px; font-weight: 700; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
