/* Lezzet Börek — Dijital Menü */
:root {
  --bg: #FCFBF9;
  --surface: #FFFFFF;
  --ink: #161616;
  --ink-2: #4A4946;
  --muted: #8E8C86;
  --line: #EFEDE8;
  --line-2: #E5E2DB;
  --green: #1E6A3E;
  --green-tint: #EEF4F0;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --r-lg: 22px;
  --r-md: 16px;
  --shadow: 0 1px 2px rgba(22, 22, 22, .04), 0 8px 24px -18px rgba(22, 22, 22, .18);
  --top: 0px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.5; letter-spacing: -.005em;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); }
@media (min-width: 600px) { .app { box-shadow: 0 0 0 1px var(--line); } }

img.lazy { opacity: 0; transition: opacity .3s ease; }
img.lazy.ok { opacity: 1; }

/* ---------- Kapak ---------- */
.hero { position: relative; height: min(40vh, 300px); min-height: 240px; overflow: hidden; background: #1c1c1b; }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,14,13,.18) 0%, rgba(14,14,13,.28) 45%, rgba(14,14,13,.66) 100%);
}
.hero-content {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 0 24px 52px; text-align: center;
}
.hero-logo { width: 210px; height: auto; }
.hero-slogan {
  margin: 12px 0 0; font-size: 11.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(251, 250, 247, .86);
}
.hero-slogan:empty { display: none; }
.hero-branch {
  margin: 10px 0 0; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: #fff; background: rgba(30, 106, 62, .88);
}
.hero-branch:empty { display: none; }
/* Kapak görseli yoksa */
.hero.plain { background: var(--bg); height: auto; min-height: 0; }
.hero.plain .hero-content { padding: calc(48px + env(safe-area-inset-top)) 24px 40px; }
.hero.plain .hero-slogan { color: var(--muted); }

/* ---------- Ana gövde ---------- */
.sheet-body {
  position: relative; z-index: 2; margin-top: -24px; background: var(--bg);
  border-radius: 24px 24px 0 0; padding: 20px 18px calc(28px + env(safe-area-inset-bottom));
}
.hero.plain + .sheet-body { margin-top: 0; padding-top: 0; }

.search {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 8px 0 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; color: var(--muted);
  box-shadow: var(--shadow);
}
.search:focus-within { border-color: var(--line-2); color: var(--ink); }
.search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none;
  font: inherit; font-size: 16px; color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }


.notice {
  margin-top: 14px; padding: 13px 16px; border-radius: var(--r-md);
  background: var(--green-tint); color: #18502F; font-size: 13.5px; font-weight: 600; line-height: 1.45;
}

.block { margin-top: 30px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 14px; }
.block-head h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 27px; letter-spacing: 0; line-height: 1.1; }
.block-meta { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Öne çıkanlar (arama alanına daha yakın, daha kompakt) */
#featuredBlock { margin-top: 18px; }
#featuredBlock .block-head { margin-bottom: 11px; }
#featuredBlock .block-head h2 { font-size: 24px; }
.featured { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 2px; scroll-snap-type: x mandatory; scroll-padding: 0 18px; scrollbar-width: none; }
.featured::-webkit-scrollbar { display: none; }
.feat { flex: none; width: 132px; scroll-snap-align: start; text-align: left; }
.feat-img { aspect-ratio: 1 / 1.1; border-radius: 16px; overflow: hidden; background: #F1EFEA; }
.feat-img img { width: 100%; height: 100%; object-fit: cover; }
.feat-name { margin: 8px 2px 0; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.feat-price { margin: 1px 2px 0; font-size: 13px; color: var(--ink-2); font-weight: 500; }

/* Kategori kartları */
.cats { display: grid; gap: 12px; }
.cat {
  position: relative; display: flex; align-items: center; width: 100%; height: 118px; overflow: hidden; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.cat-text { position: relative; z-index: 1; padding: 0 20px; max-width: 64%; }
.cat-name { display: block; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.05; color: var(--ink); }
.cat-desc { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-img { position: absolute; top: 0; right: 0; bottom: 0; width: 60%; }
.cat-img img {
  width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 28%, #000 60%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 28%, #000 60%);
}
.cat-arrow { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.cat.no-img .cat-text { max-width: 80%; }

.sk { height: 118px; border-radius: var(--r-lg); background: #F2F0EB; }

/* Bilgi bölümü */
.info { margin-top: 36px; }
.branches { display: grid; gap: 12px; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 18px; box-shadow: var(--shadow); }
.branch-name { margin: 0; padding: 14px 0 12px; font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.15; color: var(--ink); }
.info-row { display: flex; align-items: flex-start; gap: 14px; padding: 15px 0; border-top: 1px solid var(--line); }
.info-row:first-child { border-top: 0; }
.info-row svg { flex: none; margin-top: 2px; color: var(--green); }
.info-row .t { flex: 1; min-width: 0; }
.info-row .l { display: block; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.info-row .v { display: block; margin-top: 2px; font-size: 14.5px; font-weight: 500; color: var(--ink); word-break: break-word; }
.info-row .go { flex: none; align-self: center; font-size: 12.5px; font-weight: 600; color: var(--green); }
.order { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.order a {
  display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px;
}
.review {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 16px 18px;
  border-radius: var(--r-lg); background: var(--ink); color: #FBFAF7;
}
.review b { display: block; font-family: var(--serif); font-size: 21px; font-weight: 600; }
.review span { font-size: 12.5px; color: #B9B7B1; }
.review i { flex: none; font-style: normal; font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 999px; background: #FBFAF7; color: var(--ink); }
.foot { text-align: center; margin-top: 34px; }
.foot img { width: 120px; margin: 0 auto; opacity: .9; }
.foot p { margin: 12px 0 0; font-size: 12px; color: var(--muted); }

/* Arama sonuçları */
#results { margin-top: 22px; }
#results { min-height: calc(100vh - 90px); min-height: calc(100dvh - 90px); }
.results-head { font-size: 13px; color: var(--muted); margin: 0 2px 4px; }
.results-cat { margin: 16px 2px 10px; font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.1; }

/* ---------- Ürün listesi ---------- */
.list-top {
  position: sticky; top: 0; z-index: 10; background: rgba(252, 251, 249, .94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: env(safe-area-inset-top) 14px 0; }
.round { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.bar-logo img { width: 92px; height: auto; }
.tabs { display: flex; gap: 22px; overflow-x: auto; padding: 0 18px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; position: relative; padding: 10px 0 13px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.tab::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: transparent; }
.tab.active { color: var(--ink); }
.tab.active::after { background: var(--green); }

.sections { padding: 4px 18px 8px; }
.sec { padding-top: 26px; scroll-margin-top: var(--top); }
.sec-head { margin: 0 2px 14px; }
.sec-head h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1; }
.sec-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

.item {
  display: flex; gap: 14px; width: 100%; padding: 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
}
.item-img { flex: none; width: 100px; height: 100px; border-radius: 14px; overflow: hidden; background: #F1EFEA; }
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 3px 2px 1px; }
.item.no-img .item-body { padding: 4px 6px; min-height: 76px; }
.item-name { margin: 0; font-size: 15.5px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.item-desc { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-opt { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.item-foot { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; }
.price { font-size: 15.5px; font-weight: 700; color: var(--ink); white-space: nowrap; letter-spacing: -.01em; }
.price small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pill { font-size: 11px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 999px; background: var(--green-tint); color: #18502F; white-space: nowrap; }
.pill.dark { background: var(--ink); color: #FBFAF7; }
.pill.out { background: #F4ECE9; color: #95392A; }
.item.soldout .item-img img { filter: grayscale(1); opacity: .7; }
.item.soldout .item-name, .item.soldout .price { color: var(--muted); }
.list-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 22px 18px calc(30px + env(safe-area-inset-bottom)); margin: 0; }
.list-foot:empty { display: none; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 14px; }
.empty b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.retry { margin-top: 14px; height: 44px; padding: 0 20px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; }

/* ---------- Ürün detayı ---------- */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(14, 14, 13, .42); opacity: 0; transition: opacity .22s ease; }
.backdrop.open { opacity: 1; }
.detail {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px;
  max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 26px 26px 0 0; overflow: hidden;
  transform: translateY(100%); transition: transform .28s cubic-bezier(.22,.8,.24,1);
}
.detail.open { transform: none; }
.detail-grip { position: absolute; z-index: 2; top: 8px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: rgba(255,255,255,.75); }
.detail-close {
  position: absolute; z-index: 2; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.94); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.detail-scroll { overflow-y: auto; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }
.detail-img { aspect-ratio: 5 / 4; background: #F1EFEA; }
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-img:empty { display: none; }
.detail-img:empty ~ .detail-body { padding-top: 58px; }
.detail-body { padding: 20px 22px 28px; }
.detail-body .pills:not(:empty) { margin-bottom: 10px; }
.detail-body h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 32px; line-height: 1.08; }
.detail-desc { margin: 10px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; }
.detail-desc:empty { display: none; }
.detail-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.detail-price span { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.detail-price strong { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.detail-options:empty, .detail-extra:empty { display: none; }
.opt { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px dashed var(--line-2); font-size: 14.5px; }
.opt:first-child { border-top: 0; }
.opt b { font-weight: 700; }
.detail-extra { margin-top: 18px; padding: 16px; border-radius: var(--r-md); background: #F7F6F2; }
.extra-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.extra-row .l { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.extra-row .v { font-size: 14px; font-weight: 600; }

@media (min-width: 600px) {
  .detail { bottom: auto; top: 50%; border-radius: 26px; opacity: 0; transform: translateY(-48%); transition: opacity .2s, transform .2s; }
  .detail.open { opacity: 1; transform: translateY(-50%); }
  .detail-grip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
