:root {
  --primary: #f97316;
  --primary-pressed: color-mix(in srgb, var(--primary) 82%, #000);
  --primary-soft: color-mix(in srgb, var(--primary) 12%, #fff);
  --primary-glow: color-mix(in srgb, var(--primary) 32%, transparent);
  --accent: #0ea5e9;
  --accent-soft: #e6f6fd;
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-muted: #f1efeb;
  --border: #e7e4df;
  --text: #1c1917;
  --text-2: #6b6560;
  --text-3: #a39e98;
  --shadow: 0 6px 24px rgba(28, 25, 23, 0.06);
  --shadow-lg: 0 -12px 40px rgba(28, 25, 23, 0.18);
  --radius: 18px;
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-soft: color-mix(in srgb, var(--primary) 22%, #14110f);
    --primary-pressed: color-mix(in srgb, var(--primary) 80%, #fff);
    --accent-soft: #0c2a38;
    --bg: #14110f;
    --surface: #1e1a17;
    --surface-muted: #2a2521;
    --border: #322c27;
    --text: #f5f2ee;
    --text-2: #b3aca5;
    --text-3: #7d766f;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 -12px 40px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.app { max-width: 640px; margin: 0 auto; min-height: 100vh; }

/* Başlık */
.hero { position: relative; padding: calc(env(safe-area-inset-top) + 28px) 20px 18px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -40% -20% auto;
  height: 340px;
  background: radial-gradient(60% 70% at 30% 30%, color-mix(in srgb, var(--primary) 28%, transparent), transparent 70%),
              radial-gradient(50% 60% at 85% 10%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 60px; height: 60px; border-radius: 18px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #fff));
  color: #fff; font: 700 22px var(--font-display);
  box-shadow: 0 10px 24px var(--primary-glow);
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-text h1 { margin: 0; font: 700 26px/1.15 var(--font-display); letter-spacing: -0.01em; }
.subtitle { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 11px;
}
.search {
  margin-top: 18px; display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-3); font-size: 17px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: 500 15px var(--font-body); }
.search input::placeholder { color: var(--text-3); }

/* Kategori çubuğu */
.chips {
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font: 600 13px var(--font-body); color: var(--text); white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.chip.active { background: var(--primary); border-color: transparent; color: #fff; }

/* Ürünler */
.content { padding: 4px 20px 24px; }
.section { padding-top: 18px; scroll-margin-top: 64px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.section-head h3 { margin: 0; font: 700 20px var(--font-display); }
.section-head .count { font: 600 12px var(--font-mono); color: var(--text-3); }
.card {
  width: 100%; text-align: start;
  display: flex; gap: 14px; align-items: stretch;
  padding: 12px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.card:active { transform: scale(0.985); }
.card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 2px 0; }
.card-name { font: 600 17px/1.25 var(--font-display); }
.card-desc {
  margin-top: 4px; color: var(--text-2); font-size: 13px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 8px; }
.price { font: 700 15px var(--font-mono); color: var(--primary-pressed); }
.price.big { font-size: 20px; }
.badge-3d {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  background: var(--accent); color: #fff; font: 700 11px var(--font-body);
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}
.thumb {
  position: relative; width: 104px; height: 104px; flex: none;
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, var(--primary-soft), var(--surface-muted));
  display: grid; place-items: center; color: color-mix(in srgb, var(--primary) 50%, transparent); font-size: 30px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .badge-3d { position: absolute; top: 6px; inset-inline-end: 6px; }
.empty { text-align: center; padding: 48px 12px; color: var(--text-2); }
.empty .icon {
  width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px;
  display: grid; place-items: center; font-size: 28px;
  background: var(--primary-soft); color: var(--primary);
}
.empty h4 { margin: 0 0 6px; font: 600 17px var(--font-display); color: var(--text); }
.footer { text-align: center; padding: 8px 20px calc(env(safe-area-inset-bottom) + 28px); color: var(--text-3); font-size: 12px; }

/* İskelet */
.sk { display: inline-block; background: var(--surface-muted); border-radius: 8px; position: relative; overflow: hidden; }
.sk::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(-100%); animation: shimmer 1.2s infinite;
}
@media (prefers-color-scheme: dark) { .sk::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent); } }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-title { width: 170px; height: 26px; }
.sk-card { display: block; height: 130px; border-radius: var(--radius); margin-top: 12px; }
.skeleton-list { padding-top: 10px; }

/* Alt panel */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(20, 17, 15, 0.45);
  opacity: 0; transition: opacity .25s ease;
}
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  max-width: 640px; margin: 0 auto; max-height: 92vh; overflow-y: auto;
  background: var(--surface); border-radius: 28px 28px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  padding-bottom: calc(env(safe-area-inset-bottom) + 20px);
}
.sheet.open { transform: translateY(0); }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 10px auto 0; }
.sheet-close {
  position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-size: 18px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}
.stage {
  position: relative; margin: 12px 16px 0; height: 320px; border-radius: 22px; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, var(--surface) 0%, var(--bg) 55%, var(--surface-muted) 100%);
}
.stage.no-model { height: 240px; }
.stage img { width: 100%; height: 100%; object-fit: cover; }
.stage .placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 56px; color: color-mix(in srgb, var(--primary) 40%, transparent); background: linear-gradient(135deg, var(--primary-soft), var(--surface-muted)); }
model-viewer { width: 100%; height: 100%; --poster-color: transparent; --progress-bar-color: var(--accent); }
.stage-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--text-2); font-size: 12px; font-weight: 600; pointer-events: none;
}
.sheet-body { padding: 18px 20px 0; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-head h2 { margin: 0; font: 700 24px/1.2 var(--font-display); }
.sheet-desc { margin: 8px 0 0; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.btn-ar {
  margin-top: 20px; width: 100%; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--primary); color: #fff; font: 700 17px var(--font-body);
  box-shadow: 0 10px 24px var(--primary-glow);
  transition: transform .15s ease, background .15s;
}
.btn-ar:active { transform: scale(0.98); background: var(--primary-pressed); }
.btn-ar svg { font-size: 22px; }
.ar-note { margin: 10px 0 0; text-align: center; color: var(--text-3); font-size: 12px; }
.ar-unavailable {
  margin-top: 20px; padding: 14px; border-radius: 14px;
  display: flex; gap: 10px; align-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600;
}
/* Kapak görseli */
.hero-cover {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.hero-cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.35) 45%, var(--bg) 100%);
}
.hero.has-cover { padding-top: calc(env(safe-area-inset-top) + 110px); }
.hero.has-cover .hero-glow { display: none; }
.hero.has-cover .brand-text h1, .hero.has-cover .tagline { color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }
.hero.has-cover .subtitle { color: rgba(255, 255, 255, 0.85); }
.hero.has-cover .logo { box-shadow: 0 0 0 3px #fff, 0 10px 24px rgba(0, 0, 0, 0.25); }
.tagline { margin: 4px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.4; }

/* Dil seçici */
.lang-switch {
  position: absolute; top: calc(-1 * env(safe-area-inset-top) - 14px); inset-inline-end: 0; z-index: 2;
  display: flex; align-items: center; gap: 2px; padding: 3px 3px 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero:not(.has-cover) .lang-switch { top: -14px; }
.hero.has-cover .lang-switch { top: -92px; }
.lang-icon { color: var(--text-3); font-size: 14px; display: grid; margin-inline-end: 3px; }
.lang {
  min-width: 34px; height: 28px; padding: 0 8px; border-radius: 999px;
  font: 700 12px var(--font-mono); color: var(--text-2);
}
.lang.active { background: var(--primary); color: #fff; }

/* Etiketler, kalori, tükendi */
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--surface-muted); color: var(--text-2); font-size: 11px; font-weight: 700; white-space: nowrap;
}
.tag-vegetarian, .tag-vegan { background: #e8f6ee; color: #16794a; }
.tag-spicy { background: #fdecec; color: #c0322b; }
.tag-popular { background: #fff6dc; color: #9a6b00; }
.tag-new { background: var(--accent-soft); color: var(--accent); }
.tag.sold { background: var(--text); color: var(--bg); }
@media (prefers-color-scheme: dark) {
  .tag-vegetarian, .tag-vegan { background: #10301f; color: #6fd39e; }
  .tag-spicy { background: #3a1513; color: #ff8a80; }
  .tag-popular { background: #33290c; color: #f2c94c; }
}
.kcal { display: inline-flex; align-items: center; gap: 3px; color: var(--text-3); font-size: 12px; font-weight: 700; }
.kcal svg { color: #f2994a; }
.card.sold-out .card-name, .card.sold-out .price { color: var(--text-3); }
.card.sold-out .thumb img { filter: grayscale(1); opacity: 0.55; }
.sold-badge {
  position: absolute; inset: auto 6px 6px; text-align: center; padding: 4px 0; border-radius: 8px;
  background: rgba(20, 17, 15, 0.78); color: #fff; font: 700 11px var(--font-body); letter-spacing: .02em;
}
.sheet-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.sheet-allergens { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--surface-muted); }
.allergen-head { display: flex; align-items: center; gap: 6px; font: 700 13px var(--font-body); color: var(--text); }
.allergen-head svg { color: #d97706; }
.allergen-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.allergen-list span {
  padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-2);
}
.ar-unavailable.sold { background: var(--surface-muted); color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet-backdrop, .card, .chip { transition: none; }
  .sk::after { animation: none; }
}
