/* ========== Order Page ========== */
/* ========== Order Page Styles ========== */
@import url('https://fonts.googleapis.cn/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --red: #e1251b;
  --red-light: #fdf2f2;
  --red-dark: #c11c14;
  --orange: #fff5eb;
  --orange-border: #fdba74;
  --green: #22c55e;
  --blue: #3b82f6;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --radius: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
}

/* ========== Top Bar ========== */
.order-topbar {
  background: white;
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.order-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.order-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.order-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-logo-icon svg { width: 22px; height: 22px; fill: white; }

.order-logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 1px;
}

.order-page-title {
  font-size: 18px;
  font-weight: 500;
  color: #666;
  margin-left: 12px;
}

.order-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.order-search-box {
  display: flex;
  align-items: center;
}

.order-search-input {
  width: 260px;
  padding: 8px 12px;
  border: 2px solid var(--red);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.order-search-input:focus { border-color: var(--red-dark); }

.order-search-btn {
  padding: 8px 16px;
  background: var(--red);
  color: white;
  border: 2px solid var(--red);
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.order-search-btn:hover { background: var(--red-dark); border-color: var(--red-dark); }

/* ========== Notice Banner ========== */
.order-notice {
  background: var(--orange);
  border-bottom: 1px solid var(--orange-border);
}

.order-notice-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notice-icon { color: #d97706; flex-shrink: 0; }

.notice-text {
  font-size: 13px;
  color: #333;
  flex: 1;
  line-height: 1.6;
}

.notice-text a { color: #0055d7; }

.notice-close {
  color: #999;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.notice-close:hover { color: #666; background: rgba(0,0,0,0.06); }

/* ========== Main Layout ========== */
.order-main {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
  background-color: ;
}

/* ========== Section Card ========== */
.section-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.section-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.section-action {
  font-size: 13px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-action a { color: #999; font-size: 13px; transition: color 0.2s; }
.section-action a:hover { color: var(--red); }

.section-action .info-icon { color: #bbb; font-style: normal; font-family: serif; }

/* ========== Address Section ========== */
.address-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.address-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.address-card:hover { border-color: var(--gray-300); }

.address-card.selected {
  border-color: var(--red);
  background: #fff;
}

.address-card.selected::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 20px;
  height: 20px;
  background: var(--red);
  border-radius: 0 0 20px 0;
}

.address-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.address-card.selected .address-check {
  background: var(--red);
  border-color: var(--red);
}

.address-check svg { width: 10px; height: 10px; fill: white; opacity: 0; }
.address-card.selected .address-check svg { opacity: 1; }

.address-content { flex: 1; }

.address-tags { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }

.address-tag {
  padding: 1px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
}

.address-tag.default {
  background: #fce7f3;
  color: #be185d;
  border: 1px solid #fbcfe8;
}

.address-tag.company {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

.address-detail {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 4px;
}

.address-contact {
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
}

.address-phone { color: #999; font-size: 12px; }

.address-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #999;
  font-size: 13px;
  margin-top: 4px;
}

.address-extra svg { width: 14px; height: 14px; fill: currentColor; }

.address-expand {
  text-align: center;
  padding: 10px;
  color: #999;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: color 0.2s;
}

.address-expand:hover { color: var(--red); }
.address-expand svg { width: 12px; height: 12px; fill: currentColor; transition: transform 0.2s; }
.address-expand.expanded svg { transform: rotate(180deg); }

/* ========== Order Info Section ========== */
.order-items { }

.shop-group { }

.shop-header {
  padding: 14px 20px;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--gray-100);
}

.shop-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  appearance: none;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  position: relative;
}

.shop-checkbox:checked {
  background: var(--red);
  border-color: var(--red);
}

.shop-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 7px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.shop-name { font-size: 14px; color: #333; font-weight: 500; }

.shop-icon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.delivery-bar {
  padding: 10px 20px;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
}

.delivery-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.delivery-label {
  font-size: 13px;
  color: #999;
}

.delivery-value {
  font-size: 13px;
  color: #333;
  font-weight: 500;
}

.delivery-date {
  color: var(--red);
  font-weight: 700;
}

.delivery-select {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--red);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius);
  transition: background 0.2s;
}

.delivery-select:hover { background: var(--red-light); }

.activity-bar {
  padding: 8px 20px;
  background: #fff9e6;
  font-size: 12px;
  color: #995600;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--gray-100);
}

.activity-bar svg { width: 12px; height: 12px; fill: currentColor; }

/* ========== Product Items ========== */
.order-item {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s;
}

.order-item:last-child { border-bottom: none; }

.item-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  appearance: none;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  position: relative;
}

.item-checkbox:checked {
  background: var(--red);
  border-color: var(--red);
}

.item-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 7px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.item-image {
  width: 80px;
  height: 80px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.item-image-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 0 0 4px 0;
}

.item-image svg { width: 40px; height: 40px; fill: var(--gray-300); }

.item-info {
  flex: 1;
  min-width: 0;
}

.item-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.item-badge {
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid;
}

.item-badge.self {
  background: var(--red);
  color: white;
  border-color: var(--red);
}

.item-badge.jd-delivery {
  background: #fff0f0;
  color: var(--red);
  border-color: #ffe0e0;
}

.item-name {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.item-spec {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}

.item-note {
  font-size: 12px;
  color: #999;
}

.item-note a { font-size: 12px; color: #0055d7; }

.item-right {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-shrink: 0;
}

.item-price-col {
  text-align: right;
  min-width: 100px;
}

.item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
}

.item-price-origin {
  font-size: 12px;
  color: #999;
  text-decoration: line-through;
  margin-top: 2px;
}

.item-weight {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

/* ========== Invoice Section ========== */
.invoice-bar {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--gray-100);
}

.invoice-label {
  font-size: 14px;
  color: #333;
}

.invoice-value {
  font-size: 13px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.invoice-value:hover { background: var(--gray-50); color: var(--red); }

.invoice-value svg { width: 12px; height: 12px; fill: currentColor; }

/* ========== Right Sidebar ========== */
.order-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Security Banner */
.security-banner {
  background: var(--orange);
  border: 1px solid var(--orange-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #92400e;
}

.security-banner svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

/* Checkout Card */
.checkout-card {
  background: white;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Payment Methods */
.payment-section {
  padding: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.payment-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
}

.payment-options { display: flex; flex-direction: column; gap: 10px; }

.payment-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.payment-option:hover { border-color: var(--gray-300); }

.payment-option.selected {
  border-color: var(--red);
  background: #fff9f9;
}

.payment-option-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-option-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-option-icon svg { width: 18px; height: 18px; fill: var(--gray-500); }
.payment-option.selected .payment-option-icon svg { fill: var(--red); }

.payment-option-name {
  font-size: 13px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 4px;
}

.payment-option-name .info-icon {
  color: #bbb;
  font-size: 12px;
  font-style: normal;
}

.payment-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  appearance: none;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  flex-shrink: 0;
}

.payment-radio:checked {
  background: var(--red);
  border-color: var(--red);
}

.payment-radio:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 4px;
  width: 4px;
  height: 6px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Amount Summary */
.amount-section {
  padding: 16px;
}

.amount-rows { display: flex; flex-direction: column; gap: 8px; }

.amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.amount-row-label { color: #666; }

.amount-row-value { color: #333; }

.amount-row.discount .amount-row-value { color: var(--red); }

.amount-row.freight .amount-row-value { color: #22c55e; }

.amount-row.total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dotted var(--gray-200);
  font-size: 14px;
}

.amount-row.total .amount-row-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.amount-row.total .amount-row-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
}

.amount-row.saving {
  font-size: 12px;
  margin-top: -4px;
  margin-bottom: 4px;
}

.amount-row.saving .amount-row-value { color: #f97316; }

.discount-detail {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--red);
  font-size: 12px;
  cursor: pointer;
}

.discount-detail svg { width: 10px; height: 10px; fill: currentColor; }

/* Submit Button */
.submit-section {
  padding: 16px;
  background: white;
  border-top: 3px solid var(--red);
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: background 0.2s;
  font-family: inherit;
}

.submit-btn:hover { background: var(--red-dark); }

.submit-btn:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
}

.submit-agreement {
  font-size: 11px;
  color: #999;
  text-align: center;
  margin-top: 8px;
}

.submit-agreement a { color: #0055d7; }

/* Item Count Badge */
.item-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  background: var(--red);
  color: white;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  padding: 0 5px;
  margin-left: 4px;
}

/* ========== Footer ========== */
.order-footer {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 12px;
  border-top: 1px solid var(--gray-200);
  margin-top: 20px;
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .order-main {
    grid-template-columns: 1fr;
  }

  .order-sidebar {
    position: static;
    order: -1;
  }

  .order-topbar-right .order-search-box {
    display: none;
  }

  .item-right {
    gap: 20px;
  }

  .item-price-col {
    min-width: 80px;
  }
}

@media (max-width: 640px) {
  .order-topbar-inner {
    padding: 10px 12px;
  }

  .order-logo-text {
    font-size: 18px;
  }

  .order-page-title {
    display: none;
  }

  .order-main {
    padding: 0 10px;
    gap: 10px;
  }

  .section-header {
    padding: 12px;
  }

  .address-list,
  .shop-header,
  .order-item,
  .invoice-bar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .delivery-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 12px;
  }

  .item-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

  .item-price-col {
    text-align: right;
    min-width: auto;
  }

  .submit-section {
    padding: 12px;
  }

  .submit-btn {
    padding: 12px;
    font-size: 15px;
  }
}
