/* ===== PAYMENT / CHECKOUT ===== */
.payment-page { padding: 40px 0; }
.payment-page h2 { color: #17344c; margin-bottom: 30px; font-size: 26px; }
.payment-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: start; }
.payment-summary { background: #f9f9f9; border-radius: 12px; padding: 24px; border: 1px solid #eee; }
.payment-summary h3 { color: #17344c; margin-bottom: 20px; font-size: 18px; }
.pay-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eee; }
.pay-item img { width: 56px; height: 56px; object-fit: contain; border-radius: 6px; background: #fff; }
.pay-item-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pay-item-name { font-size: 13px; font-weight: 600; color: #17344c; }
.pay-item-qty  { font-size: 12px; color: #888; }
.pay-item-price { font-weight: bold; color: #17344c; font-size: 14px; }
.pay-total { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; color: #555; }
.pay-total.bold { font-size: 18px; font-weight: bold; color: #17344c; border-top: 2px solid #eee; margin-top: 8px; }
.green { color: #28a745; font-weight: 600; }
.payment-form { background: #fff; border-radius: 12px; padding: 28px; border: 1px solid #eee; }
.payment-form h3 { color: #17344c; margin-bottom: 18px; font-size: 18px; }
.payment-methods { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.pay-method { display: block; padding: 14px 18px; border: 2px solid #eee; border-radius: 10px; cursor: pointer; transition: 0.25s; }
.pay-method input[type="radio"] { display: none; }
.pay-method.active, .pay-method:has(input:checked) { border-color: #17344c; background: #f0f7ff; }
.pay-method-content { display: flex; align-items: center; gap: 14px; }
.pay-method-content i { font-size: 22px; color: #17344c; width: 28px; text-align: center; }
.pay-method-content div { display: flex; flex-direction: column; }
.pay-method-content strong { font-size: 14px; color: #17344c; }
.pay-method-content small { font-size: 12px; color: #888; }
.btn-confirm-order { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px; background: #43dde6; color: #fff;border: 2px solid #43dde6; border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.3s; }
.btn-confirm-order:hover { background: #fff; color: #43dde6; }
/* Order success */
.success-page { padding: 80px 0; display: flex; justify-content: center; }
.success-card { background: #fff; border-radius: 16px; padding: 48px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.08); max-width: 500px; width: 100%; }
.success-icon { font-size: 64px; color: #28a745; margin-bottom: 20px; }
.success-card h2 { color: #17344c; margin-bottom: 12px; }
.success-card p { color: #555; margin-bottom: 24px; }
.success-details { background: #f9f9f9; border-radius: 10px; padding: 20px; margin-bottom: 28px; text-align: left; }
.success-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; font-size: 14px; color: #555; }
.success-row:last-child { border-bottom: none; }
.success-row strong { color: #17344c; }
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
/* Order history */
.orders-list { display: flex; flex-direction: column; gap: 12px; }
.order-card { background: #fff; border-radius: 10px; padding: 16px 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #eee; }
.order-header { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 14px; color: #17344c; }
.order-header a { color: #43dde6; font-weight: 600; text-decoration: none; margin-left: auto; }
.order-status { padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; color: #fff; }
.status-pending { background: #f39c12; } .status-confirmed { background: #3498db; }
.status-shipped { background: #9b59b6; } .status-delivered { background: #27ae60; }
.status-cancelled { background: #f02443; }
.btn-view-order { padding: 6px 16px; background: #17344c; color: #fff !important; border-radius: 6px; text-decoration: none !important; font-size: 13px; transition: 0.3s; }
.btn-view-order:hover { background: #43dde6; color: #17344c !important; }
@media (max-width: 768px) { .payment-layout { grid-template-columns: 1fr; } }

/* ========================================================
   RESPONSIVE — orders.css (complément)
   ======================================================== */

@media (max-width: 767px) {
  /* déjà grid-template-columns: 1fr pour payment-layout */
  .payment-page { padding: 24px 12px; }
  .payment-form, .payment-summary { padding: 18px 14px; }
  .success-card { padding: 28px 18px; }
  .success-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .btn-confirm-order { font-size: 14px; padding: 13px; }
  .pay-method { padding: 10px 12px; }
}

/* ── Additional orders + checkout styles ─────────────────────────────── */
.payment-page h2 { font-size:1.5rem; font-weight:800; color:#17344C; margin-bottom:24px; }
.payment-page h2 i { color:#f02443; margin-right:8px; }
.success-page h2 { font-size:1.5rem; font-weight:800; color:#17344C; margin-bottom:12px; }
.success-icon { font-size:3.5rem; color:#22c55e; margin-bottom:12px; }

/* ── Points payment option in checkout ─────────── */
.pay-method-points:has(input:checked) {
  border-color: #f5a623;
  background: #fffbea;
}
.pay-method-disabled {
  opacity: .6;
  cursor: not-allowed;
}
.pay-method-disabled input { cursor: not-allowed; }
.pts-missing { color: #dc3545; font-weight: 600; }
.pts-ok      { color: #28a745; font-weight: 600; }
.pts-note    { display: block; margin-top: 4px; color: #888; font-size: 11px; }

.checkout-alert.error {
  background: #fff0f0;
  border: 1.5px solid #dc3545;
  border-radius: 8px;
  padding: 10px 16px;
  color: #dc3545;
  margin-bottom: 16px;
  font-size: 14px;
}
.checkout-total-pts {
  background: linear-gradient(135deg, #fffbea, #fff8e1);
  border: 1.5px solid #f5a623;
  border-radius: 8px;
  padding: 10px 16px;
  margin: 12px 0;
  color: #d4860a;
  font-weight: 600;
  font-size: 14px;
}
.checkout-total-pts i { margin-right: 8px; }

/* ═══════════════════════════════════════════════
   CHECKOUT — BLOC POINTS FIDÉLITÉ
═══════════════════════════════════════════════ */
.checkout-points-block {
  background: linear-gradient(135deg, #fffbea 0%, #fff8e1 100%);
  border: 2px solid #f5a623;
  border-radius: 14px;
  padding: 18px 20px;
  margin: 20px 0;
}
.cpb-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: #92400e;
  margin-bottom: 12px;
}
.cpb-header i { color: #f5a623; font-size: 18px; }
.cpb-balance {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: #166534;
  background: #dcfce7;
  padding: 3px 10px;
  border-radius: 20px;
}
.cpb-rate-info {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: #555;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
  border: 1px solid #fde68a;
}
.cpb-rate-info span { display: flex; align-items: center; gap: 5px; }

.cpb-input-row { margin-bottom: 10px; }
.cpb-input-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}
.cpb-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cpb-input-wrap input[type="number"] {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #fcd34d;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
  background: #fff;
  outline: none;
  transition: border-color .2s;
}
.cpb-input-wrap input[type="number"]:focus { border-color: #f5a623; }
.cpb-max-btn {
  padding: 10px 16px;
  background: #f5a623;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
  user-select: none;
}
.cpb-max-btn:hover { background: #d4860a; }
.cpb-hints {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #777;
  margin-top: 5px;
}
.cpb-hints strong { color: #166534; }

.cpb-slider-row { margin-top: 8px; }
.cpb-slider-row input[type="range"] {
  width: 100%;
  accent-color: #f5a623;
  cursor: pointer;
}
.cpb-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #aaa;
  margin-top: 2px;
}
.cpb-empty {
  font-size: 13px;
  color: #888;
  padding: 8px 0;
}

/* Summary rows */
.pay-discount-row { color: #166534; }
.pay-discount-row .green { font-weight: 700; font-size: 15px; }
.pay-points-earn-preview {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #166534;
  margin-top: 10px;
}
.pay-points-earn-preview i { margin-right: 5px; color: #22c55e; }

/* Product detail points block refinement */
.pd-points-rate {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #888;
}
.pd-points-rate i { color: #f5a623; }

/* ── Coupon block in checkout ────────────────── */
.checkout-coupon-block {
  background: #f0f7ff;
  border: 2px solid #bfdbfe;
  border-radius: 14px;
  padding: 16px 20px;
  margin: 20px 0;
}
.checkout-coupon-block .cpb-header {
  background: linear-gradient(135deg,#eff6ff,#dbeafe);
  border-color: #93c5fd;
}
