/* ═══════════════════════════════════════════════════════════════════════════
   cart.css — Sepet, ödeme adımları, onay sayfası
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Sipariş Adım Çubuğu ─────────────────────────────────────────────────── */

.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 40px;
  gap: 0;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.checkout-step::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--wd-border-color-dark);
  margin: 0 10px;
}

.checkout-step:last-child::after {
  display: none;
}

.checkout-step__num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--wd-gray-300);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkout-step.active .checkout-step__num {
  background: var(--wd-primary-color);
}

.checkout-step.done .checkout-step__num {
  background: var(--wd-success);
}

.checkout-step__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--wd-text-light);
  white-space: nowrap;
}

.checkout-step.active .checkout-step__label {
  color: var(--wd-heading-color);
  font-weight: 600;
}

/* ── Sepet Sayfası ───────────────────────────────────────────────────────── */

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 30px;
  align-items: start;
}

/* Sepet Tablosu */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wd-text-light);
  padding: 10px 14px;
  border-bottom: 2px solid var(--wd-border-color);
  text-align: left;
}

.cart-table thead th:last-child {
  text-align: right;
}

.cart-table tbody td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--wd-border-color-light);
  font-size: 14px;
  vertical-align: middle;
}

.cart-item__product {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-item__thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--wd-border-color-light);
}

.cart-item__name {
  font-weight: 600;
  color: var(--wd-heading-color);
  margin-bottom: 3px;
  font-size: 14px;
}

.cart-item__name a {
  color: inherit;
}

.cart-item__name a:hover {
  color: var(--wd-primary-color);
}

.cart-item__meta {
  font-size: 12px;
  color: var(--wd-text-light);
}

.cart-item__remove {
  font-size: 16px;
  color: var(--wd-gray-400);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  border: none;
  background: none;
  cursor: pointer;
}

.cart-item__remove:hover {
  color: var(--wd-danger);
}

.cart-item__price {
  color: var(--wd-heading-color);
  font-weight: 500;
}

.cart-item__total {
  text-align: right;
  font-weight: 700;
  color: var(--wd-heading-color);
}

/* Boş Sepet */
.cart-empty {
  text-align: center;
  padding: 60px 20px;
}

.cart-empty__icon {
  font-size: 60px;
  color: var(--wd-gray-300);
  margin-bottom: 20px;
}

.cart-empty h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.cart-empty p {
  color: var(--wd-text-light);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Kupon Kodu */
.coupon-form {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--wd-border-color-light);
}

.coupon-form input {
  height: 38px;
  font-size: 13px;
}

.coupon-form .btn {
  height: 38px;
  padding: 0 16px;
  font-size: 12px;
  white-space: nowrap;
}

/* ── Sipariş Özeti ───────────────────────────────────────────────────────── */

.order-summary {
  background: var(--wd-gray-100);
  padding: 24px;
  border: 1px solid var(--wd-border-color-light);
  position: sticky;
  top: calc(var(--wd-header-height) + 20px);
}

.order-summary__title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--wd-primary-color);
}

.order-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--wd-border-color-light);
}

.order-summary__row:last-of-type {
  border-bottom: none;
}

.order-summary__row .label {
  color: var(--wd-gray-600);
}

.order-summary__row .value {
  font-weight: 600;
  color: var(--wd-heading-color);
}

.order-summary__row.total {
  border-top: 2px solid var(--wd-border-color);
  border-bottom: none;
  margin-top: 10px;
  padding-top: 14px;
}

.order-summary__row.total .label,
.order-summary__row.total .value {
  font-size: 16px;
  font-weight: 700;
  color: var(--wd-heading-color);
}

.order-summary__row.total .value {
  color: var(--wd-primary-color);
  font-size: 18px;
}

.order-summary__note {
  font-size: 12px;
  color: var(--wd-text-light);
  margin-top: 10px;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ── Ödeme Formu ─────────────────────────────────────────────────────────── */

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 30px;
  align-items: start;
}

.checkout-form__section {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--wd-border-color-light);
}

.checkout-form__section:last-child {
  border-bottom: none;
}

.checkout-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--wd-heading-color);
  margin-bottom: 20px;
}

/* Ödeme Yöntemi */
.payment-method {
  border: 2px solid var(--wd-border-color);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.25s ease;
  border-radius: var(--wd-border-radius-sm);
}

.payment-method.selected {
  border-color: var(--wd-primary-color);
  background: rgba(201,150,63,0.04);
}

.payment-method__header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-method input[type="radio"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.payment-method__label {
  font-weight: 600;
  font-size: 14px;
}

.payment-method__desc {
  font-size: 13px;
  color: var(--wd-gray-600);
  margin-top: 8px;
  padding-left: 26px;
  display: none;
}

.payment-method.selected .payment-method__desc {
  display: block;
}

/* ── Havale Talimatları ───────────────────────────────────────────────────── */

.bank-transfer-info {
  background: var(--wd-info-bg);
  border: 1px solid #bee5eb;
  padding: 24px;
  margin-bottom: 24px;
}

.bank-transfer-info__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--wd-heading-color);
}

.bank-detail {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.bank-detail__label {
  font-size: 13px;
  font-weight: 600;
  min-width: 100px;
  flex-shrink: 0;
}

.bank-detail__value {
  font-size: 13px;
  color: var(--wd-gray-700);
  word-break: break-all;
}

.bank-detail__value.iban {
  font-family: monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 8px;
  background: var(--wd-gray-200);
  border-radius: 3px;
  cursor: pointer;
  margin-left: 8px;
  transition: background 0.2s ease;
  border: none;
  color: var(--wd-text-color);
}

.copy-btn:hover {
  background: var(--wd-primary-color);
  color: #fff;
}

/* ── Sipariş Onay ────────────────────────────────────────────────────────── */

.order-confirmation {
  max-width: 700px;
  margin: 40px auto;
  text-align: center;
}

.order-confirmation__icon {
  width: 72px;
  height: 72px;
  background: var(--wd-success-bg);
  color: var(--wd-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 24px;
}

.order-confirmation h1 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.order-confirmation__no {
  font-size: 14px;
  color: var(--wd-text-light);
  margin-bottom: 30px;
}

.order-confirmation__no span {
  font-weight: 700;
  color: var(--wd-primary-color);
}

.order-details-box {
  background: var(--wd-gray-100);
  padding: 24px;
  text-align: left;
  margin-bottom: 30px;
  border: 1px solid var(--wd-border-color-light);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 992px) {
  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
  }

  .checkout-steps::after {
    width: 30px;
  }
}

@media (max-width: 640px) {
  .checkout-steps .checkout-step__label {
    display: none;
  }

  .cart-table thead .hide-mobile {
    display: none;
  }

  .cart-table tbody .hide-mobile {
    display: none;
  }

  .cart-item__thumb {
    width: 54px;
    height: 54px;
  }
}

/* ── Sipariş başarı sayfaları ────────────────────────────────────────────── */

.order-success-header {
  text-align: center;
  padding: 40px 0 32px;
}

.order-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.order-success-icon svg {
  width: 36px;
  height: 36px;
  stroke-width: 3;
}

.order-success-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.order-items-summary {
  background: var(--wd-gray-50);
  padding: 24px;
  border-radius: var(--wd-border-radius);
  border: 1px solid var(--wd-border-color-light);
  margin: 24px 0;
}

/* Havale ayrıntıları */
.bank-accounts {
  border: 1px solid var(--wd-border-color);
  border-radius: var(--wd-border-radius);
  overflow: hidden;
  margin: 16px 0;
}

.bank-account {
  padding: 16px 20px;
  background: #fff;
}

.bank-account + .bank-account {
  border-top: 1px solid var(--wd-border-color-light);
}

.bank-account__name {
  font-size: 15px;
  margin-bottom: 8px;
}

.bank-account__iban {
  font-family: monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.bank-account__bank {
  font-size: 12px;
  color: var(--wd-text-light);
}

.bank-transfer-amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--wd-primary-color);
  color: #fff;
  border-radius: var(--wd-border-radius);
  margin-top: 16px;
}

.bank-transfer-amount strong {
  font-size: 1.4rem;
}

/* Checkout bölüm başlığı */
.checkout-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--wd-border-color-light);
}

.checkout-section:last-of-type {
  border-bottom: none;
}

.checkout-section__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  color: var(--wd-heading-color);
}

/* Ödeme yöntemi radyo */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-method-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--wd-border-color);
  border-radius: var(--wd-border-radius);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.payment-method-option:has(input:checked) {
  border-color: var(--wd-primary-color);
  background: rgba(30, 82, 66, 0.04);
}

.payment-method-option input {
  margin-top: 2px;
  flex: 0 0 auto;
}

.payment-method-option__label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.payment-method-option__label strong {
  font-size: 14px;
}

.payment-method-option__label small {
  font-size: 12px;
  color: var(--wd-text-light);
}

/* Checkout özet ürün listesi */
.checkout-summary {
  position: sticky;
  top: calc(var(--wd-header-total-height, 154px) + 20px);
}

.checkout-items {
  border-bottom: 1px solid var(--wd-border-color-light);
  margin-bottom: 16px;
  padding-bottom: 16px;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}

.checkout-item__name em {
  color: var(--wd-text-light);
  font-style: normal;
  margin-left: 4px;
}

.checkout-item__price {
  white-space: nowrap;
  font-weight: 600;
}

/* Sipariş Detayı */
.order-detail {
  background: #fff;
  border: 1px solid var(--wd-border-color-light);
  border-radius: var(--wd-border-radius);
  overflow: hidden;
  margin: 24px 0;
}

.order-detail__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--wd-gray-50);
  border-bottom: 1px solid var(--wd-border-color-light);
}

.order-detail__header h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.order-detail__header small {
  font-size: 12px;
  color: var(--wd-text-light);
}

/* ── Cart Toast Bildirimi ────────────────────────────────────────────────── */

.cart-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--wd-green-dark, #1E5242);
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity .2s ease, transform .2s ease;
  max-width: 90vw;
  text-align: center;
}

.cart-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cart-toast--error {
  background: #dc2626;
}

/* ── Form Hata Stilleri ──────────────────────────────────────────────────── */

.input--error {
  border-color: #dc2626 !important;
  outline: none;
}

.bank-info-box {
  background: var(--wd-gray-50, #f9fafb);
  border: 1px solid var(--wd-border-color-light, #e5e7eb);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 12px;
}
