/*
 * liste.css — /liste: neyi nereden alacağını gösteren alışveriş listesi (06.10.2026 Sunai, iş 39). Eşi: js/liste.js
 * Tailwind derlemesine bağımsız (JIT tuzağı). Yalnız açık tema (Uyguno'da koyu tema yok).
 *
 * Tokenlar ana sayfa v3 ile aynı (css/anasayfa-v3.css :root) — bu sayfa o dosyayı yüklemediği için burada yerel:
 *   raf #f3f5f8 · fiş #fff · mürekkep #0f172a (17,8:1) · etiket #475569 (7,2:1) · çizgi #e2e8f0 · etkileşimli kenar #7c8ba1 (3,5:1) ·
 *   turuncu-koyu #c2410c (5,2:1) · kazanç #15803d (5,0:1) · uyarı #b45309 (5,0:1)
 * İMZA: market "durakları" tek bir rota çizgisiyle bağlı; her durak market renginde nokta, son durak kasa (toplam).
 *   Liste markette elde tutulur → büyük dokunma hedefleri (≥44 px), adet/alındı/sil tek elle.
 */
.ls {
  --raf: #f3f5f8; --fis: #fff; --murekkep: #0f172a; --etiket: #475569; --cizgi: #e2e8f0; --kenar-g: #7c8ba1;
  --turuncu-koyu: #c2410c; --kazanc: #15803d; --kazanc-zemin: #f0fdf4; --uyari: #b45309; --rota: #cbd5e1;
  --m: #64748b;
  min-height: 100svh; /* footer, liste gelince kaymasın (CLS) */
  background: var(--raf);
  color: var(--murekkep);
  font-variant-numeric: tabular-nums;
}
.ls [hidden] { display: none !important; }
.ls-kap { max-width: 760px; margin-inline: auto; padding: 20px 16px 120px; }

.m-bim { --m: #e30613; } .m-a101 { --m: #0097a7; } .m-sok { --m: #ffcb05; }
.m-migros { --m: #f37021; } .m-carrefoursa { --m: #0055a5; } .m-koop { --m: #00843d; }

/* ---------- Başlık ---------- */
.ls-bas { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ls-bas h1 { margin: 0; font-size: 1.75rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.ls-bas h1:focus { outline: none; }
.ls-ozet { margin: 4px 0 0; font-size: 1rem; color: var(--etiket); min-height: 24px; }
.ls-paylas { flex: none; }
.ls-paylas.is-gizli { visibility: hidden; } /* 39b: yer ayrılı, CLS 0 */

/* ---------- Paylaşılan liste bandı ---------- */
.ls-bant {
  margin-bottom: 20px; padding: 16px; border-radius: 16px;
  background: #fff7ed; border: 1px solid #fdba74;
}
.ls-bant-baslik { margin: 0; font-weight: 800; font-size: 1.0625rem; }
.ls-bant-metin { margin: 4px 0 12px; color: #7c2d12; font-size: .9375rem; line-height: 1.5; }
.ls-bant-eylem { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ls-bant-eylem.is-tek { grid-template-columns: minmax(0, 1fr); }
.ls-bant-eylem .eylem { white-space: normal; text-align: center; min-height: 56px; padding: 6px 12px; }

/* ---------- Kip seçici (segmentli radyo) ---------- */
.ls-kip {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  margin: 0 0 12px; padding: 4px; border: 0; border-radius: 16px; background: #e2e8f0;
}
.ls-kip-s { position: relative; display: block; cursor: pointer; }
.ls-kip-s input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ls-kip-s span {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 72px; padding: 8px 12px; border-radius: 12px; color: var(--etiket); /* 39b: alt satır 375 px'te 2 satıra sarılır → sabit 72 (kip 80) */
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.ls-kip-s strong { font-size: 1rem; line-height: 1.2; }
.ls-kip-s small { font-size: .8125rem; line-height: 1.3; }
.ls-kip-s input:checked + span { background: var(--fis); color: var(--murekkep); box-shadow: 0 1px 3px rgb(15 23 42 / .12); }
.ls-kip-s input:checked + span small { color: var(--etiket); }
.ls-kip-s input:focus-visible + span { outline: 2px solid #ea580c; outline-offset: 2px; }

/* ---------- Market seçimi (tek market) ---------- */
.ls-pazarlar { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.ls-pazarlar-baslik { padding: 0; margin-bottom: 8px; font-size: .875rem; font-weight: 700; color: var(--etiket); }
.ls-pazarlar-liste {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: -2px -2px 0;
  scrollbar-width: thin; overscroll-behavior-x: contain;
}
.ls-pazar {
  position: relative; flex: none;
  display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center;
  min-height: 64px; padding: 8px 14px 8px 12px; border-radius: 14px;
  background: var(--fis); border: 1px solid var(--cizgi); cursor: pointer;
}
.ls-pazar input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ls-pazar .ls-nokta { grid-row: 1 / span 3; }
.ls-pazar-ad { font-weight: 800; }
.ls-pazar-top { font-weight: 700; }
.ls-pazar-say { font-size: .8125rem; color: var(--etiket); }
.ls-pazar:has(input:checked) { border-color: var(--murekkep); box-shadow: inset 0 0 0 1px var(--murekkep); }
.ls-pazar:has(input:focus-visible) { outline: 2px solid #ea580c; outline-offset: 2px; }

/* ---------- Rota: duraklar + kasa ---------- */
.ls-rota { position: relative; padding-left: 30px; }
.ls-rota::before {
  content: ""; position: absolute; left: 10px; top: 14px; bottom: 28px; width: 2px;
  background: var(--rota); border-radius: 2px;
}
.ls-nokta {
  display: inline-block; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--m); box-shadow: 0 0 0 4px var(--raf), inset 0 0 0 1px rgb(15 23 42 / .15);
}
.ls-durak { margin-bottom: 20px; }
.ls-durak-bas { position: relative; display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 8px; margin-bottom: 8px; min-height: 28px; }
.ls-durak-bas .ls-nokta { position: absolute; left: -30px; top: 3px; }
.ls-durak-ad { margin: 0; font-size: 1.25rem; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; }
.ls-durak-alt { font-size: .875rem; color: var(--etiket); }
.ls-ara { margin-left: auto; font-weight: 800; font-size: 1.0625rem; }
.ls-durak--bos .ls-nokta { background: var(--raf); box-shadow: 0 0 0 4px var(--raf), inset 0 0 0 2px var(--kenar-g); }

.ls-urunler {
  margin: 0; padding: 0; list-style: none;
  background: var(--fis); border: 1px solid var(--cizgi); border-radius: 16px; overflow: hidden;
}
.ls-urun {
  display: grid; grid-template-columns: 44px 56px minmax(0, 1fr); column-gap: 10px; row-gap: 6px;
  align-items: start; padding: 12px 12px 10px 8px;
}
.ls-urun + .ls-urun { border-top: 1px solid var(--cizgi); }
.ls-urun.is-salt { grid-template-columns: 56px minmax(0, 1fr); padding-left: 12px; }

.ls-al { position: relative; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; margin-top: 6px; }
.ls-al input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ls-al-kutu {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--kenar-g); background: var(--fis); color: transparent;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.ls-al-kutu svg { width: 18px; height: 18px; }
.ls-al input:checked + .ls-al-kutu { background: var(--kazanc); border-color: var(--kazanc); color: #fff; }
.ls-al input:focus-visible + .ls-al-kutu { outline: 2px solid #ea580c; outline-offset: 3px; }

.ls-gorsel {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px;
  border-radius: 12px; background: #f8fafc; border: 1px solid #f1f5f9; overflow: hidden;
}
.ls-gorsel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; }
.ls-gorsel-yer { width: 24px; height: 24px; color: #94a3b8; }

.ls-bilgi { min-width: 0; padding-top: 2px; }
.ls-ad {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; /* markette tam ad okunmalı */
  font-weight: 700; font-size: 1rem; line-height: 1.35; color: var(--murekkep); text-decoration: none;
}
a.ls-ad:hover { text-decoration: underline; text-underline-offset: 3px; }
a.ls-ad:focus-visible { outline: 2px solid #ea580c; outline-offset: 2px; border-radius: 4px; }
.ls-detay { margin: 2px 0 0; font-size: .875rem; line-height: 1.45; color: var(--etiket); }
.ls-eski { color: var(--etiket); }
.ls-not { margin: 2px 0 0; font-size: .875rem; color: var(--uyari); font-weight: 600; }

.ls-alt-satir { grid-column: 2 / -1; display: flex; align-items: center; gap: 8px; }
.ls-urun.is-salt .ls-alt-satir { grid-column: 2; }
.ls-adet { display: inline-flex; align-items: center; border: 1px solid var(--kenar-g); border-radius: 999px; background: var(--fis); }
.ls-adet button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 999px; background: none; color: var(--murekkep); cursor: pointer;
}
.ls-adet button svg { width: 18px; height: 18px; }
.ls-adet button:hover:not(:disabled) { background: #f1f5f9; }
.ls-adet button:disabled { color: #94a3b8; cursor: default; }
.ls-adet button:focus-visible { outline: 2px solid #ea580c; outline-offset: -2px; }
.ls-adet output { min-width: 24px; text-align: center; font-weight: 800; font-size: 1rem; }
.ls-adet-salt { font-size: .9375rem; color: var(--etiket); font-weight: 600; }
.ls-tutar { margin-left: auto; font-weight: 800; font-size: 1.0625rem; white-space: nowrap; }
.ls-tutar--yok { color: var(--etiket); font-weight: 600; }
.ls-sil {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 999px; background: none; color: var(--etiket); cursor: pointer;
}
.ls-sil svg { width: 20px; height: 20px; }
.ls-sil:hover { background: #fef2f2; color: #b91c1c; }
.ls-sil:focus-visible { outline: 2px solid #ea580c; outline-offset: 2px; }

/* Alındı: üstü çizili, solgun (metin yine ≥4,5:1: #64748b fiş üstünde 4,8:1) */
.ls-urun.is-alindi .ls-ad, .ls-urun.is-alindi .ls-tutar { color: #64748b; text-decoration: line-through; text-decoration-thickness: 2px; }
.ls-urun.is-alindi .ls-gorsel { opacity: .45; filter: grayscale(1); }

/* ---------- Kasa (son durak) ---------- */
.ls-kasa { position: relative; padding: 16px; border-radius: 16px; background: var(--murekkep); color: #fff; }
.ls-kasa > .ls-nokta { position: absolute; left: -30px; top: 18px; background: var(--murekkep); box-shadow: 0 0 0 4px var(--raf); }
.ls-kasa-ust { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ls-kasa h2 { margin: 0; font-size: 1.125rem; font-weight: 700; }
.ls-toplam { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.ls-kasa p { margin: 6px 0 0; font-size: .9375rem; line-height: 1.5; color: #cbd5e1; }
.ls-kasa .ls-kasa-alt { margin-top: 0; }
.ls-kasa .ls-tasarruf { color: #86efac; font-size: 1.0625rem; font-weight: 600; }
.ls-kasa .ls-tasarruf strong { color: #bbf7d0; font-weight: 800; }
.ls-kasa .ls-uyari { color: #fcd34d; }
.ls-kasa .ls-dipnot { margin-top: 10px; font-size: .8125rem; color: #94a3b8; }

.ls-son { display: flex; justify-content: center; margin-top: 24px; }
.ls-temizle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 0; border-radius: 999px; background: none; color: #b91c1c; font: inherit; font-weight: 700; cursor: pointer;
}
.ls-temizle svg { width: 20px; height: 20px; }
.ls-temizle:hover { background: #fef2f2; }
.ls-temizle:focus-visible { outline: 2px solid #ea580c; outline-offset: 2px; }

/* ---------- Boş / hata / yükleniyor ---------- */
.ls-bos {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 40px 20px; border-radius: 20px; background: var(--fis); border: 1px solid var(--cizgi);
}
.ls-bos-ikon { width: 56px; height: 56px; color: var(--turuncu-koyu); }
.ls-bos h2 { margin: 12px 0 4px; font-size: 1.25rem; font-weight: 800; }
.ls-bos p { margin: 0 0 20px; max-width: 34ch; color: var(--etiket); line-height: 1.5; }
.ls-bos .eylem { text-decoration: none; min-width: 180px; }
.ls-iskelet { display: grid; gap: 12px; padding-left: 30px; }
.ls-iskelet .ls-iskelet-kip { height: 80px; margin: 0 0 0 -30px; } /* kip seçicinin yeri (64 + 12 boşluk = kip 64 + alt 12) */
.ls-iskelet span { display: block; height: 96px; border-radius: 16px; background: linear-gradient(90deg, #e9edf2 0%, #f4f6f9 50%, #e9edf2 100%); background-size: 200% 100%; animation: ls-parilti 1.2s linear infinite; }
@keyframes ls-parilti { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.ls-noscript { padding: 16px; background: #fffbeb; border-radius: 12px; color: #7c2d12; }

/* ---------- Geri al ---------- */
.ls-geri {
  position: fixed; z-index: 90; left: 16px; right: 16px; /* çerez bandı (80) üstünde: kısa ömürlü, kullanıcının kendi eylemi */
  bottom: calc(64px + 12px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 12px; max-width: 520px; margin-inline: auto;
  padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--murekkep); color: #fff;
  box-shadow: 0 10px 30px rgb(15 23 42 / .3);
  animation: ls-gel .2s ease-out;
}
.ls-geri-metin { flex: 1; margin: 0; font-size: .9375rem; line-height: 1.4; }
.ls-geri-dugme {
  flex: none; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px;
  background: transparent; color: #fdba74; font: inherit; font-weight: 800; cursor: pointer;
}
.ls-geri-dugme:hover { background: rgb(255 255 255 / .08); }
.ls-geri-dugme:focus-visible { outline: 2px solid #fdba74; outline-offset: 2px; }
@keyframes ls-gel { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (min-width: 720px) {
  .ls-kap { padding-top: 32px; }
  .ls-bas h1 { font-size: 2.25rem; }
  .ls-rota { padding-left: 40px; }
  .ls-rota::before { left: 14px; }
  .ls-durak-bas .ls-nokta, .ls-kasa > .ls-nokta { left: -40px; }
  .ls-iskelet { padding-left: 40px; }
  .ls-iskelet .ls-iskelet-kip { margin-left: -40px; }
  .ls-urun { grid-template-columns: 44px 64px minmax(0, 1fr) auto; align-items: center; padding: 10px 12px 10px 8px; }
  .ls-urun.is-salt { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .ls-gorsel { width: 64px; height: 64px; }
  .ls-alt-satir, .ls-urun.is-salt .ls-alt-satir { grid-column: auto; }
  .ls-al { margin-top: 0; }
  .ls-tutar { min-width: 96px; text-align: right; }
}
@media (min-width: 1024px) {
  .ls-geri { bottom: 24px; }
  .ls-kap { padding-bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .ls-iskelet span { animation: none; }
  .ls-geri { animation: none; }
  .ls-kip-s span, .ls-al-kutu { transition: none; }
}

/* 11.10.2026 Sunai — durak başlığı ve market seçicide ad yerine LOGO (alt = ad; js/liste.js mkLogo) */
.ls-durak--logo .ls-durak-bas { align-items: center; }
.ls-durak-ad .ls-mlogo { display: block; }
.ls-pazar-ad .ls-mlogo { display: block; }
.ls-pazar-ad { display: flex; align-items: center; min-height: 18px; }

/* 11.10.2026 Sunai tur2: ?v= yenileme (tur1 ACL penceresinde 404 önbelleğe girmiş olabilir) */
