/* ===========================================================
   MOLAMI — QR Menü, 2026 tasarımı
   Bootstrap / jQuery / slick / icon-font bağımlılığı yok.
   Tamamen mobil öncelikli, tek dosya, sistem fontları.
   =========================================================== */

:root {
  --brand: #a73334;
  --brand-dark: #7c2527;
  --brand-darker: #5e1b1c;
  --brand-tint: #fbeceb;
  --gold: #b98a4d;
  --ink: #2a211f;
  --muted: #8a7d78;
  --line: #ece3df;
  --paper: #fffdfb;
  --cream: #faf5f0;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px -12px rgba(90, 30, 30, 0.28);
  --shadow-sm: 0 2px 10px -4px rgba(90, 30, 30, 0.18);
  --nav-h: 68px;
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  position: relative;
}

/* ---------- Üst başlık ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar .back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  flex: 0 0 auto;
}
.topbar .back svg { width: 18px; height: 18px; }
.topbar h1 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.topbar .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

.brand-header {
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 22px 20px 26px;
  text-align: center;
}
.brand-header img { height: 46px; margin: 0 auto 8px; }
.brand-header .tagline { font-family: var(--font-display); font-style: italic; font-size: 14px; opacity: .92; }

/* ---------- Grid / kartlar ---------- */
.section { padding: 16px; }
.section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0 14px;
  color: var(--ink);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cat-card {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  position: relative;
}
.cat-card .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--brand-tint); }
.cat-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-card .label {
  padding: 10px 12px;
  font-weight: 600;
  font-size: 14.5px;
  text-align: center;
}
.cat-card--fav { position: relative; }
.cat-card--fav .label { text-align: left; }
.cat-card--fav .fav-price { display: block; font-weight: 700; color: var(--brand-dark); margin-top: 4px; }

/* ---------- Kategori chip şeridi ---------- */
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Ürün liste kartı ---------- */
.product-list { display: flex; flex-direction: column; gap: 12px; }
.product-card {
  display: flex;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.product-card .thumb {
  flex: 0 0 108px;
  width: 108px;
  height: 108px;
  background: var(--brand-tint);
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { flex: 1; padding: 10px 12px 10px 0; min-width: 0; }
.product-card .name { font-weight: 700; font-size: 15px; margin: 2px 0 4px; }
.product-card .desc {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .price { font-weight: 700; color: var(--brand-dark); font-size: 14.5px; }
.badge-new {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  z-index: 2;
  letter-spacing: .02em;
}

/* ---------- Favori kalp butonu ---------- */
.like-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: none;
  cursor: pointer;
}
.like-btn svg { width: 17px; height: 17px; stroke: var(--brand); fill: none; transition: fill .15s, stroke .15s; }
.like-btn.is-active svg { fill: var(--brand); stroke: var(--brand); }

/* ---------- Ürün detay grid kartları (2 kolon, kompakt) ---------- */
.grid-2 .product-mini { grid-column: span 1; }

/* ---------- Ürün detay ---------- */
.detail-hero { position: relative; }
.detail-hero .thumb { width: 100%; aspect-ratio: 1 / 1; background: var(--brand-tint); }
.detail-hero .thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-body { padding: 18px 16px 8px; }
.detail-body .name { font-family: var(--font-display); font-size: 23px; font-weight: 700; margin: 0 0 8px; }
.detail-body .desc { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0 0 14px; }
.detail-body .price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  margin-bottom: 14px;
}
.detail-body .price-row .price { font-size: 22px; font-weight: 700; color: var(--brand-dark); }
.detail-body .eklenti { font-size: 13.5px; color: var(--ink); background: var(--cream); padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; }

.allergen-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.allergen-row img {
  width: 32px;
  height: 32px;
  padding: 5px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid var(--line);
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.btn svg { width: 18px; height: 18px; }
.btn.is-active { background: var(--brand-darker); }

/* ---------- Popup (alerjen açıklama) ---------- */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 15, 15, .55);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
}
.popup-overlay.show { display: flex; }
.popup-content {
  background: #fff;
  width: 100%;
  max-width: 560px;
  border-radius: 18px 18px 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  font-size: 14.5px;
  line-height: 1.5;
}

/* ---------- Boş durum ---------- */
.empty-state { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty-state svg { width: 46px; height: 46px; stroke: var(--brand); margin-bottom: 14px; }
.empty-state .t1 { font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.empty-state a.btn { max-width: 220px; margin: 18px auto 0; }

/* ---------- İletişim ---------- */
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.contact-card .map { width: 100%; aspect-ratio: 16/10; background: var(--cream); }
.contact-card .map iframe, .contact-card .map * { width: 100% !important; height: 100% !important; border: 0; }
.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.contact-row svg { width: 18px; height: 18px; stroke: var(--brand); flex: 0 0 auto; margin-top: 1px; }

/* ---------- Form ---------- */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--cream);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
}
.form-control:focus { outline: none; border-color: var(--brand); background: #fff; }
textarea.form-control { min-height: 100px; resize: vertical; }

/* ---------- Alt navigasyon ---------- */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 560px;
  height: var(--nav-h);
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 50;
  box-shadow: 0 -6px 20px -10px rgba(90,30,30,.2);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  flex: 1;
  padding: 6px 2px;
}
.bottom-nav a svg { width: 21px; height: 21px; stroke: currentColor; fill: none; }
.bottom-nav a.active { color: var(--brand); }
.bottom-nav a.home-fab {
  margin-top: -26px;
  color: #fff;
}
.bottom-nav a.home-fab .fab-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px -6px rgba(167,51,52,.6);
  margin-bottom: 2px;
}
.bottom-nav a.home-fab svg { width: 22px; height: 22px; }

/* ---------- Splash (Default.aspx) ---------- */
.splash {
  min-height: 100vh;
  min-height: 100svh;
  height: 100dvh;
  background: linear-gradient(170deg, var(--brand) 0%, var(--brand-dark) 60%, var(--brand-darker) 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding: 24px 24px calc(16px + env(safe-area-inset-bottom, 0px));
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.splash-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.splash img.logo { width: min(60vw, 260px); margin-bottom: 18px; }
.splash .tagline { color: #fff; font-family: var(--font-display); font-style: italic; font-size: 16px; opacity: .95; line-height: 1.5; }
.splash-cta { flex: 0 0 auto; }
.splash-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: var(--brand-dark) !important;
  font-weight: 700;
  font-size: 16px;
  padding: 15px;
  border-radius: 999px;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.35);
}
.splash-cta a svg { width: 19px; height: 19px; }

.skeleton {
  background: linear-gradient(90deg, var(--cream) 25%, #f0e6e0 37%, var(--cream) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

@media (min-width: 420px) {
  .product-card .thumb { flex-basis: 120px; width: 120px; height: 120px; }
}
