/* 机柜认购 / 换电充电 / 能源股权 — LZW 红金主题 */

/* ══════════════════════════════════════
   认购详情页 GoodsBuyView
   ══════════════════════════════════════ */
.buy-detail-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  background: var(--app-bg, #f5f0eb);
}

/* ── 顶部红金 Hero ── */
.buy-hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 20px;
  color: #fff;
  background:
    radial-gradient(ellipse 55% 70% at 92% 8%, rgba(212, 160, 23, 0.32), transparent 55%),
    radial-gradient(ellipse 40% 50% at 0% 100%, rgba(200, 16, 46, 0.35), transparent 50%),
    linear-gradient(155deg, #7a1020 0%, #8b1a2a 52%, #8b1528 100%);
}
.buy-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
  pointer-events: none;
}
.buy-hero-glow {
  position: absolute;
  top: -60px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 215, 110, 0.35) 0%, transparent 70%);
  pointer-events: none;
  animation: buy-glow-pulse 4s ease-in-out infinite;
}
.buy-hero-star {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top, 0px));
  right: 20px;
  font-size: 48px;
  line-height: 1;
  color: rgba(245, 215, 110, 0.12);
  pointer-events: none;
  text-shadow: 0 0 20px rgba(245, 215, 110, 0.2);
}
@keyframes buy-glow-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.buy-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
}
.buy-nav .back {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.buy-nav .back:active { opacity: 0.85; }
.buy-nav .meta { flex: 1; min-width: 0; }
.buy-nav .meta .k {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(232, 176, 106, 0.9);
  font-weight: 600;
}
.buy-nav .meta .t {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--app-display, serif);
  line-height: 1.2;
  color: #fff;
}

.buy-hero-card {
  position: relative;
  z-index: 1;
  margin: 4px 16px 0;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.buy-hero-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: rgba(245, 215, 110, 0.95);
  background: rgba(245, 215, 110, 0.12);
  border: 1px solid rgba(245, 215, 110, 0.25);
}
.buy-hero-card h1 {
  margin: 10px 0 8px;
  font-size: 20px;
  font-weight: 800;
  font-family: var(--app-display, serif);
  line-height: 1.3;
  color: #fff;
}
.buy-hero-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}
.buy-hero-img {
  margin-top: 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.buy-hero-img img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── 主体内容区 ── */
.buy-body {
  position: relative;
  z-index: 1;
  margin-top: -8px;
  padding: 0 16px 16px;
}

.buy-card {
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(213, 200, 180, 0.45);
  box-shadow: 0 4px 20px rgba(122, 16, 32, 0.06);
}
.buy-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.buy-card-title {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--app-display, serif);
  color: var(--app-primary, #c8102e);
  position: relative;
  padding-left: 10px;
}
.buy-card-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #c8102e, #d4a017);
}
.buy-card-sub {
  font-size: 11px;
  color: var(--app-muted, #999);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── 产品说明 ── */
.buy-content {
  font-size: 14px;
  color: var(--app-sub, #666);
  line-height: 1.75;
  word-break: break-word;
}
.buy-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.buy-content p { margin: 0 0 0.65em; }
.buy-content p:last-child { margin-bottom: 0; }
.buy-content strong,
.buy-content b {
  color: var(--app-ink, #1c1c1c);
  font-weight: 700;
}

/* ── 产品参数网格 ── */
.buy-params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.buy-param {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 12px 14px 14px;
  border-radius: 14px;
  background: #faf8f5;
  border: 1px solid rgba(213, 200, 180, 0.4);
  overflow: hidden;
}
.buy-param.wide { grid-column: 1 / -1; }
.buy-param-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #ccc;
}
.buy-param.tone-gold .buy-param-bar { background: linear-gradient(180deg, #d4a017, #f5d76e); }
.buy-param.tone-green .buy-param-bar { background: linear-gradient(180deg, #2ecc71, #27ae60); }
.buy-param.tone-red .buy-param-bar { background: linear-gradient(180deg, #c8102e, #e74c3c); }
.buy-param.tone-gold.wide {
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.08) 0%, rgba(200, 16, 46, 0.05) 100%);
  border-color: rgba(212, 160, 23, 0.35);
}
.buy-param-ico {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200, 16, 46, 0.08);
  color: var(--app-primary, #c8102e);
}
.buy-param.tone-gold .buy-param-ico {
  background: rgba(212, 160, 23, 0.15);
  color: #b8860b;
}
.buy-param.tone-green .buy-param-ico {
  background: rgba(46, 204, 113, 0.12);
  color: #27ae60;
}
.buy-param.tone-red .buy-param-ico {
  background: rgba(200, 16, 46, 0.1);
  color: #c8102e;
}
.buy-param-ico svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.buy-param-body { flex: 1; min-width: 0; }
.buy-param .lab {
  font-size: 11px;
  color: var(--app-muted, #999);
  line-height: 1.3;
  margin-bottom: 4px;
}
.buy-param .val {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--app-display, serif);
  color: var(--app-ink, #1c1c1c);
  line-height: 1.3;
  word-break: break-all;
}
.buy-param.tone-green .val { color: #27ae60; }
.buy-param.tone-gold.wide .val { color: #b8860b; font-size: 18px; }
.buy-param .val small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 400;
  color: var(--app-muted, #999);
  font-family: var(--app-font, sans-serif);
}

/* ── 推广分销返佣（分档列表） ── */
.buy-param.is-promo {
  background: #fafcfb;
  border-color: rgba(39, 174, 96, 0.18);
}
.buy-param.is-promo .buy-param-ico {
  background: rgba(46, 204, 113, 0.12);
  color: #27ae60;
}
.buy-param.is-promo .lab {
  font-size: 11px;
  margin-bottom: 2px;
}
.buy-promo-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.buy-promo-line {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #2d8f5b;
  font-family: var(--app-font, sans-serif);
}
.buy-promo-note {
  margin: 4px 0 0;
  font-size: 10px;
  line-height: 1.45;
  color: var(--app-muted, #999);
  font-family: var(--app-font, sans-serif);
}

/* ── 项目进度 ── */
.buy-progress {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(213, 200, 180, 0.65);
}
.buy-progress .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--app-muted, #999);
}
.buy-progress .head b {
  font-size: 15px;
  font-weight: 800;
  color: #c8102e;
  font-family: var(--app-display, serif);
}
.buy-progress .bar {
  height: 8px;
  border-radius: 8px;
  background: rgba(200, 16, 46, 0.1);
  overflow: hidden;
}
.buy-progress .bar i {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #c8102e, #d4a017);
  transition: width 0.4s ease;
}

/* ── 认购金额 ── */
.buy-card--amount {
  background: linear-gradient(135deg, #fff 0%, #fffaf0 100%);
  border-color: rgba(212, 160, 23, 0.35);
}
.buy-amount-box {
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(212, 160, 23, 0.08) 0%, rgba(200, 16, 46, 0.04) 100%);
  border: 1px solid rgba(212, 160, 23, 0.2);
}
.buy-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.buy-price-row .sym {
  font-size: 20px;
  font-weight: 700;
  color: #b8860b;
  line-height: 1;
}
.buy-price-row .num {
  font-size: 32px;
  font-weight: 800;
  font-family: var(--app-display, serif);
  color: #b8860b;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #d4a017 0%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.buy-price-row .old {
  font-size: 14px;
  font-weight: 400;
  color: #999;
  text-decoration: line-through;
}
.buy-price-row .disc {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #c8102e;
  background: rgba(200, 16, 46, 0.08);
}
.buy-balance-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(212, 160, 23, 0.25);
}
.buy-balance-row .lab {
  font-size: 13px;
  color: var(--app-muted, #999);
}
.buy-balance-row .amt {
  font-size: 15px;
  font-weight: 700;
  color: var(--app-ink, #1c1c1c);
  font-variant-numeric: tabular-nums;
}
.buy-balance-row .amt.warn { color: #c8102e; }
.buy-balance-row .tip {
  width: 100%;
  font-size: 12px;
  color: #c8102e;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(200, 16, 46, 0.06);
}

/* ── 认购页内联支付方式 ── */
.buy-pay-inline {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(212, 160, 23, 0.25);
}
.buy-pay-inline-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.buy-pay-inline-head .lab {
  font-size: 14px;
  font-weight: 600;
  color: var(--app-ink, #1c1c1c);
}
.buy-pay-inline-head .sub {
  font-size: 11px;
  color: var(--app-muted, #999);
}
.buy-pay-inline-empty,
.buy-pay-crypto-hint {
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.45;
  border-radius: 8px;
}
.buy-pay-inline-empty {
  color: #c8102e;
  background: rgba(200, 16, 46, 0.06);
}
.buy-pay-crypto-hint {
  margin-bottom: 10px;
  color: #8a5a00;
  background: #fff8e8;
}
.buy-pay-inline-list {
  display: grid;
  gap: 8px;
}
.buy-pay-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(212, 160, 23, 0.25);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  overflow: visible;
}
.buy-pay-item.is-on {
  border-color: #d4a017;
  background: #fff9eb;
  box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.15);
}
.buy-pay-item.disabled {
  opacity: 0.55;
}
.buy-pay-item .radio {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-radius: 50%;
}
.buy-pay-item.is-on .radio {
  border-color: #d4a017;
  box-shadow: inset 0 0 0 4px #d4a017;
}
.buy-pay-item .logo {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.buy-pay-item .logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.buy-pay-item .name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}
.buy-pay-item .pay-rec {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  flex-shrink: 0;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  color: #b45309;
  background: rgba(212, 160, 23, 0.14);
  border: 1px solid rgba(212, 160, 23, 0.35);
  box-shadow: none;
  pointer-events: auto;
}
.buy-pay-item .pay-rec::after {
  display: none;
}

/* ── 底部固定认购按钮 ── */
.buy-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(213, 200, 180, 0.5);
  box-shadow: 0 -4px 20px rgba(122, 16, 32, 0.06);
}
.buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  margin: 0;
  border: 0;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  font-family: var(--app-display, serif);
  background: linear-gradient(135deg, #f5d76e 0%, #d4a017 55%, #b8860b 100%);
  color: #1c1c1c;
  box-shadow: 0 6px 20px rgba(212, 160, 23, 0.35);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.buy-btn:active:not(:disabled) {
  opacity: 0.92;
  transform: scale(0.99);
}
.buy-btn:disabled {
  opacity: 0.45;
  box-shadow: none;
  background: #c0c4cc;
  color: #fff;
  cursor: not-allowed;
}
.buy-btn-spin {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(28, 28, 28, 0.2);
  border-top-color: #1c1c1c;
  border-radius: 50%;
  animation: buy-spin 0.7s linear infinite;
}
@keyframes buy-spin {
  to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════
   认购列表页 BuyView（保持红金主题）
   ══════════════════════════════════════ */
.buy-list-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: #f7f8fa;
  padding-bottom: calc(var(--app-footer-h, 56px) + env(safe-area-inset-bottom, 0px));
}
.buy-list-page .buy-list-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(213, 222, 228, 0.65);
}
.buy-list-page .buy-list-nav .meta {
  flex: 1;
  min-width: 0;
}
.buy-list-page .buy-list-nav .meta .k {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--app-primary, #c8102e);
  font-weight: 600;
}
.buy-list-page .buy-list-nav .meta .t {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--app-display, sans-serif);
  line-height: 1.2;
  color: var(--app-ink, #1c1c1c);
}
.buy-list-page .buy-list-hero {
  margin: 12px 16px 0;
  padding: 18px 16px 16px;
  border-radius: 22px;
  background:
    radial-gradient(ellipse 55% 70% at 92% 8%, rgba(212, 160, 23, 0.32), transparent 55%),
    radial-gradient(ellipse 40% 50% at 0% 100%, rgba(200, 16, 46, 0.35), transparent 50%),
    linear-gradient(155deg, #7a1020 0%, #8b1a2a 52%, #8b1528 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(122, 16, 32, 0.22);
}
.buy-list-page .buy-list-hero::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -30px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.35) 0%, transparent 70%);
  pointer-events: none;
}
.buy-list-page .buy-list-hero > * {
  position: relative;
  z-index: 1;
}
.buy-list-page .buy-list-hero .k {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}
.buy-list-page .buy-list-hero h2 {
  margin: 6px 0 8px;
  font-size: 20px;
  font-weight: 800;
  font-family: var(--app-display, sans-serif);
  line-height: 1.25;
  color: #fff;
}
.buy-list-page .buy-list-hero p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}
.buy-list-page .buy-list-body {
  padding: 12px 16px;
}
.buy-list-page .buy-prod-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(213, 222, 228, 0.65);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.buy-list-page .buy-prod-card:active {
  opacity: 0.92;
}
.buy-list-page .buy-prod-card .ico {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(200, 16, 46, 0.1), rgba(212, 160, 23, 0.18));
  display: flex;
  align-items: center;
  justify-content: center;
}
.buy-list-page .buy-prod-card .ico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.buy-list-page .buy-prod-card .ico svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #1c1c1c;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.buy-list-page .buy-prod-card .body {
  flex: 1;
  min-width: 0;
}
.buy-list-page .buy-prod-card .title {
  font-size: 15px;
  font-weight: 700;
  color: var(--app-ink, #1c1c1c);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.buy-list-page .buy-prod-card .desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--app-muted, #999);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.buy-list-page .buy-prod-card .tail {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.buy-list-page .buy-prod-card .price {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--app-display, sans-serif);
  color: var(--app-primary, #c8102e);
  white-space: nowrap;
}
.buy-list-page .buy-prod-card .chev {
  font-size: 18px;
  color: #ccc;
  line-height: 1;
}
