/* checkout.css — M-01..M-06 Müşteri Checkout Akışı */

/* ── Layout ─────────────────────────────────────────────────────────────── */
.page.checkout { min-height: 100vh; background: var(--bg); padding-bottom: 60px; }

.ch-wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.ch-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0 12px;
}
.ch-geri-link {
  background: none; border: none; font: inherit; font-size: 13px;
  color: var(--muted); cursor: pointer; transition: color .15s;
  display: flex; align-items: center; gap: 4px;
}
.ch-geri-link:hover { color: var(--text); }
.ch-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }

/* ── Adım Göstergesi ─────────────────────────────────────────────────────── */
.ch-adimlar {
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: 20px 0 32px; position: relative;
}
.ch-adim {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--muted); position: relative;
}
.ch-adim.active { color: var(--text); }
.ch-adim.done { color: var(--ok); }
.ch-adim-no {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; transition: all .2s;
  flex-shrink: 0;
}
.ch-adim.active .ch-adim-no {
  border-color: var(--accent); background: var(--accent); color: var(--on-accent);
}
.ch-adim.done .ch-adim-no {
  border-color: var(--ok); background: var(--ok); color: #fff;
}
.ch-adim-lbl { white-space: nowrap; }
.ch-adim-ciz {
  width: 48px; height: 2px; background: var(--border); margin: 0 10px; flex-shrink: 0;
  border-radius: 2px;
}
.ch-adim.done + .ch-adim .ch-adim-ciz { background: var(--ok); }

/* ── İçerik iki kolon ─────────────────────────────────────────────────────── */
.ch-icerik { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: flex-start; }
.ch-sol { min-width: 0; }
.ch-sag { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--nav-h) + 16px); }

/* ── Kart ─────────────────────────────────────────────────────────────────── */
.ch-kart {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
}
.ch-baslik { font-family: var(--display); font-size: 20px; font-weight: 700; margin-bottom: 22px; }

/* ── M-01 Sepet ────────────────────────────────────────────────────────────── */
.ch-urun-kart {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2); padding: 18px; margin-bottom: 20px;
}
.ch-urun-ust { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ch-urun-ad { font-weight: 700; font-size: 16px; }
.ch-urun-alt { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.ch-urun-fiyat { font-family: var(--display); font-size: 26px; font-weight: 800; flex-shrink: 0; }
.ch-urun-fiyat em { font-size: 12px; font-weight: 500; color: var(--muted); font-style: normal; }
.ch-urun-ozell {
  list-style: none; padding: 0; margin: 14px 0 0;
  display: flex; flex-direction: column; gap: 6px;
}
.ch-urun-ozell li { font-size: 13px; color: var(--text-2); }
.ch-ozet-satir {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; padding: 12px 0; border-top: 1px solid var(--border);
}
.ch-ozet-tutar { font-family: var(--display); font-size: 22px; font-weight: 800; color: var(--accent); }
.ch-ozet-not { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.ch-guvenli {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--muted); margin-top: 12px; justify-content: center;
}
.ch-guvenli svg { color: var(--ok); }

/* ── M-02 Form ─────────────────────────────────────────────────────────────── */
.ch-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.ch-form-alan { display: flex; flex-direction: column; gap: 5px; }
.ch-form-lbl { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.ch-zorunlu { color: var(--danger); margin-left: 2px; }
.ch-input {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 14px;
  color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.ch-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ch-input.hata { border-color: var(--danger); }
.ch-hata-msg { font-size: 12px; color: var(--danger); }
.ch-toggle-row { display: flex; gap: 8px; }
.ch-toggle {
  flex: 1; padding: 9px; border-radius: 8px; font: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; border: 1px solid var(--border);
  background: transparent; color: var(--text-2); transition: all .15s;
}
.ch-toggle.active {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent);
}
.ch-form-kvkk { font-size: 13px; color: var(--text-2); margin: 16px 0 20px; line-height: 1.5; }
.ch-form-kvkk a { color: var(--accent); text-decoration: none; }
.ch-form-kvkk a:hover { text-decoration: underline; }

/* ── M-03 Ödeme ────────────────────────────────────────────────────────────── */
.ch-kk-preview {
  background: linear-gradient(135deg, var(--accent-deep, #1b4dd1) 0%, var(--accent, #2f6dff) 60%, var(--accent-bright, #5b8dff) 100%);
  border-radius: 14px; padding: 22px 22px 18px; margin-bottom: 22px; position: relative;
  overflow: hidden; min-height: 130px; color: #fff;
}
.ch-kk-preview::before {
  content: ""; position: absolute; top: -30px; right: -30px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.ch-kk-cip {
  width: 38px; height: 28px; border-radius: 5px;
  background: linear-gradient(135deg, #d4af37, #f5e27a, #c8a800);
  margin-bottom: 18px;
}
.ch-kk-no { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: 0.12em; }
.ch-kk-alt { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; font-weight: 600; }
.ch-banner-hata {
  background: rgba(232,80,58,.1); border: 1px solid rgba(232,80,58,.25);
  border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--danger);
  margin-bottom: 16px;
}
.ch-iyzico-wrap { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 12px; }
.ch-iyzico-frame { width: 100%; height: 520px; border: none; background: var(--surface); }

/* ── M-05/M-06 Sonuç ────────────────────────────────────────────────────────── */
.ch-sonuc-basarili { text-align: center; border-color: rgba(63,174,116,.3); background: rgba(63,174,116,.04); }
.ch-sonuc-basarisiz { text-align: center; border-color: rgba(232,80,58,.25); background: rgba(232,80,58,.03); }
.ch-sonuc-ikon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(63,174,116,.15); color: #3fae74;
  font-size: 28px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.ch-sonuc-ikon.fail { background: rgba(232,80,58,.12); color: var(--danger); }
.ch-sonuc-baslik { font-family: var(--display); font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.ch-sonuc-alt { font-size: 15px; color: var(--text-2); line-height: 1.6; max-width: 420px; margin: 0 auto 20px; }
.ch-sonuc-ref { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.ch-sonuc-ref code { font-family: monospace; color: var(--text); }
.ch-sonuc-notlar { display: flex; flex-direction: column; gap: 8px; max-width: 380px; margin: 0 auto 8px; text-align: left; }
.ch-sonuc-not-item { font-size: 13.5px; color: var(--text-2); padding: 10px 14px; background: var(--surface-2); border-radius: 8px; }

/* ── Sağ: Özet & Güven Kutusu ────────────────────────────────────────────── */
.ch-ozet-kart {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px;
}
.ch-ozet-baslik { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.ch-ozet-item { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; }
.ch-ozet-item.muted { color: var(--muted); font-size: 12.5px; }
.ch-ozet-f { font-weight: 700; }
.ch-ozet-sep { height: 1px; background: var(--border); margin: 10px 0; }
.ch-ozet-toplam { display: flex; justify-content: space-between; font-weight: 800; font-size: 16px; padding: 4px 0; }
.ch-ozet-not-kk { font-size: 12px; color: var(--muted); margin-top: 12px; display: flex; align-items: center; gap: 5px; }
.ch-ozet-not-kk svg { color: var(--ok); }

.ch-guven-kutu {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px;
}
.ch-guven-baslik { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.ch-guven-liste { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.ch-guven-liste li { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.ch-guven-liste li::before { content: "✓"; color: var(--ok); font-weight: 700; flex-shrink: 0; }

/* ── Paylaşılan ─────────────────────────────────────────────────────────────── */
.ch-btn-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ch-hata { padding: 20px; text-align: center; color: var(--danger); font-size: 14px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .ch-icerik { grid-template-columns: 1fr; }
  .ch-sag { position: static; }
  .ch-adimlar { gap: 0; }
  .ch-adim-lbl { display: none; }
  .ch-adim-ciz { width: 30px; }
  .ch-form-grid { grid-template-columns: 1fr; }
  .ch-kart { padding: 20px 16px; }
}

/* ── Gerçek İyzico Ödeme Ekranı (M-03) ── */
.ch-odeme-kart {
  min-height: 420px;
}

/* Tutar banner — TCMB kur */
.ch-tutar-banner {
  background: linear-gradient(135deg, rgba(var(--accent-rgb,99,102,241),.08) 0%, rgba(63,174,116,.06) 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.ch-tutar-ana {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.ch-tutar-try {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ch-tutar-usd {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ch-tutar-not {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* İyzico form alanı */
.ch-iyzico-alan {
  min-height: 200px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

/* İyzico form içeriği: genişlik ve scroll */
.ch-iyzico-alan iframe,
.ch-iyzico-alan > div[id*="iyzico"],
.ch-iyzico-alan > form {
  width: 100% !important;
  min-height: 380px;
}

/* Yükleniyor */
.ch-yukle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 14px;
}
.ch-yukle-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ch-spin .7s linear infinite;
}
@keyframes ch-spin { to { transform: rotate(360deg); } }
.ch-yukle-yazi {
  font-size: 13.5px;
  color: var(--muted);
}

/* İyzico alt bilgi */
.ch-iyzico-bilgi {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 12px;
  padding: 0 2px;
}
