/* ── Checkout Page ── */
.checkout-page { padding-top: 8em; }
.checkout-header { padding: 0 2em 2em; display: flex; flex-direction: column; gap: 1.5em; }
.checkout-header h2 { font-family: "Onest", sans-serif; font-size: 2rem; }

/* Steps */
.checkout-steps { display: flex; align-items: center; gap: 0.75em; }
.step { font-family: "Onest", sans-serif; font-size: 0.8rem; font-weight: 600; text-transform: none; opacity: 0.3; }
.step.done { opacity: 0.5; color: var(--primary); }
.step.active { opacity: 1; color: var(--primary); }
.step-line { flex: 0; width: 30px; height: 1px; background: rgba(0,0,0,0.15); }

/* Content */
.checkout-content { display: flex; gap: 2em; padding: 0 2em 4em; }
.checkout-left { flex: 2; display: flex; flex-direction: column; gap: 1.5em; }
.checkout-right { flex: 1; }

/* Sections */
.checkout-section {
  padding: 2em; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 1em; background: #fff;
}
.section-title { display: flex; align-items: center; gap: 0.75em; margin-bottom: 1.5em; }
.section-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: "Onest", sans-serif; font-size: 0.8rem; font-weight: 700;
}
.section-title h3 { font-family: "Onest", sans-serif; font-size: 1.1rem; }

/* Fields */
.checkout-fields { display: flex; flex-direction: column; gap: 1em; }
.field-row { display: flex; gap: 1em; }
.field-row .field { flex: 1; }
.field { display: flex; flex-direction: column; gap: 0.3em; }
.field label { font-family: "Onest", sans-serif; font-size: 0.75rem; font-weight: 600; text-transform: none; opacity: 0.6; }
.field input { border: 1px solid rgba(0,0,0,0.1); background: #fafaf8; border-radius: 0.5em; padding: 0.85em 1em; font-family: "Onest", sans-serif; font-size: 0.9rem; }
.field input:focus, .field select:focus { border-color: var(--primary); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(108,92,231,0.1); }
.field select { border: 1px solid rgba(0,0,0,0.1); background: #fafaf8; border-radius: 0.5em; padding: 0.85em 1em; font-family: "Onest", sans-serif; font-size: 0.9rem; width: 100%; cursor: pointer; }
.field select:disabled { opacity: 0.5; cursor: not-allowed; }

/* Payment Methods */
.payment-methods { display: flex; flex-direction: column; gap: 0.75em; }
.payment-option { cursor: pointer; }
.payment-option input { display: none; }
.payment-card {
  display: flex; align-items: center; gap: 1em;
  padding: 1.25em; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 0.75em; transition: all 0.3s;
}
.payment-option input:checked + .payment-card {
  border-color: var(--primary);
  background: rgba(108,92,231,0.03);
  box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
}
.payment-card:hover { border-color: rgba(108,92,231,0.3); }
.payment-icon {
  width: 48px; height: 48px; border-radius: 0.6em;
  background: rgba(108,92,231,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); flex-shrink: 0;
}
.payment-info { display: flex; flex-direction: column; gap: 0.2em; }
.payment-name { font-family: "Onest", sans-serif; font-size: 0.9rem; font-weight: 700; text-transform: none; }
.payment-desc { font-family: "Onest", sans-serif; font-size: 0.75rem; opacity: 0.5; text-transform: none; }

/* Order Summary */
.order-summary {
  position: sticky; top: 100px;
  padding: 2em; border: 1px solid rgba(0,0,0,0.08);
  border-radius: 1em; background: #fff;
  display: flex; flex-direction: column; gap: 1.5em;
}
.order-summary h3 { font-family: "Onest", sans-serif; font-size: 1.1rem; }

/* Summary Items */
.summary-items { display: flex; flex-direction: column; gap: 0.75em; }
.summary-item { display: flex; align-items: center; gap: 0.75em; }
.summary-item-img {
  width: 56px; height: 56px; border-radius: 0.5em; overflow: hidden;
  background: #f5f5f0; flex-shrink: 0;
}
.summary-item-img img { width: 100%; height: 100%; object-fit: cover; }
.summary-item-info { flex: 1; display: flex; flex-direction: column; }
.summary-item-title { font-family: "Onest", sans-serif; font-size: 0.8rem; font-weight: 600; text-transform: none; line-height: 1.3; }
.summary-item-var { font-family: "Onest", sans-serif; font-size: 0.65rem; opacity: 0.5; text-transform: none; }
.summary-item-qty { font-family: "Onest", sans-serif; font-size: 0.7rem; opacity: 0.5; text-transform: none; }
.summary-item-price { font-family: "Onest", sans-serif; font-size: 0.9rem; font-weight: 800; text-transform: none; white-space: nowrap; }

/* Totals */
.summary-totals { display: flex; flex-direction: column; gap: 0.5em; padding-top: 1em; border-top: 1px solid rgba(0,0,0,0.06); }
.summary-row { display: flex; justify-content: space-between; font-family: "Onest", sans-serif; font-size: 0.85rem; text-transform: none; }
.summary-row .free { color: #2ecc71; font-weight: 600; }
.summary-row.grand { font-size: 1.2rem; font-weight: 900; color: var(--primary); padding-top: 0.75em; border-top: 1px solid rgba(0,0,0,0.06); }

/* Place Order */
.place-order-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5em;
  width: 100%; padding: 1.1em;
  background: var(--primary); color: #fff;
  border: none; border-radius: 0.6em;
  font-family: "Onest", sans-serif; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all 0.3s; text-transform: none;
}
.place-order-btn:hover { background: #5a4bd1; box-shadow: 0 4px 20px rgba(108,92,231,0.4); transform: translateY(-2px); }

.checkout-agreement { font-family: "Onest", sans-serif; font-size: 0.7rem; text-transform: none; opacity: 0.45; line-height: 1.5; text-align: center; }
.checkout-agreement a { display: inline; font-size: 0.7rem; color: var(--primary); text-transform: none; text-decoration: underline; }

/* Trust */
.summary-trust { display: flex; flex-direction: column; gap: 0.5em; }
.trust-row { display: flex; align-items: center; gap: 0.5em; font-family: "Onest", sans-serif; font-size: 0.7rem; text-transform: none; opacity: 0.45; }

/* Checkout Auth Tabs */
.checkout-auth-tabs { display: flex; gap: 0; border: 1px solid rgba(0,0,0,0.1); border-radius: 0.5em; overflow: hidden; margin-bottom: 1.5em; }
.auth-tab {
  flex: 1; padding: 0.75em 0.5em; background: transparent; border: none;
  font-family: "Onest", sans-serif; font-size: 0.75rem; font-weight: 600;
  color: var(--fg); cursor: pointer; transition: all 0.3s; text-transform: none;
  border-right: 1px solid rgba(0,0,0,0.06);
}
.auth-tab:last-child { border-right: none; }
.auth-tab.active { background: var(--primary); color: #fff; }
.auth-tab:hover:not(.active) { background: rgba(108,92,231,0.06); }

.checkout-user-info {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1em; background: rgba(108,92,231,0.04);
  border: 1px solid rgba(108,92,231,0.12); border-radius: 0.5em; margin-bottom: 1em;
}
.checkout-logged-as { font-family: "Onest", sans-serif; font-size: 0.85rem; font-weight: 600; text-transform: none; }
.checkout-logout-link { font-family: "Onest", sans-serif; font-size: 0.75rem; color: var(--primary); text-transform: none; }

.checkout-login-btn {
  width: 100%; padding: 0.8em; background: var(--fg); color: var(--bg);
  border: none; border-radius: 0.5em;
  font-family: "Onest", sans-serif; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.3s; text-transform: none;
}
.checkout-login-btn:hover { background: var(--primary); }

.checkout-login-error {
  font-family: "Onest", sans-serif; font-size: 0.8rem; color: #e74c3c;
  text-align: center; text-transform: none; margin-top: 0.5em;
}

/* Mobile */
@media (max-width: 1000px) {
  .checkout-content { flex-direction: column; padding: 0 1.25em 2em; }
  .checkout-header { padding: 0 1.25em 1.5em; }
  .field-row { flex-direction: column; }
  .checkout-section { padding: 1.25em; }
  .card-visual { width: 100%; min-width: unset; }
  .card-fields-wrapper .field-row { flex-direction: row; }
}

/* ── Kayıtlı Adresler ── */
.saved-addresses { margin-bottom: 1.25em; }
.saved-addresses-label { font-family: "Onest", sans-serif; font-size: 0.75rem; font-weight: 600; text-transform: none; display: block; margin-bottom: 0.5em; opacity: 0.6; }
.saved-addresses-list { display: flex; flex-direction: column; gap: 0.5em; }
.saved-addr-option { cursor: pointer; }
.saved-addr-option input { display: none; }
.saved-addr-card { padding: 0.85em 1em; border: 1.5px solid rgba(0,0,0,0.08); border-radius: 0.6em; transition: all 0.2s; display: flex; flex-direction: column; gap: 0.15em; }
.saved-addr-option input:checked + .saved-addr-card { border-color: var(--primary); background: rgba(108,92,231,0.04); }
.saved-addr-title { font-family: "Onest", sans-serif; font-size: 0.8rem; font-weight: 600; text-transform: none; }
.saved-addr-title small { font-weight: 400; opacity: 0.5; font-size: 0.7rem; }
.saved-addr-detail { font-family: "Onest", sans-serif; font-size: 0.72rem; text-transform: none; opacity: 0.5; }
.saved-addr-new { flex-direction: row; align-items: center; gap: 0.5em; border-style: dashed; }
.saved-addr-new span { font-family: "Onest", sans-serif; font-size: 0.78rem; text-transform: none; font-weight: 500; }
.saved-addr-option input:checked + .saved-addr-new { color: var(--primary); }
.saved-addr-new svg { opacity: 0.5; }

/* ── Kredi Kartı Alanları ── */
.card-fields-wrapper { margin-top: 1.5em; padding: 1.5em 1.5em 1em; background: var(--bg); border: 1px solid rgba(0,0,0,0.06); border-radius: 1em; }

/* Card.js kartı */
.card-wrapper { display: flex; justify-content: center; margin-bottom: 1.5em; }
.card-wrapper .jp-card-container { margin: 0 !important; }
.card-wrapper .jp-card { background: linear-gradient(135deg, var(--fg) 0%, #1a1a2e 40%, #0f3460 100%) !important; box-shadow: 0 12px 40px rgba(0,0,0,0.3); border-radius: 0.85em !important; }
.card-wrapper .jp-card .jp-card-front, .card-wrapper .jp-card .jp-card-back { background: transparent !important; }
.card-wrapper .jp-card .jp-card-front .jp-card-lower .jp-card-number,
.card-wrapper .jp-card .jp-card-front .jp-card-lower .jp-card-name,
.card-wrapper .jp-card .jp-card-front .jp-card-lower .jp-card-expiry { font-family: "Onest", monospace !important; }
.card-wrapper .jp-card .jp-card-front .jp-card-lower .jp-card-name { font-size: 11px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.card-wrapper .jp-card.jp-card-identified { background: linear-gradient(135deg, var(--fg) 0%, #2d1b69 50%, var(--primary) 100%) !important; }
.card-wrapper .jp-card.jp-card-identified.jp-card-visa { background: linear-gradient(135deg, #0c1445 0%, #1a237e 50%, #283593 100%) !important; }
.card-wrapper .jp-card.jp-card-identified.jp-card-mastercard { background: linear-gradient(135deg, #1a1a2e 0%, #b71c1c 50%, #e65100 100%) !important; }
.card-wrapper .jp-card.jp-card-identified.jp-card-amex { background: linear-gradient(135deg, #004d40 0%, #00695c 50%, #00897b 100%) !important; }

/* ── Taksit Tablosu ── */
.installment-section { margin-top: 0.5em; }
.installment-label { font-family: "Onest", sans-serif; font-size: 0.78rem; font-weight: 600; text-transform: none; display: block; margin-bottom: 0.5em; }
.installment-label span { font-weight: 400; opacity: 0.4; font-size: 0.7rem; }
.installment-table-wrap { border: 1px solid rgba(0,0,0,0.06); border-radius: 0.6em; overflow: hidden; }
.installment-table { width: 100%; border-collapse: collapse; font-family: "Onest", sans-serif; font-size: 0.78rem; text-transform: none; }
.installment-table th { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.4; font-weight: 500; padding: 0.6em 0.8em; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.06); }
.installment-table th:last-child { width: 30px; }
.inst-row { cursor: pointer; transition: background 0.15s; }
.inst-row td { padding: 0.7em 0.8em; border-bottom: 1px solid rgba(0,0,0,0.03); }
.inst-row:last-child td { border-bottom: none; }
.inst-row:hover { background: rgba(0,0,0,0.02); }
.inst-row.selected { background: rgba(108,92,231,0.05); }
.inst-row.selected td { color: var(--fg); }
.inst-row.selected td strong { color: var(--primary); }
.inst-row td small { opacity: 0.4; font-size: 0.65rem; }
.inst-check { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.65rem; color: #fff; }
.inst-row.selected .inst-check { background: var(--primary); }
.installment-loading { display: flex; align-items: center; gap: 0.5em; padding: 0.75em 0; margin-top: 0.5em; }
.inst-spinner { width: 16px; height: 16px; border: 2px solid rgba(108,92,231,0.15); border-top-color: var(--primary); border-radius: 50%; animation: inst-spin 0.6s linear infinite; }
@keyframes inst-spin { to { transform: rotate(360deg); } }
.installment-loading span { font-family: "Onest", sans-serif; font-size: 0.72rem; text-transform: none; opacity: 0.5; }

/* ── PC Sticky Ödeme Barı ── */
.mobile-checkout-bar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 999; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(0,0,0,0.08); padding: 0.75em 2em; align-items: center; justify-content: space-between; gap: 1em; box-shadow: 0 -4px 20px rgba(0,0,0,0.06); }
.mobile-checkout-total { display: flex; flex-direction: column; }
.mobile-checkout-total span { font-family: "Onest", sans-serif; font-size: 0.65rem; text-transform: none; opacity: 0.5; }
.mobile-checkout-total strong { font-family: "Onest", sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--fg); }
.mobile-checkout-btn { font-family: "Onest", sans-serif; font-size: 0.85rem; font-weight: 600; text-transform: none; padding: 0.85em 2em; background: var(--primary); color: #fff; border: none; border-radius: 0.6em; cursor: pointer; white-space: nowrap; transition: background 0.2s; }
.mobile-checkout-btn:hover { background: var(--primary-light, #a29bfe); }
.checkout-page { padding-bottom: 5em; }
@media (max-width: 1000px) {
  .mobile-checkout-bar { display: none; }
  .checkout-page { padding-bottom: 0; }
}
