/* =========================================================
   SaDe Restoran — QR Menü
   Beyaz, ferah, canlı vurgu renkli; mobil öncelikli.
   ========================================================= */

:root {
  color-scheme: light;

  --ink: #1f1d1a;
  --muted: #5c5750;
  --paper: #faf8f4;
  --line: #ebe7df;
  --white: #ffffff;

  --red: #c62828;
  --red-dark: #b71c1c;
  --green: #15803d;
  --green-soft: #e7f7ec;
  --orange: #c2410c;
  --orange-soft: #fff0e5;

  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", ui-serif, Georgia, serif;

  --radius-card: 18px;
  --radius-sheet: 28px;
  --shadow-card: 0 1px 2px rgba(28, 25, 23, 0.04);
  --shadow-hover: 0 10px 26px -12px rgba(28, 25, 23, 0.22);
  --container: 1152px;
  --gutter: 16px;
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

/* ---------- Temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid #f97316; outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Üst renk şeridi ---------- */
.stripe { display: flex; height: 6px; }
.stripe span { flex: 1; }
.stripe span:nth-child(1) { background: #ef4444; }
.stripe span:nth-child(2) { background: #f97316; }
.stripe span:nth-child(3) { background: #facc15; }
.stripe span:nth-child(4) { background: #22c55e; }
.stripe span:nth-child(5) { background: #14b8a6; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--white); }
.hero__dots {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 30%, rgba(239, 68, 68, 0.08) 0 90px, transparent 91px),
    radial-gradient(circle at 88% 70%, rgba(34, 197, 94, 0.08) 0 110px, transparent 111px),
    radial-gradient(circle at 70% 10%, rgba(250, 204, 21, 0.1) 0 60px, transparent 61px);
}
.hero__inner {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 32px var(--gutter) 28px;
}
.hero__logo { width: 176px; height: auto; }
.hero__eyebrow {
  margin-top: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.42em; text-transform: uppercase;
  color: rgba(31, 29, 26, 0.8);
  padding-left: 0.42em; /* harf aralığını ortala */
}
.hero__tagline { margin-top: 12px; font-size: 15px; font-weight: 500; color: var(--muted); }
.hero__badges { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

@media (min-width: 640px) {
  .hero__inner { padding-top: 44px; padding-bottom: 36px; }
  .hero__logo { width: 220px; }
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 4px 12px;
  font-size: 12px; font-weight: 700;
}
.badge--green { background: var(--green-soft); color: var(--green); }
.badge--orange { background: var(--orange-soft); color: var(--orange); }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }

/* ---------- Yapışkan kategori barı ---------- */
.catnav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(235, 231, 223, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.catnav__track {
  max-width: var(--container); margin: 0 auto;
  display: flex; gap: 8px;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter);
  padding: 12px var(--gutter);
  scrollbar-width: none;
  /* kaydırılabilirlik ipucu */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
}
.catnav__track::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--white); color: var(--ink);
  font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}
.chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--vivid); }
.chip:hover { border-color: var(--accent); }
.chip[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip[aria-current="true"] .chip__dot { background: #fff; }

/* ---------- Bölümler ---------- */
.menu { padding: 24px 0 128px; }
@media (min-width: 640px) { .menu { padding-top: 32px; } }

.sections { display: flex; flex-direction: column; gap: 40px; }
.section { scroll-margin-top: 80px; }
.section__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section__icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 16px;
  background: var(--soft); color: var(--accent);
}
.section__icon svg { width: 32px; height: 32px; }
.section__titles { min-width: 0; flex: 1; }
.section__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 23px; line-height: 1.2; color: var(--ink);
}
@media (min-width: 640px) { .section__title { font-size: 30px; } }
.section__desc { font-size: 14px; color: var(--muted); }
.section__count {
  flex-shrink: 0; border-radius: 999px; padding: 4px 10px;
  background: var(--soft); color: var(--accent);
  font-size: 12px; font-weight: 700;
}
.section__bar { width: 56px; height: 4px; border-radius: 999px; background: var(--vivid); margin-bottom: 16px; }

/* ---------- Ürün kartları ---------- */
.grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card {
  display: flex; align-items: center; gap: 14px;
  width: 100%; height: 100%; padding: 10px 12px 10px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-card);
  background: var(--white); box-shadow: var(--shadow-card);
  text-align: left;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card:focus-visible { outline-color: var(--accent); }
.card__media { width: 84px; height: 84px; flex-shrink: 0; border-radius: 14px; }
.card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.card__name { font-size: 15.5px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.card__desc {
  font-size: 13px; line-height: 1.4; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__price { font-size: 14px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.card__chev { width: 20px; height: 20px; flex-shrink: 0; color: #b9b4aa; transition: transform .2s, color .2s; }
.card:hover .card__chev { transform: translateX(2px); color: var(--accent); }

/* ---------- Görsel + placeholder ---------- */
.media {
  position: relative; overflow: hidden;
  background: var(--soft); color: var(--accent);
}
.media__ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background-image: radial-gradient(color-mix(in srgb, currentColor 14%, transparent) 1.1px, transparent 1.3px);
  background-size: 12px 12px;
}
.media__ph svg { width: 42%; height: 42%; max-width: 96px; max-height: 96px; }
.media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .3s;
}
.media img.is-loaded { opacity: 1; }

/* ---------- Etiketler ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 2px 8px;
  font-size: 11px; font-weight: 700;
}
.tag svg { width: 12px; height: 12px; fill: currentColor; }
.tag--spicy { background: #fdecec; color: #b91c1c; }
.tag--veg { background: var(--green-soft); color: var(--green); }
.tags--lg .tag { padding: 4px 12px; font-size: 12px; }

/* ---------- Alt sayfa / pencere (native dialog) ---------- */
.sheet {
  width: 100%; max-width: none; max-height: none;
  margin: auto 0 0; padding: 0; border: 0;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  background: var(--white); color: var(--ink);
  box-shadow: 0 -10px 40px rgba(28, 25, 23, 0.18);
  overflow: hidden;
}
.sheet::backdrop { background: rgba(41, 37, 36, 0.38); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet[open] { animation: sheet-in .26s cubic-bezier(.2, .8, .2, 1); }
.sheet[open]::backdrop { animation: fade-in .2s ease-out; }
@media (min-width: 640px) {
  .sheet { margin: auto; border-radius: var(--radius-sheet); max-width: 520px; }
  .sheet--categories { max-width: 600px; }
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

.sheet__inner { display: flex; flex-direction: column; max-height: 88dvh; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 8px; }
.sheet__title { font-family: var(--font-display); font-weight: 600; font-size: 24px; }

.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--paper); color: var(--ink);
  transition: background-color .2s;
}
.icon-btn:hover { background: var(--line); }
.icon-btn svg, .fab svg, .card__chev {
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn svg { width: 20px; height: 20px; }

/* Ürün detayı */
.product__media { aspect-ratio: 16 / 10; width: 100%; }
.product__media .media__ph svg { width: 96px; height: 96px; }
.product__top { position: relative; }
.product__grip {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  width: 40px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.85);
}
@media (min-width: 640px) { .product__grip { display: none; } }
.product__close { position: absolute; right: 12px; top: 12px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.product__close:hover { background: #fff; }
.product__body {
  display: flex; flex-direction: column; gap: 16px;
  overflow-y: auto;
  padding: 20px 20px max(24px, env(safe-area-inset-bottom));
}
@media (min-width: 640px) { .product__body { padding: 24px 28px 28px; } }
.product__head { display: flex; flex-direction: column; gap: 8px; }
.pill {
  width: fit-content; border-radius: 999px; padding: 4px 12px;
  background: var(--soft); color: var(--accent);
  font-size: 12px; font-weight: 700;
}
.product__title { font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1.15; }
.product__price { font-size: 18px; font-weight: 800; color: var(--accent); }
.product__desc { font-size: 15px; line-height: 1.6; color: var(--muted); white-space: pre-line; }
.product__label { margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chips-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-list li { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.chips-list--warn li { border-color: transparent; background: #fff5db; color: #8a4b08; font-weight: 500; }
.note { border-radius: 16px; background: var(--paper); padding: 12px 16px; font-size: 13px; line-height: 1.6; color: var(--muted); }

/* Kategori kutuları */
.tiles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  overflow-y: auto;
  padding: 8px 20px max(20px, env(safe-area-inset-bottom));
}
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 8px 24px 24px; } }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  width: 100%; height: 100%; padding: 12px;
  border: 2px solid transparent; border-radius: 16px;
  background: var(--soft); text-align: left;
  transition: border-color .2s, transform .2s;
}
.tile:hover { transform: translateY(-1px); }
.tile[aria-current="true"] { border-color: var(--accent); }
.tile__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--accent); }
.tile__icon svg { width: 28px; height: 28px; }
.tile__name { font-size: 14.5px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.tile__count { font-size: 12px; font-weight: 700; color: var(--accent); }

/* ---------- Kategoriler butonu (başparmak erişimi) ---------- */
.fab {
  position: fixed; z-index: 40;
  right: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 20px 14px 16px; border: 0; border-radius: 999px;
  background: var(--red); color: #fff;
  font-size: 15px; font-weight: 700;
  box-shadow: 0 10px 28px -8px rgba(198, 40, 40, 0.6);
  transition: background-color .2s, transform .1s;
}
.fab:hover { background: var(--red-dark); }
.fab:active { transform: scale(.98); }
.fab svg { width: 20px; height: 20px; }
@media (min-width: 640px) { .fab { right: 24px; } }

/* ---------- Durum mesajları ---------- */
.state { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 440px; margin: 0 auto; padding: 64px 24px; }
.state__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 24px; }
.state__icon svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.state--error .state__icon { background: #fdecec; color: var(--red); }
.state--empty .state__icon { background: #fff5db; color: #b45309; }
.state__title { margin-top: 20px; font-family: var(--font-display); font-weight: 600; font-size: 24px; }
.state__text { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.btn {
  margin-top: 24px; border: 0; border-radius: 999px; padding: 12px 24px;
  background: var(--red); color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 6px 16px -6px rgba(198, 40, 40, 0.5);
}
.btn:hover { background: var(--red-dark); }

/* ---------- Yükleme iskeleti ---------- */
.skeleton {
  display: block;
  background: linear-gradient(90deg, #f1eee8 0%, #f8f6f2 50%, #f1eee8 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.skel-icon { width: 48px; height: 48px; border-radius: 16px; }
.skel-title { width: 190px; height: 28px; border-radius: 8px; }
.skel-card { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-card); background: #fff; }
.skel-thumb { width: 84px; height: 84px; border-radius: 14px; flex-shrink: 0; }
.skel-lines { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.skel-lines .skeleton { height: 14px; border-radius: 999px; width: 75%; }
.skel-lines .skeleton + .skeleton { width: 50%; height: 11px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line); background: var(--white);
  padding: 32px var(--gutter) 112px; text-align: center;
  font-size: 14px; color: var(--muted);
}
.footer__name { font-weight: 700; color: var(--ink); }
.footer__credit { margin-top: 10px; font-size: 12px; }
.footer__credit a { color: var(--muted); text-underline-offset: 2px; }
.footer__credit a:hover { color: var(--ink); }
@media (min-width: 640px) { .footer { padding-bottom: 40px; } }

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