/* ============================================================
   SADE CAFE — QR Menü (mobil öncelikli)
   Tek dosya, bağımsız. Hızlı yüklenmesi için sade tutuldu.
   ============================================================ */

:root {
  --bg:      #14110F;
  --bg-2:    #1C1815;
  --bg-3:    #241E1A;
  --fg:      #F4EFE6;
  --fg-dim:  rgba(244, 239, 230, .58);
  --fg-dim2: rgba(244, 239, 230, .38);
  --gold:    #C8A16B;
  --gold-2:  #E2CBA4;
  --line:    rgba(244, 239, 230, .11);
  --radius:  14px;
  --ease:    cubic-bezier(.22, .61, .36, 1);
  --safe-t:  env(safe-area-inset-top, 0px);
  --safe-b:  env(safe-area-inset-bottom, 0px);
}

/* Açık tema */
html[data-theme="light"] {
  --bg:      #FBF8F3;
  --bg-2:    #F4EFE6;
  --bg-3:    #EAE1D3;
  --fg:      #14110F;
  --fg-dim:  #8C8377;
  --fg-dim2: #A79E92;
  --gold:    #9C7A3E;
  --gold-2:  #7E6231;
  --line:    rgba(20, 17, 15, .12);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 148px;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  padding-bottom: calc(72px + var(--safe-b));
  transition: background .3s, color .3s;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.wrap { width: 100%; max-width: 640px; margin-inline: auto; padding-inline: 18px; }

/* ── Kapak ───────────────────────────────────────────────── */
.cover {
  position: relative;
  padding: calc(34px + var(--safe-t)) 18px 30px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(170deg, var(--bg-2), var(--bg));
}
.cover::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 12%, rgba(200,161,107,.18), transparent 62%);
}
.cover__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .28;
}
.cover__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(20,17,15,.5), var(--bg));
}
html[data-theme="light"] .cover__bg::after {
  background: linear-gradient(to bottom, rgba(251,248,243,.5), var(--bg));
}
.cover > * { position: relative; z-index: 2; }

.mark { margin: 0 auto 12px; color: var(--fg); }
.brand {
  font-size: 30px; font-weight: 300;
  letter-spacing: .3em; text-indent: .3em;
  margin: 0 0 6px;
}
.brand-sub {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 9px; letter-spacing: .42em; text-indent: .42em;
  color: var(--fg-dim); margin-bottom: 16px;
}
.brand-sub::before, .brand-sub::after {
  content: ''; width: 20px; height: 1px; background: currentColor; opacity: .55;
}
.slogan {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic; font-size: 17px;
  color: var(--gold-2); margin: 0 0 16px;
}

.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--fg-dim);
  border: 1px solid var(--line);
  border-radius: 40px; padding: 7px 15px;
}
.status i { width: 6px; height: 6px; border-radius: 50%; background: #5FA86B; }
.status.is-closed i { background: #B4564E; }

/* ── Üst araç çubuğu (yapışkan) ──────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: var(--safe-t);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .bar { background: var(--bg); }
}

.bar__row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  max-width: 640px; margin-inline: auto;
}

.search {
  flex: 1;
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 0 14px;
  height: 42px;
}
.search svg { flex-shrink: 0; color: var(--fg-dim2); width: 17px; height: 17px; }
.search input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  color: var(--fg); font: inherit; font-size: 14.5px;
  height: 100%;
}
.search input::placeholder { color: var(--fg-dim2); }
.search__clear { display: none; color: var(--fg-dim); font-size: 17px; padding: 4px; }
.search.has-value .search__clear { display: block; }

.icon-btn {
  width: 42px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--fg-dim);
  transition: color .25s, border-color .25s;
}
.icon-btn:hover, .icon-btn:focus-visible { color: var(--gold); border-color: var(--gold); }

/* Kategori sekmeleri */
.chips {
  display: flex; gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 18px 11px;
  max-width: 640px; margin-inline: auto;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 8px 15px;
  font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--fg-dim);
  border: 1px solid var(--line);
  border-radius: 40px;
  white-space: nowrap;
  transition: color .25s, border-color .25s, background .25s;
}
.chip.is-active {
  color: var(--bg); background: var(--gold); border-color: var(--gold);
}

/* ── Kategori blokları ───────────────────────────────────── */
.cat { padding-top: 34px; scroll-margin-top: 150px; }
.cat:last-of-type { padding-bottom: 8px; }

.cat__head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 4px;
}
.cat__head h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400; font-size: 27px; margin: 0;
  white-space: nowrap;
}
.cat__head::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.cat__desc { font-size: 13px; color: var(--fg-dim); margin: 6px 0 0; }

/* ── Ürün ────────────────────────────────────────────────── */
.items { margin-top: 16px; }

.item {
  display: flex; gap: 14px; width: 100%; text-align: left;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity .2s;
}
.item:active { opacity: .6; }

.item__thumb {
  width: 68px; height: 68px; flex-shrink: 0;
  border-radius: 10px; object-fit: cover;
  background: var(--bg-3);
}
.item__thumb--empty {
  display: grid; place-items: center;
  color: var(--gold); opacity: .4;
}

.item__body { flex: 1; min-width: 0; }
.item__top { display: flex; align-items: baseline; gap: 10px; }
.item__name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px; font-weight: 500; line-height: 1.25;
  margin: 0; flex: 1;
}
.item__price {
  font-size: 14px; white-space: nowrap; color: var(--gold-2); letter-spacing: .02em;
}
.item__desc {
  font-size: 12.8px; line-height: 1.6; color: var(--fg-dim);
  margin: 5px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.item__variants {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  margin-top: 7px; font-size: 12px; color: var(--fg-dim);
}
.item__variants b { font-weight: 400; color: var(--fg); }

.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag {
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--fg-dim);
}
.tag.b-chef, .tag.b-new { border-color: rgba(200,161,107,.45); color: var(--gold-2); }
.tag.b-vegan { border-color: rgba(122,168,110,.4); color: #8FB37F; }
html[data-theme="light"] .tag.b-vegan { color: #5A7D4F; }

/* ── Boş sonuç ───────────────────────────────────────────── */
.empty {
  text-align: center; padding: 60px 20px; color: var(--fg-dim);
  font-size: 14px;
}
.empty svg { margin: 0 auto 16px; color: var(--fg-dim2); }

/* ── Detay çekmecesi ─────────────────────────────────────── */
.sheet-bg {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10, 8, 7, .72);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.sheet-bg.is-open { opacity: 1; visibility: visible; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--bg-2);
  border-radius: 20px 20px 0 0;
  max-height: 88svh; overflow-y: auto;
  transform: translateY(100%);
  transition: transform .38s var(--ease);
  padding-bottom: calc(24px + var(--safe-b));
  max-width: 640px; margin-inline: auto;
}
.sheet.is-open { transform: none; }

.sheet__grip {
  width: 38px; height: 4px; border-radius: 4px;
  background: var(--line);
  margin: 10px auto 0;
}
.sheet__img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  margin-top: 14px;
}
.sheet__body { padding: 22px 20px 4px; }
.sheet__cat {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 8px;
}
.sheet__name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 27px; font-weight: 400; line-height: 1.2; margin: 0 0 10px;
}
.sheet__price {
  font-size: 19px; color: var(--gold-2); margin: 0 0 16px;
}
.sheet__desc { font-size: 14.5px; line-height: 1.75; color: var(--fg-dim); margin: 0 0 18px; }
.sheet__meta {
  display: grid; gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px; font-size: 13px;
}
.sheet__meta div { display: flex; justify-content: space-between; gap: 16px; }
.sheet__meta span:first-child { color: var(--fg-dim); }
.sheet__close {
  display: block; width: calc(100% - 40px); margin: 20px auto 0;
  padding: 14px;
  border: 1px solid var(--line); border-radius: 40px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--fg-dim);
}

/* ── Alt bilgi ───────────────────────────────────────────── */
.foot {
  margin-top: 44px;
  padding: 32px 18px calc(24px + var(--safe-b));
  border-top: 1px solid var(--line);
  text-align: center;
  background: var(--bg-2);
}
.foot__note { font-size: 12px; line-height: 1.75; color: var(--fg-dim); margin: 0 0 20px; }
.foot__actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-bottom: 22px; }
.foot__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--line); border-radius: 40px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg);
  transition: background .25s, border-color .25s, color .25s;
}
.foot__btn--gold { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.foot__small { font-size: 11px; color: var(--fg-dim2); margin: 0; }
.foot__small a { color: var(--gold); }

/* ── Yukarı çık ──────────────────────────────────────────── */
.top {
  position: fixed; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 40;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--fg);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, visibility .25s, transform .25s;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.top.is-on { opacity: 1; visibility: visible; transform: none; }

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

/* Geniş ekran: menü kartı ortalanır */
@media (min-width: 700px) {
  body { background: #0D0B0A; }
  html[data-theme="light"] body { background: #EFE9DE; }
  .shell {
    max-width: 640px; margin-inline: auto;
    background: var(--bg);
    min-height: 100svh;
    box-shadow: 0 0 80px rgba(0,0,0,.45);
  }
}
