/* Sipariş / fiyat hesaplama sayfası (siparis.php) */
.sp-sayfa {
  --sp-navy: #082B5C;
  --sp-navy-2: #0d3a78;
  --sp-teal: #00B8A9;
  --sp-teal-btn: #09958a;
  --sp-teal-koyu: #0f766e;
  --sp-cizgi: #e2e8f0;
  --sp-cizgi-2: #eef2f7;
  --sp-soluk: #5b6b7e;
  --sp-yazi: #1e293b;
  width: min(1320px, 100%);
  padding-top: 32px;
}

/* Başlık ve adımlar */
.sp-bas {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 32px;
  margin-bottom: 22px;
}
.sp-bas__metin { max-width: 680px; }
.sp-bas h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 1.15rem + 1.6vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--sp-navy);
}
.sp-bas p:not(.saas-kicker) { margin: 0; color: var(--sp-soluk); font-weight: 500; line-height: 1.6; }
.sp-adimlar.fx-adimlar { gap: 6px; flex-wrap: wrap; }
.sp-adimlar.fx-adimlar li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 7px;
  border: 1px solid var(--sp-cizgi);
  border-radius: 999px;
  background: #fff;
  color: var(--sp-soluk);
  font-size: 0.84rem;
  font-weight: 700;
}
.sp-adimlar.fx-adimlar li b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2f7;
  color: var(--sp-soluk);
  font-size: 0.76rem;
}
.sp-adimlar.fx-adimlar li.is-aktif { border-color: var(--sp-teal); background: #effaf8; color: var(--sp-teal-koyu); }
.sp-adimlar.fx-adimlar li.is-aktif b { background: var(--sp-teal-btn); color: #fff; }
.sp-adimlar.fx-adimlar li.is-tamam { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.sp-adimlar.fx-adimlar li.is-tamam b { background: #22c55e; color: #fff; }

.sp-kampanya.fx-kampanya {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: none;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 14px;
  text-align: left;
}

/* Düzen */
.sp-duzen {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(380px, 0.95fr);
  gap: 20px;
  align-items: start;
}
.sp-sol { min-width: 0; display: grid; gap: 16px; }
.sp-sag {
  min-width: 0;
  display: grid;
  gap: 16px;
  position: sticky;
  top: calc(var(--s-nav-h, 72px) + 16px);
}

/* Paneller */
.sp-panel {
  background: #fff;
  border: 1px solid var(--sp-cizgi);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 40px -32px rgba(8, 43, 92, 0.45);
}
.sp-panel[hidden] { display: none; }
.sp-panel__bas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 18px;
  background: linear-gradient(90deg, var(--sp-navy), var(--sp-navy-2));
  color: #fff;
}
.sp-panel__bas h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  color: #fff;
}
.sp-panel__bas h2 .bi { color: #7ee8df; }
.sp-panel__etiket {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #d7e6f5;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.sp-panel__etiket:empty { display: none; }
.sp-gizli {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Arama */
.sp-ara {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 16px 6px;
  padding: 0 14px;
  min-height: 46px;
  border: 1.5px solid #d6e0ea;
  border-radius: 12px;
  background: #fbfcfe;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.sp-ara .bi { color: #94a3b8; }
.sp-ara input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: var(--sp-yazi);
}
.sp-ara:focus-within { border-color: var(--sp-teal); background: #fff; box-shadow: 0 0 0 4px rgba(0, 184, 169, 0.15); }

/* Katalog tablosu */
.sp-tablo { padding: 6px 0 4px; }
.sp-tablo__kafa,
.sp-satir {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 64px 112px 112px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}
.sp-tablo__kafa {
  padding-top: 8px;
  padding-bottom: 8px;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--sp-cizgi);
}
.sp-tablo__kafa span:first-child { grid-column: 1 / span 2; }
.sp-tablo__kafa span:nth-child(n + 3) { text-align: right; }
.sp-tablo__kafa span:nth-child(2) { text-align: left; }
.sp-grup {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f3f7fb;
  border-bottom: 1px solid var(--sp-cizgi);
  color: var(--sp-navy);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sp-grup .bi { color: var(--sp-teal-koyu); }
.sp-grup small {
  margin-left: auto;
  color: var(--sp-soluk);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.sp-grup[hidden],
.sp-satir[hidden] { display: none; }
.sp-satir {
  width: 100%;
  min-height: 56px;
  padding-top: 10px;
  padding-bottom: 10px;
  border: 0;
  border-bottom: 1px solid var(--sp-cizgi-2);
  background: #fff;
  font: inherit;
  text-align: left;
  color: var(--sp-yazi);
  cursor: pointer;
  transition: background 0.12s ease;
}
.sp-satir:nth-of-type(even) { background: #fbfcfe; }
.sp-satir:hover { background: #f0faf8; }
.sp-satir:focus-visible { outline: 3px solid rgba(0, 184, 169, 0.5); outline-offset: -3px; }
.sp-satir__isaret {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 2px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: transparent;
  font-size: 0.85rem;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.sp-satir--paket .sp-satir__isaret { border-radius: 50%; }
.sp-satir__ad { min-width: 0; display: grid; gap: 2px; }
.sp-satir__ad strong {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--sp-navy);
  font-size: 0.92rem;
  line-height: 1.3;
}
.sp-satir__ad small { color: var(--sp-soluk); font-size: 0.76rem; font-weight: 500; line-height: 1.45; }
.sp-satir__kod {
  justify-self: start;
  padding: 3px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}
.sp-satir__kod:empty { display: none; }
.sp-satir__liste,
.sp-satir__ozel {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.88rem;
}
.sp-satir__liste { color: #64748b; font-weight: 600; }
.sp-satir__liste.is-cizili { text-decoration: line-through; text-decoration-color: #94a3b8; }
.sp-satir__ozel { color: var(--sp-navy); font-weight: 800; }
.sp-satir.is-secili { background: #e8f8f5; box-shadow: inset 4px 0 0 var(--sp-teal); }
.sp-satir.is-secili .sp-satir__isaret { background: var(--sp-teal-btn); border-color: var(--sp-teal-btn); color: #fff; }
.sp-satir.is-secili .sp-satir__ozel { color: var(--sp-teal-koyu); }
.sp-satir.is-dahil { cursor: default; background: #f8fafc; }
.sp-satir.is-dahil .sp-satir__isaret { background: #dcfce7; border-color: #86efac; color: #15803d; }
.sp-satir.is-dahil .sp-satir__ozel { color: #15803d; }
.sp-satir.is-yakinda { cursor: default; opacity: 0.6; }
.sp-satir.is-yakinda .sp-satir__isaret { border-style: dashed; }
.sp-satir.is-kilitli .sp-satir__ad strong,
.sp-satir.is-kilitli .sp-satir__ozel { color: #64748b; }
.sp-rozet {
  padding: 2px 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.sp-rozet--gri { background: #f1f5f9; color: #64748b; }
.sp-bos { margin: 0; padding: 26px 16px; text-align: center; color: var(--sp-soluk); font-weight: 600; }
.sp-uyari {
  margin: 8px 16px 0;
  padding: 10px 14px;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.86rem;
  font-weight: 700;
}
.sp-dipnot {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 12px 16px 16px;
  color: var(--sp-soluk);
  font-size: 0.8rem;
  line-height: 1.55;
  font-weight: 500;
}
.sp-dipnot .bi { color: var(--sp-teal-koyu); margin-top: 2px; }

/* Hesaplanan ürünler */
.sp-temizle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.sp-temizle:hover { background: rgba(255, 255, 255, 0.18); }
.sp-temizle[hidden] { display: none; }
.sp-hesap__bos {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 30px 20px;
  text-align: center;
}
.sp-hesap__bos .bi {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef4fb;
  color: #8aa3c0;
  font-size: 1.4rem;
}
.sp-hesap__bos strong { color: var(--sp-navy); }
.sp-hesap__bos span { color: var(--sp-soluk); font-size: 0.86rem; max-width: 280px; line-height: 1.5; }
.sp-hesap__tablo {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.sp-hesap__tablo th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--sp-cizgi);
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}
.sp-hesap__tablo td {
  padding: 10px;
  border-bottom: 1px solid var(--sp-cizgi-2);
  vertical-align: middle;
}
.sp-hesap__tablo th:first-child,
.sp-hesap__tablo td:first-child { padding-left: 16px; }
.sp-hesap__tablo td:first-child strong { display: block; color: var(--sp-navy); font-size: 0.86rem; line-height: 1.3; }
.sp-hesap__tablo td:first-child small { display: block; margin-top: 2px; color: var(--sp-soluk); font-size: 0.72rem; }
.sp-hesap__tablo tr.is-paket td { background: #f3faf9; }
.sp-orta { text-align: center !important; }
.sp-sag-hiza { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.sp-sag-hiza { color: #64748b; font-weight: 600; }
td.sp-ozel { color: var(--sp-navy); font-weight: 800; }
.sp-sil-hucre { width: 40px; padding-right: 12px !important; text-align: right; }
.sp-sil {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--sp-cizgi);
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  font-size: 0.75rem;
}
.sp-sil:hover { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.sp-sayac {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sp-cizgi);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}
.sp-sayac button {
  width: 28px;
  height: 30px;
  border: 0;
  background: #f8fafc;
  color: var(--sp-navy);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.sp-sayac button:hover { background: #e8f8f5; color: var(--sp-teal-koyu); }
.sp-sayac b {
  min-width: 30px;
  text-align: center;
  color: var(--sp-navy);
  font-variant-numeric: tabular-nums;
}
.sp-duzenle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 10px 16px 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sp-teal-koyu);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}
.sp-duzenle:hover { text-decoration: underline; }

/* Fiyat bilgileri */
.sp-fiyat__tablo {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.sp-fiyat__tablo thead th {
  padding: 10px 16px 8px;
  color: var(--sp-navy-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: right;
  text-transform: uppercase;
  border-bottom: 1px solid var(--sp-cizgi);
}
.sp-fiyat__tablo thead th:last-child { color: var(--sp-teal-koyu); }
.sp-fiyat__tablo tbody th {
  padding: 9px 16px;
  color: #334155;
  font-weight: 600;
  text-align: left;
}
.sp-fiyat__tablo tbody td {
  padding: 9px 16px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #64748b;
  font-weight: 600;
}
.sp-fiyat__tablo tbody td:last-child { color: var(--sp-navy); font-weight: 800; }
.sp-fiyat__tablo tbody tr:nth-child(even) { background: #fafcfe; }
.sp-fiyat__tablo tr.is-not th,
.sp-fiyat__tablo tr.is-not td { padding-top: 2px; padding-bottom: 6px; background: transparent; }
.sp-fiyat__tablo tr.is-not th small { color: var(--sp-soluk); font-weight: 600; padding-left: 12px; }
.sp-fiyat__tablo tr.is-not td:last-child { color: #15803d; font-weight: 700; font-size: 0.8rem; }
.sp-fiyat__tablo tr.is-ara th,
.sp-fiyat__tablo tr.is-ara td { border-top: 1px solid var(--sp-cizgi); }
.sp-fiyat__tablo tr.is-toplam th,
.sp-fiyat__tablo tr.is-toplam td {
  border-top: 2px solid var(--sp-navy);
  background: #f3f7fb;
  color: var(--sp-navy);
  font-weight: 800;
}
.sp-fiyat__tablo tr.is-toplam td:nth-child(2) { color: #64748b; text-decoration: line-through; text-decoration-color: #94a3b8; }
.sp-toplam {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sp-navy), var(--sp-navy-2));
  color: #fff;
}
.sp-toplam span { font-weight: 700; font-size: 0.9rem; line-height: 1.25; }
.sp-toplam small { display: block; color: #a9c1db; font-size: 0.72rem; font-weight: 600; }
.sp-toplam strong {
  font-family: var(--bh-display);
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sp-kazanc {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 16px 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f0fdf4;
  color: #166534;
  font-size: 0.82rem;
  font-weight: 600;
}
.sp-kazanc[hidden] { display: none; }
.sp-aksiyon {
  display: flex;
  gap: 8px;
  padding: 14px 16px 0;
}
.sp-sayfa .sp-aksiyon .btn-primary,
.sp-sayfa .sp-aksiyon .btn-ghost {
  flex: 1;
  width: auto;
  min-height: 48px;
  margin: 0;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
}
.sp-sayfa .sp-aksiyon .btn-ghost { flex: 0 0 auto; padding-inline: 16px; }
.sp-sayfa .sp-aksiyon [hidden] { display: none !important; }
.sp-sayfa .sp-aksiyon .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.sp-not {
  margin: 10px 16px 16px;
  color: var(--sp-soluk);
  font-size: 0.8rem;
  line-height: 1.5;
  font-weight: 500;
}
.sp-not.is-hata {
  padding: 9px 12px;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
}

/* Adım 2–4 formları */
.sp-alanlar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  padding: 20px 20px 8px;
}
.sp-tam { grid-column: 1 / -1; }
.sp-sayfa .fx-alan { color: var(--sp-navy); }
.sp-sayfa .fx-alan > span { font-size: 0.82rem; }
.sp-sayfa .fx-alan input,
.sp-sayfa .fx-alan select,
.sp-sayfa .fx-alan textarea {
  min-height: 46px;
  border: 1.5px solid #d6e0ea;
  border-radius: 12px;
  background: #fbfcfe;
}
.sp-sayfa .fx-alan textarea { min-height: 80px; }
.sp-sayfa .fx-alan input:focus,
.sp-sayfa .fx-alan select:focus,
.sp-sayfa .fx-alan textarea:focus {
  outline: none;
  border-color: var(--sp-teal);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 184, 169, 0.15);
}
.sp-sayfa .fx-alan .is-hatali { border-color: #f87171; background: #fff7f7; }
.sp-odeme { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 20px 20px 4px; }
.sp-sayfa .fx-odeme-sec {
  margin: 0;
  padding: 14px;
  border: 1.5px solid #d6e0ea;
  border-radius: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sp-sayfa .fx-odeme-sec strong { display: flex; align-items: center; gap: 7px; color: var(--sp-navy); }
.sp-sayfa .fx-odeme-sec input { accent-color: var(--sp-teal-btn); }
.sp-sayfa .fx-odeme-sec.is-secili {
  border-color: var(--sp-teal);
  background: #f3fbfa;
  box-shadow: 0 0 0 3px rgba(0, 184, 169, 0.12);
}
.sp-sayfa .sp-adim-panel .fx-havale { margin: 12px 20px 20px; }

/* Telefon alt çubuğu */
.sp-mobil-bar { display: none; }

@media (max-width: 1100px) {
  .sp-duzen { grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr); }
  .sp-tablo__kafa,
  .sp-satir { grid-template-columns: 26px minmax(0, 1fr) 96px 100px; }
  .sp-tablo__kafa span:nth-child(2),
  .sp-satir__kod { display: none; }
}

@media (max-width: 900px) {
  .sp-sayfa { padding-bottom: 110px; }
  .sp-duzen { grid-template-columns: 1fr; }
  .sp-sag { position: static; scroll-margin-top: calc(var(--s-nav-h, 64px) + 12px); }
  .sp-mobil-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px var(--s-bosluk, 16px) calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--sp-cizgi);
    box-shadow: 0 -12px 30px -18px rgba(8, 43, 92, 0.5);
  }
  .sp-mobil-bar small { display: block; color: var(--sp-soluk); font-size: 0.72rem; font-weight: 600; }
  .sp-mobil-bar strong { color: var(--sp-navy); font-family: var(--bh-display); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
  .sp-sayfa .sp-mobil-bar .btn-primary { width: auto; min-height: 44px; padding: 10px 16px; gap: 6px; }
}

@media (max-width: 640px) {
  .sp-sayfa { padding-top: 20px; }
  .sp-adimlar.fx-adimlar { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .sp-adimlar.fx-adimlar li { justify-content: center; flex-direction: column; gap: 4px; padding: 8px 4px; border-radius: 14px; font-size: 0.74rem; }
  .sp-tablo__kafa { display: none; }
  .sp-satir {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    grid-template-areas: "isaret ad ozel" "isaret ad liste";
    row-gap: 2px;
    column-gap: 10px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .sp-satir__isaret { grid-area: isaret; align-self: start; margin-top: 2px; }
  .sp-satir__ad { grid-area: ad; }
  .sp-satir__ozel { grid-area: ozel; align-self: end; }
  .sp-satir__liste { grid-area: liste; align-self: start; font-size: 0.76rem; }
  .sp-satir__ad small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .sp-grup small { display: none; }
  .sp-hesap__tablo th:nth-child(3),
  .sp-hesap__tablo td:nth-child(3) { display: none; }
  .sp-fiyat__tablo thead th,
  .sp-fiyat__tablo tbody th,
  .sp-fiyat__tablo tbody td { padding-left: 12px; padding-right: 12px; }
  .sp-alanlar { grid-template-columns: 1fr; padding: 16px 16px 6px; }
  .sp-odeme { grid-template-columns: 1fr; padding: 16px 16px 4px; }
  .sp-sayfa .sp-adim-panel .fx-havale { margin: 12px 16px 16px; }
  .sp-toplam strong { font-size: 1.35rem; }
  .sp-sayfa .fx-alan input,
  .sp-sayfa .fx-alan select,
  .sp-sayfa .fx-alan textarea,
  .sp-ara input { font-size: 16px; }
}
