/* Zeytin Ağacı — QR menü
   Zincir kafe düzeni: beyaz zemin, sıcak ve ferah renkler (açık şeftali bant,
   kayısı turuncusu butonlar, zeytin yeşili yalnızca küçük detaylarda), yuvarlak ürün fotoğrafları, alt çizgili sekmeler,
   tek bir sade sans yazı ailesi. */
:root {
  --bg: #FFFFFF;
  --soft: #FBF6F0;        /* bölüm zeminleri, giriş alanları */
  --hero: #FFE9D2;        /* açık şeftali başlık bandı */
  --on-hero: #2A2622;
  --house: #E8702A;       /* kayısı turuncusu: ana butonlar, seçili sekme */
  --on-house: #FFFFFF;
  --accent: #B4551F;      /* bağlantılar ve vurgulu metin */
  --tint: #FFEBD6;        /* ürün görsel zemini, öne çıkan kartlar */
  --leaf: #5E7F36;        /* zeytin yeşili: yalnızca küçük detaylar */
  --leaf-bg: #EAF1E0;
  --text: #2A2622;
  --muted: #6E665E;
  --line: #EFE7DE;
  --alert: #B3261E;
  --alert-bg: #FDEAE7;
  --shadow: 0 -6px 24px rgba(42, 38, 34, .10);
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
abbr { text-decoration: none; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 124px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; font-variant-numeric: tabular-nums; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--house); color: var(--on-house); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- marka bandı ---------- */
.hero { position: relative; background: var(--hero); color: var(--on-hero); padding: 34px 16px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.brand { margin: 0; line-height: 0; }
.logo { display: block; width: min(210px, 58vw); aspect-ratio: 1200 / 567; background: var(--on-hero);
  -webkit-mask: url("/assets/logo.png") center / contain no-repeat; mask: url("/assets/logo.png") center / contain no-repeat; }
.tagline { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.hero-actions { position: absolute; top: 14px; right: 14px; }
.chip-btn { border: 1px solid var(--line); background: var(--bg); color: var(--on-hero); border-radius: 999px; padding: 4px 14px; font-weight: 600; min-height: 38px; }
.table-badge { margin: 14px 0 0; background: var(--house); color: var(--on-house); padding: 4px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.info-line { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); max-width: 340px; text-wrap: balance; }

/* ---------- öne çıkanlar ---------- */
.featured { max-width: 760px; margin: 0 auto; padding: 22px 0 6px; }
.featured h2 { margin: 0 16px 12px; font-size: 20px; font-weight: 800; }
.featured-list { list-style: none; margin: 0; padding: 0 16px 4px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
.featured-list::-webkit-scrollbar { display: none; }
.featured-list li { flex: 0 0 min(44vw, 170px); scroll-snap-align: start; }
.fcard { display: flex; flex-direction: column; align-items: center; width: 100%; height: 100%; padding: 16px 10px 14px; border: 0; border-radius: 16px; background: var(--tint); text-align: center; }
.fimg { display: block; width: 110px; height: 110px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.fcard .fname { display: block; margin-top: 10px; font-size: 15px; font-weight: 700; line-height: 1.25; }
.fcard .fprice { display: block; margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--muted); }

/* logo amblemli fotoğraf yer tutucusu */
.ph { position: relative; background: var(--tint); }
.ph::after { content: ""; position: absolute; top: 28%; right: 28%; bottom: 28%; left: 28%; inset: 28%; background: var(--leaf); opacity: .7;
  -webkit-mask: url("/assets/logo-mark.png") center / contain no-repeat; mask: url("/assets/logo-mark.png") center / contain no-repeat; }
.fcard .fimg.ph { background: var(--bg); }

/* ---------- arama ve kategori sekmeleri ---------- */
.catbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); margin-top: 14px; }
.catbar-tools { max-width: 760px; margin: 0 auto; padding: 10px 16px 2px; display: flex; gap: 8px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 999px; padding: 0 14px; min-height: 44px; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { border: 0; background: transparent; outline: none; width: 100%; padding: 10px 0; }
.search input::placeholder { color: var(--muted); }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.filter-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 0 14px; min-height: 44px; font-weight: 600; white-space: nowrap; }
.filter-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.filter-btn[aria-pressed="true"] { background: var(--house); color: var(--on-house); border-color: var(--house); }
.count { background: var(--on-house); color: var(--house); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 800; }
.cats { list-style: none; margin: 0 auto; padding: 0 8px; max-width: 760px; display: flex; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats a { display: block; padding: 12px 10px 11px; text-decoration: none; color: var(--muted); white-space: nowrap; font-weight: 600; font-size: 15px; border-bottom: 3px solid transparent; }
.cats a[aria-current="true"] { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- ürün listesi ---------- */
main { max-width: 760px; margin: 0 auto; padding: 0 16px; outline: none; }
.loading, .empty { padding: 48px 0; text-align: center; color: var(--muted); }
.cat { padding-top: 26px; }
.cat h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; line-height: 1.2; display: flex; align-items: baseline; gap: 8px; }
.cat h2 small { font-size: 13px; font-weight: 500; color: var(--muted); }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: 76px 1fr; column-gap: 14px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 14px 0; }
.item > * { grid-column: 2; min-width: 0; }
.item .thumb { grid-column: 1; grid-row: 1 / span 3; align-self: center; display: block; width: 76px; height: 76px; border-radius: 50%; object-fit: cover; background: var(--tint); }
.item:hover .name { color: var(--accent); }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.name { font-size: 16.5px; font-weight: 700; line-height: 1.3; }
.leader { display: none; }
.price { flex: none; font-size: 16px; font-weight: 700; white-space: nowrap; }
.price .from { font-size: 12.5px; font-weight: 500; color: var(--muted); margin: 0 2px; }
.desc { margin: 2px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; align-items: center; }
.meta:empty { display: none; }
.kcal { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kcal + .al { margin-left: 4px; }
.al { color: var(--alert); background: var(--alert-bg); border-radius: 4px; padding: 0 5px; font-size: 11.5px; font-weight: 700; line-height: 18px; }
.tag { font-size: 12px; font-weight: 700; color: var(--leaf); background: var(--leaf-bg); border-radius: 4px; padding: 0 6px; line-height: 18px; }
.warn-tag { font-size: 12px; font-weight: 700; color: var(--alert); background: var(--alert-bg); border-radius: 4px; padding: 0 6px; line-height: 18px; }
.soldout { opacity: .5; }
.soldout .price::after { content: attr(data-soldout); margin-left: 6px; font-size: 12.5px; color: var(--alert); }
.hidden-note { margin: 20px 0 0; padding: 12px 14px; background: var(--alert-bg); border-radius: 12px; font-size: 14.5px; }

/* ---------- alt bilgi ---------- */
.foot { max-width: 760px; margin: 40px auto 0; padding: 22px 16px 32px; background: var(--soft); border-radius: 18px 18px 0 0; font-size: 14px; color: var(--muted); }
.foot h2 { color: var(--text); font-size: 16px; font-weight: 800; margin: 20px 0 6px; }
.foot h2:first-of-type { margin-top: 4px; }
.foot p { margin: 5px 0; max-width: 68ch; }
.foot strong { color: var(--text); font-weight: 700; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 14px; margin: 8px 0 0; padding: 0; list-style: none; }
.legend li { display: flex; gap: 8px; align-items: center; }
.foot a { color: var(--accent); font-weight: 700; }
.foot .mark { display: block; width: 30px; aspect-ratio: 512 / 680; margin: 28px auto 0; background: var(--leaf); opacity: .8;
  -webkit-mask: url("/assets/logo-mark.png") center / contain no-repeat; mask: url("/assets/logo-mark.png") center / contain no-repeat; }
.demo-flag { background: var(--tint); color: var(--text); border-radius: 10px; padding: 10px 12px; font-weight: 600; }

/* ---------- alt eylem çubuğu ---------- */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left, 0px)); display: flex; gap: 8px; justify-content: center; background: var(--bg); border-top: 1px solid var(--line); }
.actionbar > * { max-width: 360px; }
.ghost { border: 1.5px solid var(--house); background: var(--bg); color: var(--house); border-radius: 999px; padding: 0 18px; min-height: 48px; font-weight: 700; }
.primary { border: 0; background: var(--house); color: var(--on-house); border-radius: 999px; padding: 0 22px; min-height: 48px; font-weight: 700; }
.primary:disabled { opacity: .5; cursor: not-allowed; }
.cart-btn { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; background: var(--house); color: var(--on-house); border-radius: 999px; padding: 0 22px; min-height: 50px; font-weight: 700; }

/* ---------- ürün detayı ve pencereler ---------- */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 640px; max-height: 92vh; max-height: 92dvh; background: var(--bg); color: var(--text); border-radius: 22px 22px 0 0; box-shadow: var(--shadow); }
.sheet::backdrop { background: rgba(0, 0, 0, .5); }
@media (min-width: 700px) { .sheet { margin: auto; border-radius: 22px; } }
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: up .28s cubic-bezier(.2,.9,.3,1); }
  @keyframes up { from { transform: translateY(40px); opacity: 0; } }
}
.sheet-inner { padding: 18px 18px calc(20px + env(safe-area-inset-bottom)); }
.sheet-visual { margin: -18px -18px 16px; padding: 26px 0 22px; background: var(--hero); display: flex; justify-content: center; border-radius: 22px 22px 0 0; }
.sheet-img { display: block; width: 190px; height: 190px; max-width: 60vw; max-height: 60vw; border-radius: 50%; object-fit: cover; background: var(--tint); box-shadow: 0 10px 30px rgba(42, 38, 34, .14); }
.sheet-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.sheet-head h2 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.2; }
.close { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--soft); font-size: 22px; line-height: 1; }
.units { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.unit { border: 1.5px solid var(--line); background: var(--bg); border-radius: 999px; padding: 8px 16px; min-height: 44px; font-weight: 600; display: flex; gap: 10px; align-items: baseline; }
.unit[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); }
.unit:disabled { opacity: .5; }
.big-price { font-size: 20px; font-weight: 800; margin: 8px 0 0; }
.block { margin: 18px 0 0; }
.block h3 { margin: 0 0 6px; font-size: 15px; font-weight: 800; }
.block p { margin: 0; color: var(--muted); }
.allergen-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.allergen-list li { background: var(--alert-bg); color: var(--alert); border-radius: 6px; padding: 3px 10px; font-weight: 600; font-size: 14px; }
.allergen-list.trace li { background: transparent; border: 1px dashed var(--alert); }
.none { color: var(--leaf); font-weight: 600; }
.nutri { width: 100%; border-collapse: collapse; font-size: 15px; }
.nutri th, .nutri td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.nutri td { text-align: right; font-weight: 600; }
.nutri tr.energy th, .nutri tr.energy td { font-weight: 800; font-size: 16px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.legal { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--soft); border-left: 4px solid var(--alert); font-weight: 600; }
.incomplete { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--alert-bg); }
.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet-actions > * { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; flex: none !important; }
.qty button { width: 44px; height: 46px; border: 0; background: transparent; font-size: 22px; color: var(--accent); }
.qty output { min-width: 26px; text-align: center; font-weight: 700; }
.note-input { width: 100%; margin-top: 14px; border: 1px solid var(--line); background: var(--soft); border-radius: 12px; padding: 10px 12px; min-height: 44px; }

.allergen-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.allergen-options label, .check { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--line); background: var(--bg); border-radius: 12px; padding: 10px 12px; min-height: 48px; font-size: 14.5px; font-weight: 500; }
.allergen-options input, .check input { width: 20px; height: 20px; accent-color: var(--alert); flex: none; }
.allergen-options label:has(input:checked) { border-color: var(--alert); background: var(--alert-bg); }
@media (max-width: 380px) { .allergen-options { grid-template-columns: 1fr; } }

.cart-lines { list-style: none; margin: 14px 0 0; padding: 0; }
.cart-lines li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-lines .ln-name { font-weight: 700; }
.cart-lines .ln-sub { color: var(--muted); font-size: 14px; }
.cart-lines .ln-price { font-weight: 700; text-align: right; }
.cart-lines .ln-ctrl { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }
.cart-lines .qty button { width: 40px; height: 40px; }
.link-btn { border: 0; background: none; color: var(--alert); font-weight: 600; padding: 8px; min-height: 40px; }
.cart-total { display: flex; justify-content: space-between; font-size: 19px; font-weight: 800; margin-top: 14px; }
.success { text-align: center; padding: 12px 0; }
.success .big { font-size: 24px; font-weight: 800; margin: 8px 0; }

.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; }

@media print { .catbar, .actionbar, .hero-actions, .featured { display: none !important; } }
.sheet-img.ph { background: var(--bg); }

/* ---------- fotoğraflı başlık ---------- */
.hero { overflow: hidden; isolation: isolate; }
.hero-img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 60%; z-index: -2; }
.hero.has-photo { min-height: 300px; justify-content: flex-end; padding: 56px 16px 26px; color: #fff; background: #2A2622; }
.hero.has-photo::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(30, 22, 15, .35) 0%, rgba(30, 22, 15, .45) 40%, rgba(30, 22, 15, .82) 100%); }
.hero.has-photo .logo { background: #fff; width: min(230px, 62vw); filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .35)); }
.hero.has-photo .tagline, .hero.has-photo .info-line { color: rgba(255, 255, 255, .92); text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }
.hero.has-photo .chip-btn { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .55); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero.has-photo .table-badge { box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }

/* telefonda akıcı kaydırma */
.cats, .featured-list { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

/* Kategori galerisi (nargile takımları) */
.gallery { margin: 4px 0 14px; }
.gallery-title { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ink, #2A2622); }
.gallery-title span { font-weight: 500; color: var(--muted); }
.gallery-list { list-style: none; margin: 0 -16px; padding: 0 16px 4px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.gallery-list::-webkit-scrollbar { display: none; }
.gallery-list li { flex: 0 0 132px; scroll-snap-align: start; }
.gcard { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.gcard img { display: block; width: 132px; height: 176px; object-fit: cover; border-radius: 14px; background: var(--tint); }
.gcard span { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; line-height: 1.25; }
.sheet-photo { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 16px; background: var(--soft); margin: 4px 0 12px; }

/* <dialog> desteklemeyen eski tarayıcılar (compat.js) */
dialog:not([open]) { display: none; }
dialog.dialog-polyfill[open] { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; overflow: auto; }
.load-fail { text-align: center; }
.load-fail button { margin-top: 12px; }
.foot .legal-links { margin-top: 18px; font-size: 13.5px; } .foot .legal-links a { font-weight: 600; }

/* ---------- online sipariş ---------- */
.online-links { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; }
.online-cta { display: inline-flex; flex-direction: column; align-items: center; background: var(--house); color: var(--on-house); text-decoration: none; font-weight: 800; padding: 10px 22px; border-radius: 16px; box-shadow: 0 6px 18px rgba(232, 112, 42, .35); }
.online-cta small { font-weight: 600; font-size: 12px; opacity: .9; }
.online-track { font-size: 13.5px; font-weight: 700; color: var(--accent); }
.hero.has-photo .online-track { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.online-notice { margin: 10px auto 0; font-size: 13px; background: var(--leaf-bg); color: var(--leaf); padding: 6px 12px; border-radius: 10px; max-width: 340px; }
.co { display: flex; flex-direction: column; gap: 10px; }
.co-h { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.co-type { margin: 0; font-weight: 800; }
.seg { display: flex; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; min-height: 42px; border-radius: 10px; font-weight: 700; color: var(--text); font: inherit; font-weight: 700; }
.seg button[aria-pressed="true"] { background: var(--house); color: var(--on-house); }
.seg button:disabled { opacity: .45; }
.co-row { display: flex; gap: 8px; }
.co-row select, .fld select { flex: 1; min-height: 44px; border: 1px solid var(--line); background: var(--soft); border-radius: 12px; padding: 0 10px; font: inherit; color: var(--text); }
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.fld input, .fld textarea { width: 100%; border: 1px solid var(--line); background: var(--soft); border-radius: 12px; padding: 10px 12px; min-height: 44px; font: inherit; color: var(--text); box-sizing: border-box; }
.co-sum { background: var(--soft); border-radius: 14px; padding: 10px 14px; margin-top: 4px; }
.co-sum > div { display: flex; justify-content: space-between; padding: 3px 0; }
.co-sum .tot { font-weight: 800; font-size: 18px; border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 7px; }
.co-warn { margin: 0; color: var(--alert); background: var(--alert-bg); border-radius: 10px; padding: 8px 12px; font-size: 14px; font-weight: 600; }
.co-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.co-consent input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 20px; accent-color: var(--house); }
.sheet-head .link-btn { color: var(--accent); padding-left: 0; white-space: nowrap; }
