/* ═══════════════════════════════════════════════════════════════════════════
   Chess Coffee — Müşteri menüsü (mobil öncelikli)
   ═══════════════════════════════════════════════════════════════════════════ */

.menu-page {
  --page-w: 680px;
  --gutter: 18px;
  --toolbar-h: 120px;
}

html.sheet-open, html.sheet-open body { overflow: hidden; }

/* ─── Üst bölüm ─────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: calc(env(safe-area-inset-top, 0px) + 52px) var(--gutter) 30px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

/* Hafif satranç tahtası dokusu — kenarlara doğru kaybolur */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.028) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.028) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.028) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.028) 75%);
  background-size: 44px 44px;
  background-position: 0 0, 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 85% at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 85% at 50% 0%, #000 0%, transparent 72%);
}

.hero-inner {
  max-width: var(--page-w);
  margin: 0 auto;
  display: grid;
  justify-items: center;
}

.brand .brand-mark { width: 44px; height: 44px; }

.hero-wordmark {
  margin-top: 18px;
  font-size: clamp(24px, 7.2vw, 34px);
}

.hero-tagline {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-right: -0.32em;
}
.hero-tagline span { color: var(--accent-2); padding: 0 0.35em; }

.hero-welcome {
  max-width: 30ch;
  margin-top: 22px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-2);
}

.table-chip {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ─── Yapışkan araç çubuğu: arama + kategoriler ─────────────────────────── */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(11, 11, 16, 0.88);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}
.toolbar.is-stuck { border-bottom-color: var(--border); }

.toolbar-inner {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 10px 0 12px;
}

.search {
  position: relative;
  margin: 0 var(--gutter);
}
.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 48px;
  padding: 0 48px 0 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 16px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.search-input::-webkit-search-cancel-button { display: none; }
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input:disabled { opacity: 0.6; }
.search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
}
.search-clear:hover { color: var(--text); background: var(--surface-2); }

.cat-nav { margin-top: 10px; }
.cat-nav-track {
  display: flex;
  gap: 8px;
  padding: 2px var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-nav-track::-webkit-scrollbar { display: none; }

.cat-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  scroll-snap-align: center;
  text-decoration: none !important;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.cat-chip:hover { color: var(--text); border-color: var(--border-strong); }
.cat-chip.is-active {
  color: var(--text);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.sk-chip { width: 112px; border: 0; }
.is-searching .cat-chip.is-active { background: transparent; border-color: var(--border); color: var(--text-2); }

/* ─── İçerik ────────────────────────────────────────────────────────────── */
.menu-main {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 8px var(--gutter) 24px;
  min-height: 60vh;
}
.menu-main:focus { outline: none; }

.section-eyebrow { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 14px; }
.eyebrow-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
}

/* Öne çıkanlar — yatay kaydırma */
.featured-track {
  display: flex;
  gap: 12px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter) 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.featured-track::-webkit-scrollbar { display: none; }
.featured-track > li { flex: 0 0 auto; scroll-snap-align: start; }

.feature-card {
  display: block;
  width: min(68vw, 248px);
  padding: 0;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.feature-card:hover { border-color: var(--border-strong); }
.feature-card:active { transform: scale(0.985); }

.feature-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-media .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(11, 11, 16, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.feature-body { display: grid; gap: 4px; padding: 12px 14px 14px; }
.feature-name { font-family: var(--font-display); font-size: 17px; font-weight: 500; line-height: 1.25; }
.feature-price { font-size: 14px; font-weight: 600; color: var(--text-2); }

/* Kategori bölümleri */
.cat-section {
  padding-top: 30px;
  scroll-margin-top: calc(var(--toolbar-h) + 4px);
}
.cat-section + .cat-section { border-top: 1px solid var(--border); margin-top: 26px; }

.cat-cover {
  margin-bottom: 18px;
  aspect-ratio: 5 / 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
}
.cat-cover img { width: 100%; height: 100%; object-fit: cover; }

.cat-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cat-title {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.cat-count { flex-shrink: 0; font-size: 13px; color: var(--text-3); font-weight: 500; }
.cat-desc { margin-top: 6px; color: var(--text-2); font-size: 14.5px; }

.cat-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 14px;
}
.cat-empty > span { color: var(--text-3); }

/* Ürün kartı */
.product-list { display: grid; gap: 10px; margin-top: 16px; }

.product-card {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  min-height: 112px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.15s var(--ease);
}
button.product-card:hover { border-color: var(--border-strong); background: #181821; }
button.product-card:active { transform: scale(0.99); }

.product-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.product-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.product-head { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px 8px; }
.product-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.product-head .badge { margin-top: 1px; }
.product-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
}
.product-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: auto;
  padding-top: 4px;
}

.product-media {
  flex-shrink: 0;
  align-self: flex-start;
  width: 96px;
  height: 96px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }

.price { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: 0.01em; }
.price-muted { font-size: 13px; font-weight: 500; color: var(--text-3); }

.price-options {
  display: inline-grid;
  grid-template-columns: auto auto;
  column-gap: 14px;
  row-gap: 3px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.price-opt { display: contents; }
.price-opt-label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.price-opt-value { font-size: 14px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.product-foot:has(.price-options) { align-items: flex-end; }

.temp-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}
.temp-hot .icon { color: #E9A07A; }
.temp-cold .icon { color: #8FC3F0; }
.temp-both .icon:first-child { color: #E9A07A; }
.temp-both .icon:nth-child(2) { color: #8FC3F0; margin-left: -2px; }

/* İskelet (yükleniyor) */
.is-skeleton { pointer-events: none; }
.sk-line { display: block; height: 12px; width: 92%; border-radius: 6px; }
.sk-title { height: 18px; width: 52%; margin-bottom: 6px; }
.sk-short { width: 38%; }
.sk-heading { display: block; height: 24px; width: 46%; border-radius: 8px; }

/* Arama sonuçları */
.search-results { padding-top: 18px; }
.results-meta { font-size: 14px; color: var(--text-2); }
.results-meta strong { color: var(--text); }
.state-compact { padding-top: 40px; }

/* ─── Alt bilgi ─────────────────────────────────────────────────────────── */
.site-footer {
  max-width: var(--page-w);
  margin: 32px auto 0;
  padding: 36px var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 40px);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.footer-wordmark { font-size: 14px; color: var(--text-2); }

/* ─── Ürün detay sayfası (bottom sheet) ─────────────────────────────────── */
.sheet {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.sheet::backdrop {
  background: rgba(5, 5, 8, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fade-in 0.22s var(--ease);
}
.sheet[open] .sheet-panel { animation: sheet-up 0.3s var(--ease); }
.sheet.is-closing .sheet-panel { animation: sheet-down 0.18s ease-in forwards; }
.sheet.is-closing::backdrop { animation: fade-out 0.18s ease-in forwards; }

.sheet-panel {
  position: relative;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-lg);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.sheet-media {
  aspect-ratio: 4 / 3;
  max-height: 46vh;
  width: 100%;
  background: var(--surface-2);
  overflow: hidden;
}
.sheet-media img { width: 100%; height: 100%; object-fit: cover; }
.sheet-media .img-placeholder .icon { width: 40px; height: 40px; }

.sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(11, 11, 16, 0.66);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
}
.sheet-close:hover { background: rgba(11, 11, 16, 0.85); }

.sheet-content { padding: 22px 22px 30px; display: grid; gap: 12px; }
.sheet-category {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.sheet-title { font-family: var(--font-display); font-size: 28px; font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
.sheet-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.sheet-desc { color: var(--text-2); font-size: 15.5px; line-height: 1.6; }

.sheet-prices {
  margin-top: 8px;
  padding: 6px 16px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
}
.sheet-prices li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 0;
}
.sheet-prices li + li { border-top: 1px solid var(--border); }
.sheet-price-label { font-size: 15px; color: var(--text); font-weight: 500; }
.sheet-price-dots { flex: 1; border-bottom: 1px dotted var(--border-strong); transform: translateY(-4px); }
.sheet-price-value { font-size: 17px; font-weight: 700; }

@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes sheet-down { from { transform: translateY(0); } to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }

/* ─── Geniş ekranlar ────────────────────────────────────────────────────── */
@media (min-width: 760px) {
  .menu-page { --page-w: 1040px; --gutter: 32px; }
  .hero { padding-top: 76px; padding-bottom: 40px; }
  .hero-wordmark { font-size: 40px; }
  .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .product-media { width: 112px; height: 112px; }
  .feature-card { width: 280px; }
  .cat-title { font-size: 30px; }
  .cat-section { padding-top: 40px; }
  .cat-section + .cat-section { margin-top: 34px; }

  .sheet {
    inset: 0;
    margin: auto;
    width: min(560px, calc(100% - 48px));
    height: fit-content;
  }
  .sheet-panel { border-radius: 26px; border-bottom: 1px solid var(--border); max-height: 88vh; }
  .sheet[open] .sheet-panel { animation: pop-in 0.24s var(--ease); }
  .sheet.is-closing .sheet-panel { animation: fade-out 0.16s ease-in forwards; }
}
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (hover: none) {
  button.product-card:hover, .feature-card:hover { border-color: var(--border); background: var(--surface); }
}
