/*
 * order.css — 订单流程专属样式
 * 适用页面：cart.html / checkout.html / payment.html
 * 依赖：style.css（CSS 变量 --c1s、--h、--site-gutter-x 等由 style.css 定义）
 */

/* =====================================================================
   Cart Page
   ===================================================================== */
.cart-page { padding-block: 48px; }
.cart-inner {
  max-width: var(--container-max); margin-inline: auto; padding-inline: var(--site-gutter-x);
}
.cart-empty {
  text-align: center; padding: 80px 20px;
}
.cart-empty i { font-size: 5rem; color: #d1dbe8; margin-bottom: 20px; display: block; }
.cart-empty h2 { font-size: 2.4rem; font-weight: 700; color: #111827; margin-bottom: 10px; }
.cart-empty p  { font-size: 1.6rem; color: #6b7280; margin-bottom: 28px; }
.cart-continue-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--c1s); color: #fff; padding: 13px 28px;
  border-radius: 8px; font-size: 1.6rem; font-weight: 700; transition: background .2s;
}
.cart-continue-btn:hover { background: #0a4ab8; }

.cart-layout { display: flex; gap: 32px; align-items: flex-start; }
.cart-items   { flex: 1; min-width: 0; }
.cart-summary { flex: 0 0 320px; }

.cart-item {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 0; border-bottom: 1px solid #e4eaf3; position: relative;
}
.cart-item-img { flex: 0 0 88px; height: 88px; border-radius: 8px; overflow: hidden; background: #f6f8fc; display: flex; align-items: center; justify-content: center; }
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.cart-item-no-img { color: #ccc; font-size: 2.4rem; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 1.6rem; font-weight: 600; color: #111827; display: block; margin-bottom: 4px; transition: color .2s; }
.cart-item-name:hover { color: var(--c1s); }
.cart-item-spec { font-size: 1.3rem; color: #6b7280; margin-bottom: 4px; }
.cart-item-price { font-size: 1.4rem; color: #6b7280; }
.cart-item-qty { display: flex; align-items: center; gap: 0; border: 1.5px solid #d1dbe8; border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
.qty-btn { width: 36px; height: 36px; background: #f6f8fc; border: none; cursor: pointer; font-size: 1.2rem; color: #374151; transition: background .15s; }
.qty-btn:hover { background: #e4eaf3; }
.qty-input { width: 44px; height: 36px; border: none; border-left: 1.5px solid #d1dbe8; border-right: 1.5px solid #d1dbe8; text-align: center; font-size: 1.5rem; font-weight: 600; background: #fff; outline: none; }
.cart-item-subtotal { font-size: 1.7rem; font-weight: 700; color: var(--c1s); flex: 0 0 70px; text-align: right; }
.cart-item-remove { position: absolute; top: 16px; right: 0; background: none; border: none; color: #bbb; font-size: 1.4rem; cursor: pointer; padding: 4px; transition: color .2s; }
.cart-item-remove:hover { color: #e53935; }

.cart-summary-box {
  border: 1px solid #e4eaf3; border-radius: 12px; padding: 24px;
  background: #f8fafe; box-shadow: 0 2px 10px rgba(9,57,140,.04);
  position: sticky; top: calc(var(--h) + 20px);
}
.cart-summary-title { font-size: 1.8rem; font-weight: 700; color: #111827; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid #e4eaf3; }
.cart-summary-row { display: flex; justify-content: space-between; align-items: center; font-size: 1.5rem; color: #374151; margin-bottom: 10px; }
.cart-summary-total { font-size: 1.8rem; font-weight: 800; color: #111827; padding-top: 12px; border-top: 2px solid #e4eaf3; margin-top: 8px; }
.cart-summary-note { font-size: 1.3rem; color: #6b7280; margin: 16px 0; display: flex; align-items: center; gap: 6px; }
.cart-checkout-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: var(--c1s); color: #fff; border-radius: 8px;
  font-size: 1.6rem; font-weight: 700; padding: 14px 0; text-decoration: none;
  transition: background .2s, transform .15s; margin-bottom: 12px; letter-spacing: .02em;
}
.cart-checkout-btn:hover { background: #0a4ab8; transform: translateY(-1px); }
.cart-continue-link { display: block; text-align: center; font-size: 1.4rem; color: #6b7280; transition: color .2s; }
.cart-continue-link:hover { color: var(--c1s); }

/* =====================================================================
   Checkout Page
   ===================================================================== */
.checkout-steps { padding: 20px 0; border-bottom: 1px solid #e4eaf3; }
.checkout-steps-inner {
  max-width: var(--container-max); margin-inline: auto; padding-inline: var(--site-gutter-x);
  display: flex; align-items: center; gap: 0;
}
.co-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.co-step-num {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #d1dbe8; background: #fff;
  font-size: 1.4rem; font-weight: 700; color: #6b7280;
}
.co-step-label { font-size: 1.2rem; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.co-step-done  .co-step-num { background: var(--c1s); border-color: var(--c1s); color: #fff; }
.co-step-active .co-step-num { background: #fff; border-color: var(--c1s); color: var(--c1s); }
.co-step-done  .co-step-label, .co-step-active .co-step-label { color: var(--c1s); }
.co-step-line { flex: 1; height: 2px; background: #d1dbe8; margin: 0 8px; margin-bottom: 24px; }
.co-step-line-done { background: var(--c1s); }

.checkout-page { padding-block: 40px; }
.checkout-layout {
  max-width: var(--container-max); margin-inline: auto; padding-inline: var(--site-gutter-x);
  display: flex; gap: 40px; align-items: flex-start;
}
.checkout-form-wrap { flex: 1; min-width: 0; }
.checkout-summary   { flex: 0 0 340px; position: sticky; top: calc(var(--h) + 20px); }
.checkout-section-title { font-size: 1.8rem; font-weight: 700; color: #111827; margin-bottom: 20px; }

.co-form-row { display: flex; gap: 16px; margin-bottom: 0; }
.co-form-row .co-field { flex: 1; min-width: 0; }
.co-field { margin-bottom: 16px; }
.co-field label { display: block; font-size: 1.35rem; font-weight: 600; color: #374151; margin-bottom: 6px; }
.co-required { color: #e53935; }
.co-field input, .co-field textarea {
  display: block; width: 100%; border: 1.5px solid #d1dbe8; border-radius: 8px;
  height: 46px; padding: 0 14px; font-size: 1.55rem; outline: none;
  background: #fff; color: #333; transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.co-field input:focus, .co-field textarea:focus {
  border-color: var(--c1s); box-shadow: 0 0 0 3px rgba(9,57,140,.09);
}
.co-field textarea { height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }

.co-pay-method { margin-bottom: 24px; }
.co-pay-option {
  display: flex; align-items: center; gap: 14px;
  border: 2px solid #d1dbe8; border-radius: 10px; padding: 14px 16px;
  cursor: pointer; transition: border-color .2s, background .2s;
}
.co-pay-selected { border-color: var(--c1s); background: #f0f5ff; }
.co-pay-icon { font-size: 2.2rem; color: var(--c1s); flex-shrink: 0; }
.co-pay-name { font-size: 1.55rem; font-weight: 700; color: #111827; }
.co-pay-desc { font-size: 1.3rem; color: #6b7280; margin-top: 2px; }
.co-pay-check { margin-left: auto; font-size: 1.8rem; color: var(--c1s); flex-shrink: 0; }

.co-error { background: #fff3f3; border: 1px solid #fca5a5; border-radius: 8px; color: #b91c1c; font-size: 1.45rem; padding: 12px 16px; margin-bottom: 16px; }
.co-submit-btn {
  width: 100%; background: var(--c1s); color: #fff; border: none; border-radius: 8px;
  font-size: 1.65rem; font-weight: 700; padding: 15px 0; cursor: pointer; letter-spacing: .03em;
  transition: background .2s, transform .15s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.co-submit-btn:hover:not(:disabled) { background: #0a4ab8; transform: translateY(-1px); }
.co-submit-btn:disabled { opacity: .65; cursor: not-allowed; }
.co-terms { font-size: 1.3rem; color: #9ca3af; margin-top: 12px; text-align: center; }
.co-terms a { color: var(--c1s); }
.co-back-cart { display: inline-flex; align-items: center; gap: 6px; font-size: 1.4rem; color: #6b7280; margin-top: 16px; transition: color .2s; }
.co-back-cart:hover { color: var(--c1s); }

.co-summary-items { border: 1px solid #e4eaf3; border-radius: 10px; padding: 16px; background: #fff; margin-bottom: 16px; }
.co-summary-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f4f8; }
.co-summary-item:last-child { border-bottom: none; }
.co-summary-thumb { width: 52px; height: 52px; border-radius: 6px; object-fit: contain; background: #f6f8fc; flex-shrink: 0; padding: 4px; }
.co-thumb-empty { display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 1.6rem; }
.co-summary-item-info { flex: 1; min-width: 0; }
.co-summary-item-name { font-size: 1.45rem; font-weight: 600; color: #111827; }
.co-summary-item-spec { font-size: 1.25rem; color: #6b7280; margin-top: 2px; }
.co-summary-item-qty  { font-size: 1.25rem; color: #9ca3af; margin-top: 2px; }
.co-summary-item-price { font-size: 1.55rem; font-weight: 700; color: var(--c1s); flex-shrink: 0; }
.co-summary-totals { padding: 12px 0; }
.co-summary-row { display: flex; justify-content: space-between; font-size: 1.5rem; color: #374151; margin-bottom: 8px; }
.co-summary-total { font-size: 1.9rem; font-weight: 800; color: #111827; padding-top: 10px; border-top: 2px solid #e4eaf3; margin-top: 4px; }

/* =====================================================================
   Payment Page
   ===================================================================== */
.payment-page {
  max-width: 680px; margin: 48px auto; padding-inline: var(--site-gutter-x);
}
.pay-loading { text-align: center; padding: 80px 0; font-size: 1.6rem; color: #6b7280; }
.pay-loading i { margin-right: 8px; }
.pay-error { text-align: center; padding: 80px 0; }
.pay-error i { font-size: 4rem; color: #fca5a5; display: block; margin-bottom: 16px; }
.pay-error p { font-size: 1.6rem; color: #374151; }
.pay-info-wrap { padding-bottom: 60px; }

.pay-success-box {
  text-align: center; padding: 60px 32px;
  border: 1px solid #e4eaf3; border-radius: 16px; background: #f8fafe;
}
.pay-success-icon { font-size: 5rem; color: #22c55e; margin-bottom: 20px; }
.pay-success-box h2 { font-size: 2.6rem; font-weight: 700; color: #111827; margin-bottom: 12px; }
.pay-success-box p  { font-size: 1.6rem; color: #6b7280; line-height: 1.7; }

.pay-box {
  border: 1px solid #e4eaf3; border-radius: 16px; padding: 32px;
  background: #fff; box-shadow: 0 4px 24px rgba(9,57,140,.07);
}
.pay-box-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
.pay-box-icon { font-size: 3rem; color: var(--c1s); flex-shrink: 0; margin-top: 4px; }
.pay-box-title { font-size: 2.4rem; font-weight: 700; color: #111827; line-height: 1.2; }
.pay-box-subtitle { font-size: 1.45rem; color: #6b7280; margin-top: 4px; }

.pay-amount-block { background: var(--c1s); border-radius: 12px; padding: 24px; text-align: center; margin-bottom: 20px; }
.pay-amount-label { font-size: 1.3rem; color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.pay-amount-value { font-size: 4rem; font-weight: 800; color: #fff; line-height: 1; }
.pay-amount-unit  { font-size: 2rem; font-weight: 600; }
.pay-amount-usd   { font-size: 1.4rem; color: rgba(255,255,255,.7); margin-top: 6px; }

.pay-network-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f0f5ff; color: var(--c1s); border: 1px solid #c7d8f5;
  border-radius: 20px; padding: 6px 14px; font-size: 1.3rem; font-weight: 600;
  margin-bottom: 20px;
}

.pay-address-block { margin-bottom: 24px; }
.pay-address-label { font-size: 1.3rem; font-weight: 700; color: #374151; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.pay-address-row { display: flex; align-items: center; gap: 10px; }
.pay-address-code {
  flex: 1; background: #f6f8fc; border: 1.5px solid #d1dbe8; border-radius: 8px;
  padding: 12px 14px; font-size: 1.35rem; font-family: monospace;
  word-break: break-all; line-height: 1.5; color: #111827;
}
.pay-copy-btn {
  flex-shrink: 0; background: var(--c1s); color: #fff; border: none; border-radius: 8px;
  padding: 12px 16px; font-size: 1.4rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 6px; transition: background .2s; white-space: nowrap;
}
.pay-copy-btn:hover { background: #0a4ab8; }
.pay-address-warning {
  font-size: 1.3rem; color: #b45309; background: #fffbeb; border: 1px solid #fcd34d;
  border-radius: 8px; padding: 10px 14px; margin-top: 10px;
  display: flex; align-items: flex-start; gap: 8px; line-height: 1.5;
}

.pay-steps-list { margin-bottom: 28px; }
.pay-step-item {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 1.5rem; color: #374151; margin-bottom: 10px; line-height: 1.5;
}
.pay-step-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--c1s); color: #fff; font-size: 1.3rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.pay-tx-section { border-top: 1px solid #e4eaf3; padding-top: 24px; }
.pay-tx-label { display: block; font-size: 1.4rem; font-weight: 700; color: #111827; margin-bottom: 10px; }
.pay-tx-row { display: flex; gap: 10px; }
.pay-tx-input {
  flex: 1; border: 1.5px solid #d1dbe8; border-radius: 8px; height: 48px;
  padding: 0 14px; font-size: 1.45rem; outline: none; font-family: monospace;
  transition: border-color .2s, box-shadow .2s;
}
.pay-tx-input:focus { border-color: var(--c1s); box-shadow: 0 0 0 3px rgba(9,57,140,.09); }
.pay-tx-submit {
  flex-shrink: 0; background: #22c55e; color: #fff; border: none; border-radius: 8px;
  padding: 0 20px; height: 48px; font-size: 1.5rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 8px; transition: background .2s;
  white-space: nowrap;
}
.pay-tx-submit:hover:not(:disabled) { background: #16a34a; }
.pay-tx-submit:disabled { opacity: .65; cursor: not-allowed; }

.pay-order-ref {
  text-align: center; font-size: 1.4rem; color: #6b7280; margin-top: 20px;
}
.pay-order-ref a { color: var(--c1s); }

/* =====================================================================
   Mobile Responsive
   ===================================================================== */
@media (max-width: 960px) {
  .cart-layout { flex-direction: column; }
  .cart-summary { flex: none; width: 100%; }
  .cart-summary-box { position: static; }
  .checkout-layout { flex-direction: column; }
  .checkout-summary { flex: none; width: 100%; position: static; }
  .co-form-row { flex-direction: column; gap: 0; }
  .pay-box { padding: 20px; }
  .pay-amount-value { font-size: 3rem; }
  .pay-tx-row { flex-direction: column; }
  .pay-tx-submit { width: 100%; justify-content: center; }
  .pay-address-row { flex-direction: column; align-items: stretch; }
  .pay-copy-btn { justify-content: center; }
}
