/* ==========================================================================
   QR menü — müşterinin telefonundaki menü
   Önce mobil. Arapça için yön bağımsız (logical) özellikler: margin-inline, inset-inline…
   Koyu tema telefonun ayarını izler. Restoran rengi: --accent (sayfada tanımlı).
   ========================================================================== */
:root {
  --accent: #b4532a;
  --on-accent: #fff;
  --bg: #f6f2ea;
  --card: #fffdf9;
  --ink: #1f1a15;
  --muted: #6c6359;
  --line: #e6ddcf;
  --chip: #eee5d7;
  --shade: 0 18px 44px -26px rgb(45 28 12 / .45);
  --serif: "Playfair Display", "Noto Sans Arabic", Georgia, serif;
  --sans: "Manrope", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 3.6rem;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14110e; --card: #1d1915; --ink: #f3ece2; --muted: #a4998b; --line: #2d2721; --chip: #29231d; --shade: 0 18px 44px -26px rgb(0 0 0 / .8); color-scheme: dark; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 8px); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.45; -webkit-font-smoothing: antialiased; }
html.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: start; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.app { max-width: 760px; margin: 0 auto; min-height: 100svh; background: var(--bg); }
@media (min-width: 761px) { .app { box-shadow: 0 0 0 1px var(--line); } }
.boot { display: grid; place-items: center; height: 60svh; }
.boot span { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.noscript { padding: 2rem; text-align: center; }

/* ---------- Kapak ---------- */
.cover { position: relative; height: clamp(250px, 42svh, 400px); color: #fff; overflow: hidden; background: #2a2018; }
.cover__img { width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(0 0 0 / .35), transparent 30%, transparent 45%, rgb(0 0 0 / .78)); }
.cover__bar { position: absolute; z-index: 1; inset-block-start: 0; inset-inline: 0; display: flex; justify-content: flex-end; gap: .5rem; padding: max(.9rem, env(safe-area-inset-top)) 1rem 0; }
.cover__text { position: absolute; z-index: 1; inset-inline: 1.25rem; inset-block-end: 1.3rem; }
.cover__name { font-family: var(--serif); font-size: clamp(2.3rem, 10vw, 3.4rem); font-weight: 700; line-height: 1; letter-spacing: -.01em; text-wrap: balance; }
.cover__tagline { margin-top: .45rem; font-size: 1rem; opacity: .9; }
.glass { display: inline-flex; align-items: center; gap: .4rem; height: 2.4rem; padding: 0 .9rem; border-radius: 999px; background: rgb(15 10 6 / .55); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .03em; }

/* ---------- Bilgi şeridi ---------- */
.info { display: flex; gap: .5rem; overflow-x: auto; padding: 1rem 1rem .4rem; scrollbar-width: none; }
.info::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: .45rem; flex: none; height: 2.35rem; padding: 0 .9rem; border-radius: 999px; background: var(--chip); font-size: .88rem; font-weight: 600; white-space: nowrap; text-decoration: none; }
.chip .icon { color: var(--accent); }
button.chip:active, a.chip:active { transform: scale(.97); }

/* ---------- Kategori çubuğu (yapışkan) ---------- */
.cats { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .35rem; height: var(--nav-h); padding-inline: .6rem; background: var(--bg); border-block-end: 1px solid transparent; transition: border-color .3s; }
.cats.is-stuck { border-color: var(--line); }
.cats__scroll { display: flex; gap: .3rem; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding-block: .3rem; scroll-padding-inline: 1rem; }
.cats__scroll::-webkit-scrollbar { display: none; }
.cat { flex: none; padding: .5rem .9rem; border-radius: 999px; font-size: .9rem; font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--muted); transition: background-color .25s, color .25s; }
.cat.is-active { background: var(--ink); color: var(--bg); }
.icon-btn { position: relative; flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--chip); }
.icon-btn .icon { width: 1.25rem; height: 1.25rem; }
.badge { position: absolute; inset-block-start: -.15rem; inset-inline-end: -.15rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .68rem; font-weight: 800; display: grid; place-items: center; }
.search { display: flex; align-items: center; gap: .5rem; flex: 1; }
.search input { flex: 1; min-width: 0; height: 2.6rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 1rem; }
.search input:focus { outline: none; border-color: var(--accent); }

/* ---------- Öne çıkanlar ---------- */
.featured { padding: 1.3rem 0 .4rem; }
.featured h2, .section h2 { font-family: var(--serif); font-size: 1.55rem; font-weight: 700; line-height: 1.15; padding-inline: 1.25rem; }
.featured__row { display: flex; gap: .8rem; overflow-x: auto; padding: .9rem 1.25rem .6rem; scroll-snap-type: x mandatory; scroll-padding-inline: 1.25rem; scrollbar-width: none; }
.featured__row::-webkit-scrollbar { display: none; }
.fcard { flex: 0 0 min(72%, 300px); scroll-snap-align: start; border-radius: 18px; background: var(--card); box-shadow: var(--shade); overflow: hidden; }
/* height: auto şart — yoksa <img height> özniteliği aspect-ratio'yu ezer */
.fcard img { width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; background: var(--chip); }
.fcard__body { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding: .75rem .9rem .9rem; }
.fcard__name { font-weight: 700; line-height: 1.25; }
.fcard .price { white-space: nowrap; }

/* ---------- Kategoriler ve ürünler ---------- */
.section { padding-block: 1.6rem .2rem; }
.items { margin-top: .4rem; padding-inline: 1.25rem; }
.item { border-block-end: 1px solid var(--line); }
.item:last-child { border-block-end: 0; }
.item__btn { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; width: 100%; padding-block: 1rem; }
.item__btn:active { opacity: .7; }
.item__name { font-size: 1.04rem; font-weight: 700; line-height: 1.3; }
.item__desc { margin-top: .25rem; font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin-top: .55rem; }
.item__img { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; background: var(--chip); }
.item.is-out .item__btn { opacity: .5; }
.item.is-out .item__img { filter: grayscale(1); }
.price { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.price small { font-weight: 600; color: var(--muted); font-size: .78rem; margin-inline-start: .3rem; }
.tag { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 700; color: var(--muted); }
.tag .icon { width: .95rem; height: .95rem; }
.tag--spicy { color: #c2410c; }
.tag--vegan, .tag--vegetarian { color: #3f7d2e; }
.tag--chef { color: var(--accent); }
.tag--new { color: #7c3aed; }
.soldout { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
@media (prefers-color-scheme: dark) { .tag--spicy { color: #fb8a57; } .tag--vegan, .tag--vegetarian { color: #86c96f; } .tag--new { color: #b99bff; } }
mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 3px; }
.empty { padding: 3rem 1.5rem; text-align: center; color: var(--muted); }
.empty button { margin-top: 1rem; }

/* ---------- Alt bilgi ---------- */
.foot { padding: 2.2rem 1.25rem calc(2rem + env(safe-area-inset-bottom)); margin-top: 1.5rem; border-block-start: 1px solid var(--line); font-size: .85rem; color: var(--muted); display: grid; gap: .9rem; }
.foot .link { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; justify-self: start; }
.foot__demo { padding: .7rem .9rem; border-radius: 12px; background: var(--chip); color: var(--ink); }
.foot__by { font-size: .78rem; }
.foot__by a { font-weight: 700; text-decoration: none; }

/* ---------- Alttan açılan sayfa (dialog) ---------- */
.sheet { position: fixed; inset: auto 0 0; width: 100%; max-width: 760px; max-height: 92svh; margin: 0 auto; padding: 0; border: 0; border-radius: 24px 24px 0 0; background: var(--card); color: var(--ink); overflow: hidden; display: none; flex-direction: column; }
.sheet[open] { display: flex; animation: up .38s var(--ease); }
.sheet::backdrop { background: rgb(10 6 3 / .5); animation: fade .3s; }
.sheet.is-closing { animation: down .22s ease-in forwards; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet__grab { flex: none; display: grid; place-items: center; height: 1.6rem; touch-action: none; cursor: grab; }
.sheet__grab::before { content: ""; width: 2.6rem; height: .3rem; border-radius: 999px; background: var(--line); }
.sheet__close { position: absolute; z-index: 2; inset-block-start: .8rem; inset-inline-end: .8rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgb(15 10 6 / .55); color: #fff; }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 0 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); }
.sheet__title { font-family: var(--serif); font-size: 1.55rem; font-weight: 700; line-height: 1.15; margin-bottom: 1rem; padding-inline-end: 2.5rem; }
.sheet__actions { position: sticky; bottom: 0; display: flex; gap: .6rem; padding: .9rem 0 calc(.9rem + env(safe-area-inset-bottom)); margin-top: 1.2rem; background: var(--card); border-block-start: 1px solid var(--line); }

/* ürün detayı: fotoğraf kenardan kenara, metin içeride (negatif kenar boşluğu yatay kaydırma çıkarırdı) */
.sheet__body--flush { padding: 0 0 calc(1.5rem + env(safe-area-inset-bottom)); }
.detail { padding-inline: 1.25rem; }
.detail__img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--chip); }
.detail__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-top: 1.1rem; }
.detail__name { font-family: var(--serif); font-size: 1.75rem; font-weight: 700; line-height: 1.12; }
.detail__head .price { font-size: 1.2rem; margin-top: .3rem; white-space: nowrap; }
.detail__desc { margin-top: .7rem; color: var(--muted); font-size: 1rem; }
.detail__tags { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .9rem; }
.variants { margin-top: 1rem; border-radius: 14px; background: var(--chip); }
.variants li { display: flex; justify-content: space-between; padding: .7rem .95rem; font-weight: 600; }
.variants li + li { border-block-start: 1px solid var(--line); }
.facts { display: flex; gap: 1.6rem; margin-top: 1.1rem; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.facts dd { font-weight: 700; margin-top: .15rem; }
.allergens { margin-top: 1.3rem; }
.allergens h3, .filter h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; margin-bottom: .6rem; }
.allergens ul { display: flex; flex-wrap: wrap; gap: .4rem; }
.allergens li { padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--line); font-size: .86rem; font-weight: 600; }
.allergens p { font-size: .9rem; color: var(--muted); }

/* dil, wifi, filtre, kaynaklar */
.langs { display: grid; gap: .4rem; }
.langs button { display: flex; justify-content: space-between; align-items: center; padding: .95rem 1rem; border-radius: 14px; background: var(--chip); font-weight: 700; font-size: 1.05rem; }
.langs button[aria-current="true"] { background: var(--ink); color: var(--bg); }
.langs small { font-weight: 600; opacity: .6; font-size: .8rem; letter-spacing: .05em; }
.wifi { display: grid; gap: .8rem; }
.wifi div { padding: .9rem 1rem; border-radius: 14px; background: var(--chip); }
.wifi dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.wifi dd { font-size: 1.15rem; font-weight: 800; margin-top: .15rem; word-break: break-all; font-variant-numeric: tabular-nums; }
.filter + .filter { margin-top: 1.4rem; }
.toggles { display: flex; flex-wrap: wrap; gap: .45rem; }
.toggle { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .9rem; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; font-weight: 700; transition: background-color .2s, color .2s, border-color .2s; }
.toggle[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter--exclude .toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 3rem; padding: 0 1.3rem; border-radius: 999px; font-weight: 800; font-size: .95rem; }
.btn--primary { flex: 1; background: var(--accent); color: var(--on-accent); }
.btn--ghost { border: 1px solid var(--line); }
.credits li { padding: .75rem 0; border-block-end: 1px solid var(--line); font-size: .88rem; }
.credits b { display: block; }
.credits a { color: var(--muted); }

.toast { position: fixed; z-index: 100; inset-inline: 0; inset-block-end: calc(1.2rem + env(safe-area-inset-bottom)); width: max-content; max-width: 90%; margin: 0 auto; padding: .7rem 1.1rem; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .9rem; animation: up .3s var(--ease); }

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