/* QR Menü — şarküteri tezgâhı: metro fayansı zemin, emaye plaka başlıklar, noktalı fiyat çizgileri */
:root {
  --accent-base: #C7361F;
  --bg: #EDF1EC;
  --surface: #F8FAF6;
  --ink: #1B3A31;
  --ink-soft: #4A6258;
  --line: #C4D0C7;
  --grout: rgba(27, 58, 49, .12);
  --accent: color-mix(in srgb, var(--accent-base) 88%, black);
  --on-accent: #fff;
  --kraft: #E4D3B0;
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-text: 'Newsreader', Georgia, 'Times New Roman', serif;
  --nav-h: 56px;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0E1D19;
  --surface: #152A24;
  --ink: #E7EEE8;
  --ink-soft: #9DB2A8;
  --line: #2A4239;
  --grout: rgba(231, 238, 232, .09);
  --accent: color-mix(in srgb, var(--accent-base) 62%, white);
  --kraft: #3A3324;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.app { max-width: 720px; margin: 0 auto; padding: 0 16px 48px; }
.state { padding: 64px 0; text-align: center; color: var(--ink-soft); }
.state button {
  margin-top: 16px; padding: 10px 18px; border-radius: 6px; border: 1px solid var(--ink);
  background: transparent; font-family: var(--font-display); font-weight: 600;
}

/* ---------- Üst alan ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 6px; }
.langs { display: flex; gap: 4px; }
.langs button, .theme-btn {
  min-width: 40px; height: 36px; padding: 0 8px; border-radius: 6px;
  border: 1px solid var(--line); background: transparent;
  font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: .02em;
}
.langs button[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.theme-btn { width: 40px; padding: 0; display: grid; place-items: center; }
.theme-btn svg { width: 18px; height: 18px; }

.brand { padding: 20px 0 8px; }
.brand-logo { max-height: 72px; width: auto; margin-bottom: 14px; }
.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 80%;
  font-variation-settings: 'wdth' 80;
  font-size: clamp(44px, 14vw, 84px);
  line-height: .92;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.tagline { margin: 12px 0 0; font-style: italic; font-size: 19px; color: var(--ink-soft); max-width: 34ch; }
.cover { margin-top: 20px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--line); }
.notice {
  margin-top: 18px; padding: 12px 14px; border-radius: 8px; background: var(--kraft);
  font-size: 15px; white-space: pre-line;
}

/* ---------- Arama ---------- */
.search { position: relative; margin: 22px 0 0; }
.search input {
  width: 100%; height: 46px; padding: 0 14px 0 42px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface);
  font-family: var(--font-display); font-size: 16px;
}
.search input::placeholder { color: var(--ink-soft); opacity: .8; }
.search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--ink-soft); pointer-events: none; }

/* ---------- Kategori çubuğu ---------- */
.cats {
  position: sticky; top: 0; z-index: 10;
  margin: 14px -16px 0; padding: 10px 16px;
  background: var(--bg); border-bottom: 1px solid var(--line);
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cats a {
  flex: none; padding: 8px 13px; border-radius: 6px; text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink);
  border: 1px solid transparent; white-space: nowrap;
}
.cats a:hover { border-color: var(--line); }
.cats a[aria-current='true'] { background: var(--ink); color: var(--bg); }

/* ---------- Kategori başlığı: fayans duvarı + emaye plaka ---------- */
.cat { scroll-margin-top: var(--nav-h); }
.cat-head { position: relative; margin: 36px 0 6px; padding: 16px 12px; border-radius: 6px; overflow: hidden; }
.cat-head::before {
  content: ''; position: absolute; inset: 0; background: var(--grout);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='24'%3E%3Cpath d='M0 .5H40M0 12.5H40M.5 0V12M20.5 12V24' stroke='black' fill='none'/%3E%3C/svg%3E") 0 0 / 40px 24px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='24'%3E%3Cpath d='M0 .5H40M0 12.5H40M.5 0V12M20.5 12V24' stroke='black' fill='none'/%3E%3C/svg%3E") 0 0 / 40px 24px;
}
.cat-head h2 {
  position: relative; display: inline-block; margin: 0; padding: 7px 14px 8px;
  background: var(--ink); color: var(--bg); border-radius: 4px;
  font-family: var(--font-display); font-weight: 700; font-stretch: 82%; font-variation-settings: 'wdth' 82;
  font-size: 24px; line-height: 1.15; letter-spacing: -.005em;
}
.cat-desc { margin: 8px 0 0; color: var(--ink-soft); font-style: italic; }
.cat-img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 8px; margin: 8px 0 4px; background: var(--line); }

/* ---------- Ürün satırı ---------- */
.item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px;
  padding: 16px 2px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.item:last-child { border-bottom: 0; }
.item .line { display: flex; align-items: baseline; gap: 8px; }
.item .name {
  margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.25; letter-spacing: -.005em;
}
.item .leader { flex: 1; min-width: 12px; border-bottom: 2px dotted var(--line); transform: translateY(-4px); }
.price {
  font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--accent);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.desc { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.45; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; }
.tag {
  padding: 1px 8px; border-radius: 4px; border: 1px solid var(--accent); color: var(--accent);
  font-family: var(--font-display); font-weight: 600; font-size: 12px; line-height: 1.6;
}
.tag.sold { border-color: var(--ink-soft); color: var(--ink-soft); }
.al { display: inline-flex; gap: 2px; font-size: 14px; line-height: 1; }
.al span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); font-size: 12px; }
.kcal {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent-base) 14%, transparent); color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 13px; line-height: 1.7; white-space: nowrap;
}
.tag.gf { border-color: #2F7A4F; color: #2F7A4F; }
:root[data-theme='dark'] .tag.gf { border-color: #6CC391; color: #6CC391; }
.thumb { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; background: var(--line); align-self: start; }
.item.is-sold .name, .item.is-sold .desc { opacity: .55; }
.item.is-sold .price { color: var(--ink-soft); text-decoration: line-through; }

.empty { padding: 48px 0; text-align: center; color: var(--ink-soft); }
body.searching .cat-head { margin-top: 24px; }

/* ---------- Alt bilgi ---------- */
.foot { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-soft); }
.foot h3 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--ink); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--line); }
.foot a:hover { text-decoration-color: var(--accent); }
.foot p { margin: 14px 0 0; white-space: pre-line; }
.foot .allergy-note { font-style: italic; }

/* ---------- Ürün detayı (alt sayfa) ---------- */
dialog.sheet {
  width: min(560px, 100%); max-height: 90vh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: 16px 16px 0 0; background: var(--surface); color: var(--ink); overflow: auto;
}
dialog.sheet::backdrop { background: rgba(8, 20, 16, .55); }
@media (min-width: 600px) { dialog.sheet { margin: auto; border-radius: 16px; } }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: rise .22s ease-out; }
  @keyframes rise { from { transform: translateY(24px); opacity: 0; } }
}
.sheet-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.sheet-body { padding: 20px 20px 24px; }
.sheet-body h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: -.015em; }
.sheet-body .price { display: block; margin-top: 6px; font-size: 22px; }
.sheet-body .desc { margin-top: 12px; font-size: 17px; line-height: 1.55; color: var(--ink); }
.sheet-body .meta { margin-top: 14px; }
.sheet-al { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; }
.sheet-al li { display: flex; align-items: center; gap: 10px; }
.sheet-al .ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--line); font-size: 14px; }
.sheet-note { margin: 12px 0 0; font-size: 14px; font-style: italic; color: var(--ink-soft); }
.sheet-close {
  position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(14, 29, 25, .72); color: #fff;
  font-size: 22px; line-height: 1;
}

@media (min-width: 720px) {
  .app { padding-bottom: 80px; }
  .cats { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
}
.cats[hidden] { display: none; }

.sheet-body .kcal { font-size: 15px; padding: 2px 13px; }
.sheet-gf { margin: 12px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: #2F7A4F; }
:root[data-theme='dark'] .sheet-gf { color: #6CC391; }

/* ---------- Açılış penceresi: haftanın / ayın ürünü ---------- */
dialog.feature {
  width: min(400px, calc(100% - 32px)); max-height: calc(100% - 32px); margin: auto; padding: 0; border: 0;
  border-radius: 18px; background: var(--surface); color: var(--ink); overflow: auto;
}
dialog.feature::backdrop { background: rgba(8, 20, 16, .6); }
@media (prefers-reduced-motion: no-preference) {
  dialog.feature[open] { animation: pop .28s ease-out; }
  @keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } }
}
.feature-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.feature-body { padding: 20px 22px 22px; }
.feature-label {
  display: inline-block; margin: 0 0 10px; padding: 2px 11px; border-radius: 999px;
  background: var(--accent); color: var(--bg); font-family: var(--font-display); font-weight: 700; font-size: 13px;
}
.feature-body h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.15; letter-spacing: -.015em; }
.feature-note { margin: 8px 0 0; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--accent); }
.feature-body .desc { margin-top: 10px; font-size: 16px; line-height: 1.5; }
.feature-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; }
.feature-meta .price { font-size: 22px; }
.feature-go {
  display: block; width: 100%; margin-top: 18px; padding: 14px 16px; border: 0; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.feature-close {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: rgba(14, 29, 25, .72); color: #fff; font-size: 26px; line-height: 1;
}

/* Menüde ürüne gidildiğinde kısa vurgu */
.item.flash { border-radius: 10px; animation: flash 2.8s ease-out; }
@keyframes flash {
  0%, 55% { background: color-mix(in srgb, var(--accent-base) 16%, transparent); box-shadow: 0 0 0 2px var(--accent); }
  100% { background: transparent; box-shadow: 0 0 0 2px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .item.flash { animation: none; background: color-mix(in srgb, var(--accent-base) 16%, transparent); box-shadow: 0 0 0 2px var(--accent); }
}
.item[data-item] { scroll-margin-top: calc(var(--nav-h) + 12px); }
