@charset "UTF-8";
/* ==========================================================================
   汐云 XiYun Cart Unified Stylesheet (Light & Dark Adaptive)
   Scoped exclusively to .xy-cart-* / cart components so it never collides
   with clientarea/xiyun global header & footer rules.
   ========================================================================== */

:root,
[data-theme="light"] {
  --xy-cart-green: #16a34a;
  --xy-cart-green-text: #15803d;
  --xy-cart-green-soft: #dcfce7;
  --xy-cart-red: #ef4444;
  --xy-cart-red-soft: #fee2e2;
  --xy-cart-amber: #d97706;
  --xy-cart-amber-soft: #fef3c7;
  --xy-cart-pill-bg: #ffffff;
  --xy-cart-pill-border: #e2daf0;
  --xy-cart-pill-text: #5e5670;
  --xy-cart-pill-active-bg: #e4d7ff;
  --xy-cart-pill-active-border: #d1bcff;
  --xy-cart-pill-active-text: #6d28d9;
  --xy-cart-shadow-sm: 0 2px 6px rgba(22, 19, 31, 0.03);
  --xy-cart-shadow-md: 0 6px 20px rgba(22, 19, 31, 0.05);
  --xy-cart-shadow-accent: 0 8px 22px rgba(124, 58, 237, 0.22);
}

[data-theme="dark"] {
  --xy-cart-green: #4ade80;
  --xy-cart-green-text: #4ade80;
  --xy-cart-green-soft: rgba(74, 222, 128, 0.15);
  --xy-cart-red: #f87171;
  --xy-cart-red-soft: rgba(248, 113, 113, 0.15);
  --xy-cart-amber: #fbbf24;
  --xy-cart-amber-soft: rgba(251, 191, 36, 0.16);
  --xy-cart-pill-bg: rgba(255, 255, 255, 0.09);
  --xy-cart-pill-border: rgba(255, 255, 255, 0.14);
  --xy-cart-pill-text: #cbd5e1;
  --xy-cart-pill-active-bg: rgba(139, 92, 246, 0.30);
  --xy-cart-pill-active-border: rgba(167, 139, 250, 0.42);
  --xy-cart-pill-active-text: #ede9fe;
  --xy-cart-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.30);
  --xy-cart-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.40);
  --xy-cart-shadow-accent: 0 8px 26px rgba(139, 92, 246, 0.35);
}

/* ── Page Container ── */
.xy-cart-page {
  width: 100%;
  padding-bottom: 48px;
}

.xy-cart-num {
  font-family: 'Outfit', 'PingFang SC', sans-serif;
  font-variant-numeric: tabular-nums;
}

/* ── Top Hero Banner ── */
.xy-cart-hero {
  margin-bottom: 22px;
}

.xy-cart-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 28px;
  box-shadow: var(--xy-cart-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.xy-hero-title-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.xy-hero-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.xy-hero-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.xy-hero-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.xy-hero-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.6;
}

.xy-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.xy-hero-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 15px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.xy-hero-back:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.xy-hero-search {
  position: relative;
  width: 260px;
  max-width: 100%;
}

.xy-hero-search input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  transition: all 0.2s ease;
}

.xy-hero-search input::placeholder {
  color: var(--text-muted);
}

.xy-hero-search input:focus {
  border-color: var(--accent);
  background: var(--bg-card-solid);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.xy-hero-search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.xy-hero-search-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── Two-Column Workspace ── */
.xy-order-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.xy-config-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.xy-config-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--xy-cart-shadow-sm);
}

.xy-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.xy-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.xy-step-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.xy-section-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.xy-section-hint {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ── Step 01: Region / Group Grid ── */
.xy-region-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.xy-region-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  text-align: left;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 0;
  position: relative;
  margin: 0;
}

.xy-region-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.xy-region-card:hover {
  background: var(--bg-subtle-hover);
}

.xy-region-card.active {
  background: var(--accent-card-bg);
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.xy-flag-box {
  width: 28px;
  height: 21px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
  color: var(--accent);
  font-size: 15px;
}

.xy-flag-box svg,
.xy-flag-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xy-region-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  white-space: normal;
  word-break: keep-all;
}

.xy-region-card.active .xy-region-name {
  color: var(--accent);
}

/* ── Step 02: Tier Tabs & Info Bar ── */
.xy-tier-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.xy-tier-tabs:last-child {
  margin-bottom: 0;
}

.xy-tier-tab {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  text-align: left;
  text-decoration: none !important;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.xy-tier-tab:hover {
  background: var(--bg-subtle-hover);
}

.xy-tier-tab.active {
  background: var(--accent-card-bg);
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.xy-tier-tab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.xy-tier-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
}

.xy-tier-tab.active .xy-tier-name {
  color: var(--accent);
}

.xy-tier-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.xy-tier-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--xy-cart-pill-bg);
  border: 1px solid var(--xy-cart-pill-border);
  color: var(--xy-cart-pill-text);
  transition: all 0.2s ease;
}

/* 商品组自定义字段多色标签体系（浅色 & 深色自适应） */
.xy-tier-pill.xy-pill-c0 {
  background: #f3e8ff;
  border-color: #e9d5ff;
  color: #7e22ce;
}
.xy-tier-pill.xy-pill-c1 {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}
.xy-tier-pill.xy-pill-c2 {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #15803d;
}
.xy-tier-pill.xy-pill-c3 {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
}
.xy-tier-pill.xy-pill-c4 {
  background: #ffe4e6;
  border-color: #fecdd3;
  color: #be123c;
}
.xy-tier-pill.xy-pill-c5 {
  background: #e0e7ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

[data-theme="dark"] .xy-tier-pill.xy-pill-c0 {
  background: rgba(168, 85, 247, 0.22);
  border-color: rgba(192, 132, 252, 0.35);
  color: #e9d5ff;
}
[data-theme="dark"] .xy-tier-pill.xy-pill-c1 {
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(56, 189, 248, 0.35);
  color: #bae6fd;
}
[data-theme="dark"] .xy-tier-pill.xy-pill-c2 {
  background: rgba(34, 197, 94, 0.20);
  border-color: rgba(74, 222, 128, 0.35);
  color: #bbf7d0;
}
[data-theme="dark"] .xy-tier-pill.xy-pill-c3 {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}
[data-theme="dark"] .xy-tier-pill.xy-pill-c4 {
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(251, 113, 133, 0.35);
  color: #fecdd3;
}
[data-theme="dark"] .xy-tier-pill.xy-pill-c5 {
  background: rgba(99, 102, 241, 0.24);
  border-color: rgba(129, 140, 248, 0.38);
  color: #c7d2fe;
}

.xy-tier-desc-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--text-sub);
  font-size: 13px;
  margin-bottom: 18px;
}

.xy-tier-desc-bar:last-child {
  margin-bottom: 0;
}

.xy-tier-desc-bar svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ── 2-Col Plan Cards（每行2个，舒展不拥挤） ── */
.xy-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.xy-plan-card {
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  border-radius: 16px;
  padding: 20px;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.xy-plan-card:hover {
  background: var(--bg-subtle-hover);
  transform: translateY(-2px);
}

.xy-plan-card.active {
  background: var(--accent-card-bg);
  border-color: var(--accent);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.xy-plan-card.is-soldout,
.xy-plan-card.is-coming-soon {
  opacity: 0.68;
  cursor: not-allowed;
}

.xy-plan-card.is-soldout:hover,
.xy-plan-card.is-coming-soon:hover {
  transform: none;
  background: var(--bg-subtle);
}

.xy-plan-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.xy-plan-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.xy-plan-stock {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--xy-cart-green-soft);
  color: var(--xy-cart-green-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.xy-plan-stock.is-out {
  background: var(--xy-cart-red-soft);
  color: var(--xy-cart-red);
}

.xy-plan-stock.is-coming-soon {
  background: var(--xy-cart-amber-soft, #fef3c7);
  color: var(--xy-cart-amber, #d97706);
}

.xy-plan-price-wrap {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.xy-plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-wrap: wrap;
}

.xy-plan-currency {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.xy-plan-price {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-main);
}

.xy-plan-card.active .xy-plan-currency,
.xy-plan-card.active .xy-plan-price {
  color: var(--accent);
}

.xy-plan-unit {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-left: 3px;
}

.xy-plan-subprice {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.xy-plan-subprice .is-strike {
  text-decoration: line-through;
}

.xy-plan-subprice .is-trial {
  color: var(--xy-cart-green-text);
  font-weight: 600;
}

.xy-plan-specs {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 0;
  flex: 1;
}

.xy-plan-spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.xy-plan-spec-label {
  color: var(--text-muted);
  flex-shrink: 0;
}

.xy-plan-spec-val {
  font-weight: 600;
  color: var(--text-main);
  text-align: right;
  word-break: break-word;
}

.xy-plan-spec-plain {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.5;
  word-break: break-word;
}

.xy-plan-cta {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-btn);
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.xy-plan-cta:hover {
  background: var(--accent-btn-hover);
  transform: translateY(-1px);
}

.xy-plan-cta.is-disabled {
  background: var(--bg-card-solid);
  color: var(--text-muted) !important;
  border: 1px solid var(--border);
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Configuration Option Rows ── */
.xy-opt-block {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.xy-opt-block:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.xy-opt-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.xy-opt-help {
  color: var(--accent);
  cursor: help;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
}

/* Selectable Option Pills (radio / linkage buttons) */
.xy-opt-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.xy-opt-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 16px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  transition: all 0.2s ease;
  position: relative;
}

.xy-opt-pill input[type="radio"],
.xy-opt-pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.xy-opt-pill:hover {
  background: var(--bg-subtle-hover);
}

.xy-opt-pill.active {
  background: var(--accent-card-bg);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 3px 10px var(--accent-glow);
}

.xy-opt-pill.disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

/* Range Slider Control */
.xy-range-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}

.xy-range-track-box {
  position: relative;
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
}

.xy-range-wrap input[type="range"].configoption_range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: var(--border-strong);
  outline: none;
  cursor: pointer;
}

.xy-range-wrap input[type="range"].configoption_range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-card-solid);
  border: 4px solid var(--accent-btn);
  box-shadow: 0 2px 8px var(--accent-glow);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.xy-range-wrap input[type="range"].configoption_range::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

.xy-range-wrap input[type="range"].configoption_range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-card-solid);
  border: 4px solid var(--accent-btn);
  box-shadow: 0 2px 8px var(--accent-glow);
  cursor: pointer;
}

.xy-range-wrap .range_none {
  position: absolute;
  height: 6px;
  display: block;
  background: var(--border);
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.xy-range-input-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.xy-range-input-box .configoption_range_val {
  width: 78px !important;
  height: 36px;
  text-align: center;
  font-weight: 700;
  border-radius: 10px !important;
  border: 1px solid var(--border-strong) !important;
  background: var(--bg-subtle) !important;
  color: var(--text-main) !important;
  padding: 0 8px !important;
}

.xy-range-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  min-width: 26px;
}

/* ── OS Selection Card Grid (上下双层结构，系统名与版本号100%完整显示不截断) ── */
.xy-os-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.xy-os-card {
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 0;
}

.xy-os-card:hover {
  background: var(--bg-subtle-hover);
}

.xy-os-card.active {
  background: var(--accent-card-bg);
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.xy-os-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.xy-os-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.xy-os-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.xy-os-icon img,
.xy-os-icon svg {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.xy-os-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  word-break: break-word;
}

.xy-os-card.active .xy-os-name {
  color: var(--accent);
}

.xy-os-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  color: transparent;
  transition: all 0.2s ease;
}

.xy-os-card.active .xy-os-check {
  background: var(--accent-btn);
  border-color: var(--accent-btn);
  color: #ffffff;
}

.xy-os-select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card-solid);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.xy-os-card.active .xy-os-select {
  border-color: var(--accent);
}

.xy-os-hidden-sync {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.xy-hidden-params {
  display: none !important;
}

/* ── Billing Cycle Grid (根据可用周期数量自动均分宽度) ── */
.xy-cycle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  width: 100%;
}

.xy-cycle-card {
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  border-radius: 16px;
  padding: 18px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 112px;
  cursor: pointer;
  margin: 0;
  transition: all 0.2s ease;
  position: relative;
}

.xy-cycle-card input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
}

.xy-cycle-card:hover {
  background: var(--bg-subtle-hover);
}

.xy-cycle-card.active {
  background: var(--accent-card-bg);
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.xy-cycle-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}

.xy-cycle-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.xy-cycle-card.active .xy-cycle-name {
  color: var(--accent);
}

.xy-cycle-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--xy-cart-pill-bg);
  border: 1px solid var(--xy-cart-pill-border);
  color: var(--xy-cart-pill-text);
  white-space: nowrap;
}

.xy-cycle-tag.discount {
  background: var(--xy-cart-green-soft);
  border-color: transparent;
  color: var(--xy-cart-green-text);
}

.xy-cycle-tag.is-best {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  border-color: transparent;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.28);
}

.xy-cycle-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.xy-cycle-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.xy-promo-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.xy-promo-feedback {
  font-size: 12px;
  margin-top: 6px;
  min-height: 16px;
}

.xy-promo-feedback.ok {
  color: var(--xy-cart-green-text);
}

.xy-promo-feedback.err {
  color: var(--xy-cart-red);
}

.xy-tos-warn {
  font-size: 12px;
  color: var(--xy-cart-red);
  min-height: 16px;
  margin-top: -8px;
  margin-bottom: 8px;
}

.xy-summary-flag {
  width: 20px;
  height: 15px;
  border-radius: 3px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.xy-summary-flag svg,
.xy-summary-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xy-embed-loading {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ── Form Inputs Inside Cart Cards ── */
.xy-cart-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.xy-cart-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.xy-cart-field.is-full {
  grid-column: 1 / -1;
}

.xy-cart-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin: 0;
}

.xy-cart-input,
.xy-cart-page select.xy-cart-input,
.xy-cart-page textarea.xy-cart-input {
  width: 100%;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  transition: all 0.2s ease;
}

.xy-cart-input:focus {
  border-color: var(--accent);
  background: var(--bg-card-solid);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.xy-cart-input:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.xy-cart-input.is-invalid {
  border-color: var(--xy-cart-red) !important;
}

.xy-pwd-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.xy-pwd-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.xy-pwd-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.xy-error-tip {
  color: var(--xy-cart-red);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

/* ── Sticky Right Order Summary Column（滑动时固定高度，底部优惠码/条款/加入购物车始终可见） ── */
.xy-summary-column {
  position: sticky;
  top: 84px;
}

.xy-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--xy-cart-shadow-md);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 102px);
}

.xy-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.xy-summary-scroll-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
}

.xy-summary-footer {
  flex-shrink: 0;
}

.xy-summary-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-main);
}

.xy-summary-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--xy-cart-green-soft);
  color: var(--xy-cart-green-text);
  white-space: nowrap;
}

.xy-cart-page .xy-summary-list {
  list-style: none;
  margin: 0;
  padding: 0 0 16px;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xy-cart-page .xy-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.45;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.xy-summary-label {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.xy-summary-val {
  font-weight: 600;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  text-align: right;
  word-break: break-word;
}

.xy-summary-subval {
  color: var(--text-main);
  font-weight: 600;
  word-break: break-word;
}

.xy-summary-icon {
  height: 15px;
  width: auto;
  border-radius: 2px;
  vertical-align: middle;
}

/* Price Breakdown Box */
.xy-price-breakdown {
  background: var(--bg-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.xy-price-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-sub);
}

.xy-price-line.is-discount {
  color: var(--xy-cart-green-text);
  font-weight: 600;
}

.xy-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-strong);
}

.xy-total-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.xy-total-amount {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* Promo Code Box */
.xy-promo-box {
  margin-bottom: 16px;
}

.xy-promo-input-group {
  display: flex;
  gap: 8px;
}

.xy-promo-input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s ease;
}

.xy-promo-input:focus {
  border-color: var(--accent);
  background: var(--bg-card-solid);
}

.xy-promo-btn {
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: none;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.xy-promo-btn:hover {
  background: var(--accent-btn);
  color: #fff;
}

.xy-promo-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--xy-cart-green-soft);
  color: var(--xy-cart-green-text);
  font-size: 13px;
  font-weight: 600;
}

.xy-promo-remove {
  color: var(--xy-cart-red) !important;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
}

/* TOS Checkbox */
.xy-tos-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-sub);
  margin-bottom: 14px;
  cursor: pointer;
  line-height: 1.5;
}

.xy-tos-check input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent-btn);
  cursor: pointer;
  flex-shrink: 0;
}

.xy-tos-check a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.xy-tos-check a:hover {
  text-decoration: underline;
}

/* Primary Submit Button */
.xy-cart-submit-btn {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: var(--accent-btn);
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--xy-cart-shadow-accent);
  transition: all 0.2s ease;
}

.xy-cart-submit-btn:hover:not(:disabled) {
  background: var(--accent-btn-hover);
  transform: translateY(-1px);
}

.xy-cart-submit-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── Viewcart: Account Info, Auth Tabs, Payment Gateways & Cart Items ── */
.xy-user-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.xy-user-info-item {
  padding: 12px 15px;
  border-radius: 12px;
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.xy-user-info-label {
  font-size: 12px;
  color: var(--text-muted);
}

.xy-user-info-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-word;
}

.xy-auth-switch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 15px;
  border-radius: 12px;
  background: var(--bg-subtle);
}

.xy-auth-switch-btn {
  padding: 7px 14px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.xy-auth-switch-btn:hover {
  background: var(--accent-btn);
  color: #fff;
}

.xy-balance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.xy-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0;
}

.xy-balance-card:hover {
  background: var(--bg-subtle-hover);
}

.xy-balance-card.checkboxSelect {
  background: var(--accent-card-bg);
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.xy-balance-left {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.xy-balance-left input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-btn);
  cursor: pointer;
}

.xy-balance-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

/* SVG Payment Gateways Grid */
.xy-pay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.xy-pay-card.addfunds-payment {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  min-height: 54px;
  width: 100%;
  height: auto;
  margin: 0;
  text-align: left;
  box-shadow: none;
}

.xy-pay-card.addfunds-payment:hover {
  background: var(--bg-subtle-hover);
}

.xy-pay-card.addfunds-payment.active {
  background: var(--accent-card-bg);
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.xy-pay-card.addfunds-payment input.hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.xy-pay-svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.xy-pay-svg svg {
  width: 24px;
  height: 24px;
  display: block;
}

.xy-pay-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  word-break: break-word;
}

.xy-pay-card.addfunds-payment.active .xy-pay-title {
  color: var(--accent);
}

/* Cart Items Inside Right Summary */
.xy-cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 48vh;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 2px;
}

.xy-cart-item-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.xy-cart-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.xy-cart-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.xy-cart-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.xy-item-act-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  color: var(--text-sub) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.xy-item-act-btn:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--accent-soft);
}

.xy-item-act-btn.is-danger:hover {
  border-color: var(--xy-cart-red);
  color: var(--xy-cart-red) !important;
  background: var(--xy-cart-red-soft);
}

.xy-cart-item-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-sub);
}

.xy-cart-item-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.xy-cart-qty-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.xy-cart-qty-bar input[type="number"] {
  width: 68px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card-solid);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
}

.xy-cart-qty-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card-solid);
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.xy-cart-qty-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.xy-cart-item-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed var(--border-strong);
  font-size: 12.5px;
  color: var(--text-muted);
}

.xy-cart-item-subtotal {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

/* ── Empty State & Pagination ── */
.xy-cart-empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
}

.xy-cart-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 14px;
}

.xy-cart-empty h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 6px;
}

.xy-cart-empty p {
  font-size: 13.5px;
  color: var(--text-sub);
  margin: 0 0 18px;
}

.xy-cart-pagination {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

/* ── Order Complete Page ── */
.xy-complete-card {
  max-width: 560px;
  margin: 32px auto 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--xy-cart-shadow-md);
}

.xy-complete-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: var(--xy-cart-green-soft);
  color: var(--xy-cart-green-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin-bottom: 18px;
}

.xy-complete-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
}

.xy-complete-desc {
  margin: 0 0 26px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.65;
}

.xy-complete-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Cart Alert Banner ── */
.xy-cart-alert {
  padding: 13px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.xy-cart-alert.is-danger {
  background: var(--xy-cart-red-soft);
  color: var(--xy-cart-red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.xy-cart-alert.is-info {
  background: var(--accent-soft);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
}

/* ── Captcha & Verification Inline Row（严格限制验证码图片宽度，避免挤压输入框） ── */
.xy-inline-group {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.xy-inline-group .xy-cart-input {
  flex: 1 1 auto;
  min-width: 110px;
}

.xy-captcha-img {
  width: 116px !important;
  min-width: 116px;
  max-width: 116px !important;
  height: 40px !important;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  flex: 0 0 116px;
  display: block;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.xy-captcha-img:hover {
  opacity: 0.88;
  border-color: var(--accent);
}

.xy-cart-field [data-finance-captcha] img {
  max-width: 120px !important;
  height: 40px !important;
  object-fit: cover;
  border-radius: 10px;
}

/* ── Cart Summary Live Total Box (统一截图 1 样式，仅展示应付总额) ── */
.xy-summary-total-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-subtle);
}

.xy-summary-total-label {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.xy-summary-total-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.05;
  white-space: nowrap;
}

/* ── Top-to-Bottom Unified Checkout Architecture (上下架构 + 3列结构化配置矩阵 + 平级支付渠道) ── */
.xy-co-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.xy-co-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.xy-clear-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: var(--xy-cart-red-soft);
  color: var(--xy-cart-red) !important;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.xy-clear-cart-btn:hover {
  background: var(--xy-cart-red);
  border-color: var(--xy-cart-red);
  color: #ffffff !important;
}

.xy-co-prod-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.xy-co-prod-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease;
}

.xy-co-prod-card:hover {
  border-color: var(--border-strong);
}

.xy-co-prod-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.xy-co-prod-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.xy-checkout-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.xy-checkout-item-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.xy-co-prod-host {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
}

.xy-co-prod-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.xy-co-price-group {
  text-align: right;
}

.xy-checkout-item-sub {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.15;
}

.xy-checkout-item-orig {
  font-size: 12px;
  color: var(--xy-cart-green-text);
  margin-top: 2px;
}

/* 上下架构专属：3 列结构化规格卡片矩阵（直观不空旷） */
.xy-co-spec-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.xy-co-spec-cell {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.xy-co-spec-label {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.25;
}

.xy-co-spec-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  word-break: break-word;
}

.xy-checkout-item-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  color: var(--text-sub) !important;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.xy-checkout-item-btn:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--accent-soft);
}

.xy-checkout-item-btn.is-danger:hover {
  border-color: var(--xy-cart-red);
  color: var(--xy-cart-red) !important;
  background: var(--xy-cart-red-soft);
}

/* 统一平级支付渠道网格（余额、信用额、支付宝、微信完全平级并排） */
.xy-pay-unified-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.xy-pay-unified-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-radius: 13px;
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  cursor: pointer;
  margin: 0;
  min-height: 60px;
  position: relative;
  transition: all 0.2s ease;
}

.xy-pay-unified-card:hover {
  background: var(--bg-subtle-hover);
}

.xy-pay-unified-card.active,
.xy-pay-unified-card.checkboxSelect {
  background: var(--accent-card-bg);
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.xy-pay-unified-card input[type="radio"],
.xy-pay-unified-card input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.xy-pay-unified-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.xy-pay-unified-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  word-break: break-word;
}

.xy-pay-unified-card.active .xy-pay-unified-title,
.xy-pay-unified-card.checkboxSelect .xy-pay-unified-title {
  color: var(--accent);
}

.xy-pay-unified-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.xy-pay-unified-card.active .xy-pay-check,
.xy-pay-unified-card.checkboxSelect .xy-pay-check {
  background: var(--accent-btn);
  border-color: var(--accent-btn);
  color: #ffffff;
}

/* 底部结算汇总栏 */
.xy-co-final-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.xy-co-final-left {
  flex: 1 1 320px;
  min-width: 0;
}

.xy-co-final-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.xy-co-final-btn {
  min-width: 188px;
  width: auto !important;
  padding: 0 28px;
  height: 48px;
}

@media (max-width: 992px) {
  .xy-co-spec-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .xy-pay-unified-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .xy-co-spec-matrix,
  .xy-pay-unified-grid {
    grid-template-columns: 1fr;
  }
  .xy-co-final-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .xy-co-final-btn {
    width: 100% !important;
  }
}

/* ── Standalone ConfigureProduct Compact Hardware Grid ── */
.xy-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px;
}

.xy-spec-grid .xy-opt-block {
  padding-bottom: 14px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}

.xy-spec-grid .xy-opt-block.is-full {
  grid-column: 1 / -1;
}

/* ── Modern Viewcart Checkout Enhancements ── */
.xy-checkout-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.xy-step-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.xy-step-chip.is-done {
  background: var(--xy-cart-green-soft);
  color: var(--xy-cart-green-text);
}

.xy-step-chip.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.xy-step-arrow {
  color: var(--border-strong);
  font-size: 14px;
}

.xy-auth-seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  gap: 4px;
}

.xy-auth-seg-btn {
  padding: 7px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.xy-auth-seg-btn:hover {
  color: var(--text-main);
}

.xy-auth-seg-btn.is-active {
  background: var(--bg-card-solid);
  color: var(--accent);
  box-shadow: var(--xy-cart-shadow-sm);
}

.xy-profile-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--accent-card-bg);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.xy-profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent-btn);
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.xy-promo-card-box {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  margin-bottom: 18px;
}

.xy-pay-check {
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.xy-pay-card.addfunds-payment.active .xy-pay-check {
  background: var(--accent-btn);
  border-color: var(--accent-btn);
  color: #ffffff;
}

.xy-checkout-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── All-Sold-Out & Coming-Soon State Banner & Summary Badge ── */
.xy-summary-badge.is-soldout {
  background: var(--xy-cart-red-soft, rgba(239, 68, 68, 0.1));
  color: var(--xy-cart-red, #dc2626);
}

.xy-summary-badge.is-coming-soon {
  background: var(--xy-cart-amber-soft, #fef3c7);
  color: var(--xy-cart-amber, #d97706);
}

.xy-soldout-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--bg-card-solid, #ffffff);
  border: 1px solid var(--border);
  box-shadow: var(--xy-cart-shadow-sm);
}

.xy-soldout-banner-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1 1 280px;
  min-width: 0;
}

.xy-soldout-banner-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--xy-cart-red-soft, rgba(239, 68, 68, 0.1));
  color: var(--xy-cart-red, #dc2626);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  flex-shrink: 0;
}

.xy-soldout-banner-icon.is-coming-soon {
  background: var(--xy-cart-amber-soft, #fef3c7);
  color: var(--xy-cart-amber, #d97706);
}

.xy-soldout-banner-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.xy-soldout-banner-desc {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.55;
}

.xy-soldout-notify-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent) !important;
  border: 1px solid rgba(124, 58, 237, 0.22);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.xy-soldout-notify-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff !important;
}

@media (max-width: 768px) {
  .xy-spec-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile Sticky Bottom Bar (configureproduct ordersummary only) ── */
.xy-mobile-sticky-bar {
  display: none;
}

/* ── Responsive Adaptation ── */
@media (max-width: 1080px) {
  .xy-order-workspace {
    grid-template-columns: 1fr;
  }
  .xy-summary-column {
    position: static;
  }
  .xy-summary-card {
    max-height: none;
  }
  .xy-summary-scroll-body {
    overflow-y: visible;
  }
  /* 平板与手机端显示底部固定结算栏时，隐藏上方配置详情卡片内重复的应付总额与加入购物车按钮 */
  .xy-cart-page.has-mobile-bar .xy-summary-card .xy-summary-footer {
    display: none !important;
  }
  .xy-mobile-sticky-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-card-solid);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 24px rgba(15, 10, 30, 0.12);
    z-index: 950;
  }
  .xy-mobile-sticky-bar .xy-cart-submit-btn {
    width: auto;
    min-width: 148px;
    height: 44px;
    padding: 0 22px;
  }
  .xy-cart-page.has-mobile-bar {
    padding-bottom: 92px;
  }
  .xy-region-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .xy-os-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .xy-pay-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .xy-cart-hero-card,
  .xy-config-section,
  .xy-summary-card {
    padding: 18px;
    border-radius: 16px;
  }
  .xy-hero-title {
    font-size: 19px;
  }
  .xy-hero-search {
    width: 100%;
  }
  .xy-hero-actions {
    width: 100%;
  }
  .xy-region-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .xy-tier-tabs {
    grid-template-columns: 1fr;
  }
  .xy-plan-grid {
    grid-template-columns: 1fr;
  }
  .xy-os-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .xy-cycle-grid {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  }
  .xy-cart-field-grid,
  .xy-user-info-grid,
  .xy-balance-grid {
    grid-template-columns: 1fr;
  }
  .xy-pay-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .xy-mobile-sticky-bar {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .xy-mobile-sticky-bar .xy-cart-submit-btn {
    min-width: 136px;
    height: 42px;
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .xy-plan-grid,
  .xy-os-grid {
    grid-template-columns: 1fr;
  }
  .xy-region-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .xy-region-card {
    padding: 11px 12px;
    gap: 9px;
  }
  .xy-region-name {
    font-size: 13px;
  }
  .xy-pay-grid {
    grid-template-columns: 1fr;
  }
}
