/* İstanbul Alacart — polished light menu + premium chips */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6f4f1;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6560;
  --line: rgba(26, 26, 26, 0.08);
  --line2: rgba(26, 26, 26, 0.12);
  --shadow: 0 10px 30px rgba(26, 26, 26, 0.08);
  --shadow-sm: 0 2px 10px rgba(26, 26, 26, 0.06);
  --radius: 18px;
  --pill: 999px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.45;
}
body { padding-bottom: calc(16px + var(--safe-b)); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }

/* ===== HEADER ===== */
.site-header {
  position: relative;
  z-index: 50;
  padding: calc(12px + var(--safe-t)) 12px 12px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-center { text-align: center; margin-bottom: 10px; }
.header-center a { display: inline-block; }
.logo {
  max-height: 56px;
  margin: 0 auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.08));
}
.logo-text {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.header-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Action chips row — horizontal scroll on mobile */
.header-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 720px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.header-actions::-webkit-scrollbar { display: none; }

/* ===== THE CHIPS ===== */
.h-chip {
  appearance: none !important;
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px !important;
  border-radius: var(--pill) !important;
  border: 1px solid var(--line2) !important;
  background: #fff !important;
  color: #222 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.h-chip svg { flex-shrink: 0; }
.h-chip:active { transform: scale(0.96); }

.h-chip--wa {
  background: #25D366 !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35) !important;
}
.h-chip--ig {
  background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(221, 42, 123, 0.3) !important;
}
.h-chip--maps {
  background: #4285F4 !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(66, 133, 244, 0.3) !important;
}

/* ===== LANGUAGE PILLS ===== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: #eeeae4;
  border-radius: var(--pill);
}
.lang-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px !important;
  border-radius: var(--pill) !important;
  border: none !important;
  background: transparent !important;
  color: #444 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.lang-pill img {
  width: 18px !important;
  height: 13px !important;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}
.lang-pill.is-active {
  background: #1a1a1a !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

/* legacy flag-btn fallback */
.flag-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px !important;
  border-radius: var(--pill) !important;
  border: 1px solid var(--line2) !important;
  background: #fff !important;
  color: #333 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
.flag-btn.active {
  background: #1a1a1a !important;
  color: #fff !important;
  border-color: #1a1a1a !important;
}

/* ===== ANNOUNCEMENT ===== */
.announcement-bar {
  background: #1a1a1a;
  color: #fff;
  padding: 11px 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.announcement-text {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-left 16s linear infinite;
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 14px 28px;
}
.cat-header h2,
.categories h2,
.favorites h2 {
  margin: 4px 0 14px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cat-card {
  position: relative;
  min-height: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #2a2a2a;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(0,0,0,.72) 100%);
  z-index: 0;
}
.cat-card {
  transition: transform .2s ease, box-shadow .2s ease;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(26,26,26,0.12);
}
.cat-card:active { transform: scale(0.97); }
.cat-card.full { grid-column: 1 / -1; min-height: 168px; }
.cat-card.vertical { min-height: 188px; }
.cat-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 14px 12px;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}

.cat-title-bar {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 14px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cat-title-bar h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.back-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--pill);
  background: #fff;
  border: 1px solid var(--line2);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
}

.menu-list { display: grid; gap: 12px; }
.menu-card {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.menu-img {
  width: 88px; height: 88px;
  border-radius: 14px;
  background: #ece8e3;
  background-size: cover;
  background-position: center;
}
.menu-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.menu-name {
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.menu-meta {
  font-size: 12.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-price-right {
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
  color: #1a1a1a;
  align-self: start;
  padding-top: 4px;
}

.fav-list {
  display: flex; gap: 10px; overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.fav-list::-webkit-scrollbar { display: none; }
.fav-card {
  min-width: 220px; display: flex;
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden;
}
.fav-img { width: 80px; height: 80px; background-size: cover; background-position: center; background-color: #eee; }
.fav-info { padding: 10px; display: flex; flex-direction: column; justify-content: center; }
.fav-name { font-weight: 700; }

.var-list {
  list-style: none; margin: 8px 0 0; padding: 0;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff;
}
.var-list .var-head, .var-list .var-item {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  align-items: center; padding: 10px 12px;
}
.var-list .var-head { font-weight: 700; background: #faf8f5; border-bottom: 1px solid var(--line); }
.var-list .var-item { border-bottom: 1px solid #f3f0eb; }
.var-list .var-item:last-child { border-bottom: 0; }

.site-footer {
  margin-top: 16px;
  padding: 28px 16px calc(24px + var(--safe-b));
  text-align: center;
  border-top: 1px solid var(--line);
}
.footer-center { font-weight: 700; font-size: 0.95rem; color: var(--text); margin-bottom: 10px; }
.footer-social-note {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 12px;
}
.footer-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1a1a1a;
  margin: 8px 0;
  text-decoration: none;
}
.footer-phone:hover { color: #25D366; }
.footer-socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}
.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #f0ece6;
  color: #333;
  transition: transform .15s ease, background .15s ease;
}
.footer-socials a:hover { transform: scale(1.08); background: #e8e2da; }
.footer-socials a.ig { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); color: #fff; }

/* Alerjen & kalori stilleri */
.menu-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  align-items: center;
}
.kcal-badge {
  font-size: 11px;
  font-weight: 700;
  background: #f0f7e8;
  color: #3d6b1e;
  padding: 2px 8px;
  border-radius: 999px;
}
.allergen-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.allergen-tag {
  font-size: 10px;
  font-weight: 600;
  background: #fff3e0;
  color: #b45309;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #fed7aa;
}
.ingredients-text {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.35;
}

.search-bar { display: none; position: sticky; top: 0; z-index: 40; background: #fff; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.search-bar.active { display: block; }
.search-bar input { width: 100%; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 12px; background: var(--bg); }
.search-results { display: none; margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.modal { position: fixed; inset: 0; display: none; z-index: 80; }
.modal.active { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-content {
  position: relative; max-width: 420px; margin: 18vh auto 0;
  margin-left: 16px; margin-right: 16px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border: none; border-radius: 999px;
  background: #eee; cursor: pointer;
}
.modal-body { padding: 20px; display: grid; gap: 12px; justify-items: center; }

html[dir="rtl"] .menu-card { grid-template-columns: auto 1fr 88px; }
html[dir="rtl"] .cat-title { text-align: right; }

@media (min-width: 480px) {
  .header-actions { justify-content: center; flex-wrap: wrap; overflow: visible; }
  .cat-card { min-height: 152px; }
  .menu-card { grid-template-columns: 104px 1fr auto; }
  .menu-img { width: 104px; height: 104px; }
}
@media (min-width: 768px) {
  .container { padding: 20px 20px 40px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .cat-card { min-height: 180px; }
  .cat-card.full { grid-column: span 2; min-height: 210px; }
  .logo { max-height: 64px; }
  .h-chip { font-size: 13px !important; padding: 9px 16px !important; }
}

/* Mobil: tüm chip'ler görünsün, 2 satıra yayılsın */
@media (max-width: 479px) {
  .header-toolbar {
    gap: 10px;
  }
  .header-actions {
    flex-wrap: wrap !important;
    justify-content: center !important;
    overflow: visible !important;
    gap: 7px;
    padding: 2px 4px 4px;
    max-width: 100%;
  }
  .h-chip {
    min-height: 36px !important;
    padding: 7px 11px !important;
    font-size: 11.5px !important;
    gap: 5px !important;
  }
  .h-chip svg {
    width: 14px !important;
    height: 14px !important;
  }
  .lang-switch {
    gap: 4px;
    padding: 3px;
  }
  .lang-pill {
    min-height: 30px !important;
    padding: 5px 10px !important;
    font-size: 11.5px !important;
    gap: 4px !important;
  }
  .lang-pill img {
    width: 16px !important;
    height: 12px !important;
  }

  /* Ürün açıklaması mobilde daha fazla satır göstersin */
  .menu-meta {
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}

@media (max-width: 360px) {
  .h-chip {
    padding: 6px 9px !important;
    font-size: 11px !important;
  }
  .h-chip span {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
