:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #6b6560;
  --line: #e8e2d9;
  --accent: #c2410c;
  --accent-soft: #fff1e8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .06), 0 8px 24px rgba(28, 25, 23, .06);
  --nav-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --gutter: max(16px, var(--safe-left));
  --content-w: 720px;
  --nav-bg: rgba(250, 247, 242, .88);
  --skeleton: #ede7de;
  --ok-bg: #dcfce7;  --ok-fg: #166534;   /* vegan / vejetaryen */
  --gf-bg: #fef3c7;  --gf-fg: #92400e;   /* glutensiz */
  --lf-bg: #dbeafe;  --lf-fg: #1e40af;   /* laktozsuz */
  --hot-bg: #fee2e2; --hot-fg: #b91c1c;  /* acı */
  /* Seçili sekme / filtre / dil düğmesi */
  --chip-active-bg: var(--text);   --chip-active-fg: #fff;
  --filter-active-bg: var(--accent); --filter-active-fg: #fff;
}
/* Karanlık mod: sistem tercihini izler; admin/qr sayfaları data-theme="light" ile dışarıda kalır */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    /* Siyaha yakın değil, sıcak taş tonlarında "loş" palet */
    --bg: #2a2523;
    --surface: #37312d;
    --text: #f5efe8;
    --muted: #b8b0a8;
    --line: #4a4340;
    --accent: #fb923c;
    --accent-soft: rgba(251, 146, 60, .18);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .22);
    --nav-bg: rgba(42, 37, 35, .86);
    --skeleton: #443d39;
    --ok-bg: rgba(74, 222, 128, .18);  --ok-fg: #86efac;
    --gf-bg: rgba(251, 191, 36, .18);  --gf-fg: #fcd34d;
    --lf-bg: rgba(96, 165, 250, .18);  --lf-fg: #93c5fd;
    --hot-bg: rgba(248, 113, 113, .18); --hot-fg: #fca5a5;
    /* Koyu temada seçili öğe: turuncu dolgu, koyu yazı (beyaz üstüne beyaz olmasın) */
    --chip-active-bg: var(--accent);   --chip-active-fg: #1c1917;
    --filter-active-bg: var(--accent); --filter-active-fg: #1c1917;
  }
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  overscroll-behavior-y: none;
}
img { display: block; max-width: 100%; }
button { font: inherit; touch-action: manipulation; }
[hidden] { display: none !important; }
/* Klavye/ekran okuyucu odağı; dokunmada görünmez */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: var(--safe-top);
}
/* Kapak fotoğrafı varsa: koyu degradeli görsel, açık renkli yazı */
.site-header--cover {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  border-bottom: 0;
  background:
    linear-gradient(to top, rgba(12, 10, 9, .86) 0%, rgba(12, 10, 9, .35) 55%, rgba(12, 10, 9, .05) 100%),
    var(--cover) center / cover no-repeat;
  background-color: #1c1917;
}
.site-header--cover .site-header__inner { align-items: flex-end; padding-bottom: 16px; }
.site-header--cover .site-header__title { font-size: 1.5rem; white-space: normal; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.site-header--cover .site-header__tagline { color: rgba(255, 255, 255, .82); }
.site-header--cover .site-header__logo {
  width: 56px; height: 56px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
  border: 2px solid rgba(255, 255, 255, .85);
}
.site-header--cover .site-header__table { background: rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(6px); }

/* Dil seçici: TR · EN · RU */
.lang {
  flex: none;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--line);
}
.lang:empty { display: none; }
.lang__btn {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.lang__btn[aria-pressed="true"] { background: var(--chip-active-bg); color: var(--chip-active-fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
/* Kapak başlığında sağ üst köşede, camsı */
.site-header--cover .lang {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  right: max(12px, var(--safe-right));
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.site-header--cover .lang__btn { color: rgba(255, 255, 255, .8); }
.site-header--cover .lang__btn[aria-pressed="true"] { background: #fff; color: var(--accent); }
.site-header__inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 12px var(--gutter) 12px max(16px, var(--safe-right));
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}
.site-header__logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
}
.site-header__text { min-width: 0; flex: 1; }
.site-header__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
  /* En fazla iki satır; sonrası üç nokta */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.site-header__tagline {
  margin: 2px 0 0;
  font-size: .82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-header__tagline:empty { display: none; }
.site-header__table {
  flex: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Kategori sekmeleri */
.category-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.category-nav__scroller {
  max-width: 720px;
  margin: 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 max(16px, var(--safe-right)) 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.category-nav__scroller::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.chip:active { transform: scale(.96); }
.chip[aria-current="true"] {
  background: var(--chip-active-bg);
  border-color: var(--chip-active-bg);
  color: var(--chip-active-fg);
}

/* Sarmalayıcılar: telefonda kutu üretmez, geniş ekranda ızgaraya dönüşür */
.layout, .sidebar { display: contents; }

/* Arama ve beslenme filtreleri */
.filters {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px max(16px, var(--safe-right)) 4px var(--gutter);
}
.search {
  position: relative;
}
.search__icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.search__input {
  width: 100%;
  min-height: 46px;
  padding: 10px 40px 10px 42px;
  font: inherit; font-size: 16px; /* iOS odakta yakınlaştırmasın */
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  -webkit-appearance: none; appearance: none;
}
.search__input::-webkit-search-cancel-button { display: none; }
.search__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search__clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
  font-size: 1.1rem; cursor: pointer;
}
.filters__chips {
  display: flex; gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.filters__chips::-webkit-scrollbar { display: none; }
.filters__chips:empty { display: none; }
.filter {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: .85rem; font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.filter:active { transform: scale(.96); }
.filter[aria-pressed="true"] { background: var(--filter-active-bg); border-color: var(--filter-active-bg); color: var(--filter-active-fg); }
.filter__count { font-size: .75rem; opacity: .7; }

/* Menü */
.menu {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px max(16px, var(--safe-right)) calc(48px + var(--safe-bottom)) var(--gutter);
}
.menu__loading, .menu__error, .menu__empty {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
}
.menu__error { color: #b91c1c; }
.menu__empty { display: none; }
.menu.is-empty .menu__empty { display: block; }
/* İskelet yükleme */
.skeleton { display: grid; gap: 12px; padding-top: 20px; }
.skeleton__title { width: 40%; height: 22px; border-radius: 6px; }
.skeleton__card {
  display: grid; grid-template-columns: 1fr 112px; gap: 12px;
  padding: 12px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.skeleton__lines { display: grid; gap: 8px; align-content: start; }
.skeleton__line { height: 12px; border-radius: 6px; }
.skeleton__line:nth-child(1) { width: 60%; height: 16px; }
.skeleton__line:nth-child(2) { width: 95%; }
.skeleton__line:nth-child(3) { width: 35%; }
.skeleton__img { width: 112px; height: 112px; border-radius: 14px; }
.skeleton__title, .skeleton__line, .skeleton__img {
  background: linear-gradient(90deg, var(--skeleton) 25%, var(--surface) 50%, var(--skeleton) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.category {
  scroll-margin-top: calc(var(--nav-h) + 8px);
  padding-top: 20px;
}
.category__title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.category__desc {
  margin: 0 0 12px;
  font-size: .88rem;
  color: var(--muted);
}

.products {
  display: grid;
  gap: 12px;
}
@media (min-width: 560px) {
  .products { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

.product {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 12px;
  width: 100%;
  padding: 12px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  color: inherit;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.product:active { transform: scale(.985); }
.product[hidden] { display: none; }
/* Kartlar sırayla belirir (kategori içindeki sıra: --i) */
.product { animation: fade-up .4s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(min(var(--i, 0), 8) * 40ms); }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
.product__body { display: flex; flex-direction: column; min-width: 0; }
.product__name { margin: 0; font-size: 1rem; font-weight: 600; }
.product__desc {
  margin: 4px 0 0;
  font-size: .85rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product__meta {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.product__price { font-weight: 700; color: var(--accent); }
/* 1 porsiyonun gramajı, fiyatın yanında */
.product__weight { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.product__weight::before { content: "·"; margin-right: 6px; opacity: .6; }
/* Az, 1,5 ve 2 porsiyon seçenekleri: kartın altında tam genişlikte rozet satırı */
.product__portions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.portion {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font-size: .74rem;
  color: var(--muted);
  white-space: nowrap;
}
.portion b { font-weight: 600; color: var(--text); }
.portion__price { font-weight: 700; color: var(--accent); }
.tag {
  font-size: .72rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
/* Diyet / acı / kalori rozetleri */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.pill--vegan, .pill--vegetarian { background: var(--ok-bg); color: var(--ok-fg); }
.pill--gluten-free { background: var(--gf-bg); color: var(--gf-fg); }
.pill--lactose-free { background: var(--lf-bg); color: var(--lf-fg); }
.pill--spicy { background: var(--hot-bg); color: var(--hot-fg); letter-spacing: -.1em; padding-right: 10px; }
.pill--kcal { background: transparent; border: 1px solid var(--line); font-weight: 500; }
.product__media {
  position: relative;
  width: 112px; height: 112px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
}
.product__img { width: 100%; height: 100%; object-fit: cover; }
.product__360 {
  position: absolute;
  right: 6px; bottom: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(28, 25, 23, .78);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .02em;
}

/* Geniş ekran: sol kenar çubuğu + ürün ızgarası */
@media (min-width: 1024px) {
  :root { --content-w: 1280px; }
  .layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    column-gap: 40px;
    max-width: var(--content-w);
    margin: 0 auto;
    padding: 28px 32px 0;
  }
  .sidebar {
    display: block;
    position: sticky;
    top: 16px;
    align-self: start;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 4px;
  }
  .filters { max-width: none; margin: 0; padding: 0 0 18px; }
  .filters__chips { flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
  .category-nav {
    position: static;
    background: none;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .category-nav::before {
    content: attr(data-label);
    display: block;
    margin: 0 0 8px 4px;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .category-nav__scroller {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    gap: 4px;
    padding: 0;
    overflow: visible;
  }
  .chip { text-align: left; border-radius: 12px; padding: 10px 14px; }
  .menu { max-width: none; margin: 0; padding: 0 0 64px; }
  .category { padding-top: 0; margin-bottom: 36px; scroll-margin-top: 28px; }
  .category__title { font-size: 1.4rem; }
  .products { gap: 16px; }
  .site-header--cover { min-height: 300px; }
  .site-header--cover .site-header__title { font-size: 2rem; }
  .site-header--cover .site-header__logo { width: 64px; height: 64px; }
}

/* Dar telefonlar */
@media (max-width: 359px) {
  .product { grid-template-columns: 1fr 92px; gap: 10px; padding: 10px; }
  .product__media { width: 92px; height: 92px; }
  .product__name { font-size: .95rem; }
  .site-header__title { font-size: 1.05rem; }
}

.site-footer {
  padding: 16px var(--gutter) calc(16px + var(--safe-bottom));
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
}
.site-footer__credit { margin-top: 6px; font-size: .7rem; opacity: .8; }
.site-footer__credit a { color: inherit; }

/* Görüntüleyici modal */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  height: 100vh;
  height: 100dvh;
  overscroll-behavior: none;
}
.viewer__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .92); }
.viewer__panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: #000;
}
.viewer__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #000;
  touch-action: none;
}
.viewer__stage .pnlm-container { background: #000; }
/* Düz fotoğraf: sahneye sığdırılır (kırpılmaz, esnemez); boşluğu arkadaki bulanık kopya doldurur */
.viewer__img,
.viewer__backdrop-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.viewer__img {
  object-fit: contain;
  opacity: 0;
  transition: opacity .25s;
}
.viewer__img.is-loaded { opacity: 1; }
.viewer__backdrop-img {
  object-fit: cover;
  transform: scale(1.15);
  filter: blur(28px) brightness(.45) saturate(1.2);
}
.viewer__hint {
  position: absolute;
  top: calc(var(--safe-top) + 14px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  font-size: .78rem;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .6s;
}
.viewer__hint.is-hidden { opacity: 0; }
.viewer__close {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  right: calc(var(--safe-right) + 12px);
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  cursor: pointer;
}
.viewer__close:focus-visible,
.viewer__gyro:focus-visible { outline-color: #fff; }
/* Telefonu çevirerek bakma düğmesi (sol üst; kapat düğmesinin simetriği) */
.viewer__gyro {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  left: calc(var(--safe-left) + 12px);
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}
.viewer__gyro[aria-pressed="true"] { background: var(--accent); }
.viewer__info {
  flex: none;
  max-height: 45%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px var(--gutter) calc(var(--safe-bottom) + 16px);
  background: #141110;
  border-top: 1px solid #2a2523;
  touch-action: pan-y;
}
.viewer__handle {
  width: 40px; height: 4px;
  margin: 0 auto 10px;
  border-radius: 2px;
  background: #3f3835;
}
.viewer__info-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.viewer__title { margin: 0; font-size: 1.1rem; font-weight: 700; }
.viewer__price { font-weight: 700; color: #fb923c; white-space: nowrap; }
.viewer__desc { margin: 6px 0 0; font-size: .88rem; color: #c9c2bb; }
.viewer__desc:empty { display: none; }
.viewer__tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.viewer__tags:empty { display: none; }
.viewer__tags .tag { background: #2a2523; color: #fdba74; }
.viewer__tags .pill { font-size: .78rem; }
/* Porsiyon seçici: az · 1 · 1,5 · 2 — gramaj ve fiyatıyla; seçim fiyatı ve besin değerlerini günceller */
.viewer__portions { margin-top: 12px; }
.viewer__portions:empty { display: none; }
.viewer__portions-label {
  margin-bottom: 6px;
  font-size: .7rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: #a39c95;
}
.psel { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
/* Dört seçenek dar ekrana tek satırda sığmaz: 2×2 */
@media (max-width: 420px) { .psel[data-n="4"] { grid-auto-flow: row; grid-template-columns: 1fr 1fr; } }
.psel__btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 52px;
  padding: 8px 6px;
  border: 1px solid #3f3835;
  border-radius: 12px;
  background: #1f1b19;
  color: #fff;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s;
}
.psel__btn:active { transform: scale(.97); }
.psel__btn[aria-pressed="true"] { border-color: #fb923c; background: rgba(251, 146, 60, .16); }
.psel__btn:focus-visible { outline-color: #fff; }
.psel__size { font-size: .88rem; font-weight: 700; }
.psel__meta { font-size: .72rem; color: #c9c2bb; white-space: nowrap; }
.psel__price { font-weight: 600; color: #fb923c; }
.nutrition {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #1f1b19;
  border: 1px solid #2a2523;
}
.nutrition:empty { display: none; }
.nutrition__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nutrition__item { text-align: center; }
.nutrition__value { display: block; font-size: 1.05rem; font-weight: 700; color: #fff; }
.nutrition__unit { font-size: .7rem; font-weight: 500; color: #a39c95; margin-left: 1px; }
.nutrition__label { display: block; font-size: .7rem; color: #a39c95; margin-top: 2px; }
.nutrition__portion { margin: 8px 0 0; text-align: center; font-size: .74rem; color: #a39c95; }
.viewer__allergens { margin: 10px 0 0; font-size: .8rem; color: #c9c2bb; }
.viewer__allergens:empty { display: none; }
.viewer__allergens b { color: #fdba74; font-weight: 600; }
.viewer__credit { margin: 10px 0 0; font-size: .7rem; color: #7a726c; }
.viewer__credit:empty { display: none; }
.viewer__credit a { color: inherit; }

/* Telefon yatay mod: bilgi paneli sahnenin üstüne yarı saydam biner */
@media (orientation: landscape) and (max-height: 500px) {
  .viewer__info {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    max-height: 40%;
    background: linear-gradient(to top, rgba(20, 17, 16, .95), rgba(20, 17, 16, .75));
    border-top: 0;
    padding-left: calc(var(--safe-left) + 16px);
    padding-right: calc(var(--safe-right) + 16px);
  }
  .viewer__handle { display: none; }
  .viewer__desc, .viewer__tags, .viewer__portions, .nutrition, .viewer__allergens { display: none; }
}

/* Masaüstü: ortalanmış kart */
@media (min-width: 720px) and (min-height: 560px) {
  .viewer__panel {
    inset: 5vh 50% auto auto;
    transform: translateX(50%);
    width: min(960px, 92vw);
    height: 90vh;
    border-radius: 20px;
    overflow: hidden;
  }
}

/* Menü asistanı: sağ altta düğme, telefonda alt panel, geniş ekranda köşe kartı (assistant.js) */
.assist {
  position: fixed;
  right: max(16px, var(--safe-right));
  bottom: calc(16px + var(--safe-bottom));
  z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.assist__fab {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 10px 18px 10px 14px;
  border: 0; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-weight: 600; font-size: .92rem; cursor: pointer;
  box-shadow: 0 6px 20px rgba(28, 25, 23, .28);
  transition: transform .12s;
}
.assist__fab:active { transform: scale(.96); }
.assist__fab-icon { font-size: 1.05rem; }
.assist.is-open .assist__fab { display: none; }
.assist__sheet {
  display: flex; flex-direction: column;
  width: min(400px, calc(100vw - 32px));
  max-height: min(600px, calc(100dvh - 32px - var(--safe-bottom)));
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 18px 48px rgba(28, 25, 23, .3);
  overflow: hidden;
}
.assist__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 8px 12px 16px;
  border-bottom: 1px solid var(--line);
}
.assist__title { font-weight: 700; font-size: .95rem; }
.assist__close {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.assist__log {
  flex: 1; min-height: 160px; overflow-y: auto; overscroll-behavior: contain;
  padding: 14px 12px 6px; display: flex; flex-direction: column; gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.assist__msg { max-width: 88%; padding: 9px 12px; border-radius: 16px; font-size: .9rem; line-height: 1.4; }
.assist__msg p { margin: 0; white-space: pre-wrap; }
.assist__msg--bot { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 6px; }
.assist__msg--user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.assist__msg--typing { color: var(--muted); font-style: italic; }
.assist__items { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.assist__item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text); text-align: left; cursor: pointer;
  transition: transform .12s, border-color .15s;
}
.assist__item:active { transform: scale(.98); }
.assist__item-img { flex: none; width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--skeleton); }
.assist__item-text { display: flex; flex-direction: column; min-width: 0; font-size: .85rem; line-height: 1.3; }
.assist__item-text b { font-weight: 600; }
.assist__item-text span { color: var(--accent); font-weight: 700; font-size: .8rem; }
.assist__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 8px; }
.assist__chip {
  min-height: 34px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-size: .82rem; font-weight: 500; cursor: pointer;
}
.assist__chip:active { transform: scale(.96); }
.assist__form { display: flex; gap: 6px; padding: 8px 10px 4px; border-top: 1px solid var(--line); }
.assist__input {
  flex: 1; min-width: 0; min-height: 44px; padding: 8px 14px;
  font: inherit; font-size: 16px; /* iOS odakta yakınlaştırmasın */
  color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px;
  -webkit-appearance: none; appearance: none;
}
.assist__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.assist__send {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--accent); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.assist__send:disabled { opacity: .5; cursor: default; }
.assist__note { margin: 0; padding: 2px 14px 10px; font-size: .68rem; color: var(--muted); }
/* Telefonda tam genişlikte alt panel; görüntüleyici açıkken ve yazdırırken gizli */
@media (max-width: 559px) {
  .assist.is-open { left: 0; right: 0; bottom: 0; align-items: stretch; }
  .assist__sheet { width: auto; border-radius: 20px 20px 0 0; max-height: calc(100dvh - 48px); padding-bottom: var(--safe-bottom); }
}
body.viewer-open .assist { display: none; }
@media print { .assist { display: none; } }

/* Sayfa kaydırma kilidi (iOS dahil) */
body.viewer-open {
  position: fixed;
  left: 0; right: 0;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product, .chip, .filter, .viewer__hint, .viewer__img, .psel__btn, .assist__fab, .assist__item { transition: none; }
  .product { animation: none; }
  .skeleton__title, .skeleton__line, .skeleton__img { animation: none; }
}
