/* ============================================================
   page-mac-mini-jiage.css — 套餐定价 · 晶格浅域 (zp-*)
   与首页同系视觉；jg-* 保留给周期切换 JS
   ============================================================ */

html.theme-pearl-elegance .zt-pricing {
  --zt-bg: #f4f8fc;
  --zt-bg-alt: #ffffff;
  --zt-surface: #ffffff;
  --zt-ink: #0c1222;
  --zt-muted: #5a6a85;
  --zt-border: rgba(14, 165, 233, 0.18);
  --zt-border-strong: rgba(14, 165, 233, 0.35);
  --zt-cyan: #06b6d4;
  --zt-blue: #0ea5e9;
  --zt-blue-dark: #0284c7;
  --zt-glow: rgba(6, 182, 212, 0.15);
  --zt-shadow: 0 4px 20px -4px rgba(14, 165, 233, 0.12);
  --zt-shadow-lg: 0 20px 50px -12px rgba(14, 165, 233, 0.2);
  --zt-radius: 10px;
  --zt-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --zt-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace;
  font-family: var(--zt-sans);
  background: var(--zt-bg);
  color: var(--zt-ink);
}

html.theme-pearl-elegance:has(#page-jiage) body {
  background: var(--zt-bg);
  background-image: none;
}

html.theme-pearl-elegance:has(#page-jiage) body::after {
  display: none;
}

.zt-pricing .container {
  max-width: 1180px;
  padding-inline: clamp(20px, 4vw, 32px);
}

.zt-pricing .jg-plans-foot a,
.zt-pricing .zt-head__sub a,
.zt-pricing .zt-faq-grid a {
  color: var(--zt-blue);
  font-weight: 600;
}

/* —— 分栏首屏 —— */
.zp-hero {
  position: relative;
  overflow: hidden;
  margin-top: calc(-1 * var(--nav-height));
  padding: calc(var(--nav-height) + clamp(40px, 7vw, 72px)) 0 clamp(48px, 7vw, 72px);
}

.zp-hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
  animation: zp-grid-drift 28s linear infinite;
}

@keyframes zp-grid-drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 40px 40px, 40px 40px; }
}

.zp-hero__glow {
  position: absolute;
  width: 55%;
  height: 70%;
  pointer-events: none;
}

.zp-hero__glow--left {
  top: -15%;
  left: -15%;
  background: radial-gradient(ellipse, rgba(14, 165, 233, 0.08) 0%, transparent 68%);
}

.zp-hero__glow--right {
  top: 5%;
  right: -12%;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.1) 0%, transparent 65%);
}

.zp-hero__shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.9fr);
  gap: clamp(28px, 4.5vw, 48px);
  align-items: center;
}

.zp-hero__title {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.zp-hero__lead {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.72;
  color: var(--zt-muted);
}

.zp-hero__lead strong {
  color: var(--zt-ink);
}

.zp-hero__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
}

.zp-hero__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--zt-surface);
  border: 1px solid var(--zt-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.zp-hero__features li:hover {
  border-color: var(--zt-border-strong);
  box-shadow: var(--zt-shadow);
}

.zp-hero__feat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(14, 165, 233, 0.15);
}

.zp-hero__feat-icon i {
  width: 16px;
  height: 16px;
  color: var(--zt-blue-dark);
}

.zp-hero__feat-text {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--zt-muted);
}

.zp-hero__feat-text strong {
  display: block;
  font-size: 13px;
  color: var(--zt-ink);
}

.zp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* —— 首屏价格面板 —— */
.zp-pricebar {
  padding: clamp(22px, 3vw, 28px);
  border-radius: var(--zt-radius);
  background: var(--zt-surface);
  border: 1px solid var(--zt-border-strong);
  box-shadow: var(--zt-shadow-lg);
}

.zp-pricebar__label {
  margin: 0 0 16px;
  font-family: var(--zt-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zt-blue-dark);
}

.zp-pricebar__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.zp-pricebar__tier {
  position: relative;
  padding: 18px 14px;
  border-radius: 8px;
  background: var(--zt-bg);
  border: 1px solid var(--zt-border);
  text-align: center;
}

.zp-pricebar__tier--feat {
  border-color: var(--zt-border-strong);
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.06) 0%, #fff 100%);
  box-shadow: var(--zt-shadow);
}

.zp-pricebar__tag {
  position: absolute;
  top: -8px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--zt-mono);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--zt-blue), var(--zt-cyan));
}

.zp-pricebar__spec {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--zt-muted);
}

.zp-pricebar__amt {
  display: block;
  font-family: var(--zt-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--zt-blue-dark);
  line-height: 1.1;
}

.zp-pricebar__amt small {
  font-size: 12px;
  font-weight: 500;
  color: var(--zt-muted);
}

.zp-pricebar__note {
  margin: 0 0 14px;
  font-size: 11px;
  color: var(--zt-muted);
  text-align: center;
}

.zp-pricebar__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  list-style: none;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--zt-border);
}

.zp-pricebar__meta li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--zt-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--zt-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.zp-pricebar__meta i {
  width: 13px;
  height: 13px;
  color: var(--zt-blue);
}

@media (max-width: 900px) {
  .zp-hero__shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .zp-hero__features {
    grid-template-columns: 1fr;
  }

  .zp-pricebar__grid {
    grid-template-columns: 1fr;
  }
}

/* —— 周期切换（jg-* 供 JS 使用） —— */
.jg-period-bar {
  max-width: 720px;
  margin: 0 auto clamp(28px, 4vw, 40px);
  text-align: center;
}

.jg-period-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 5px;
  border-radius: 10px;
  background: var(--zt-surface);
  border: 1px solid var(--zt-border);
  box-shadow: var(--zt-shadow);
}

.jg-period {
  padding: 10px 20px;
  border-radius: 7px;
  border: none;
  font-family: var(--zt-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--zt-muted);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.jg-period:hover {
  color: var(--zt-ink);
  background: rgba(14, 165, 233, 0.06);
}

.jg-period--active {
  color: #fff;
  background: linear-gradient(135deg, var(--zt-blue), var(--zt-cyan));
  box-shadow: 0 4px 12px -2px rgba(14, 165, 233, 0.4);
}

.jg-period-notes {
  min-height: 24px;
}

.jg-period-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--zt-muted);
}

.jg-period-note i {
  width: 15px;
  height: 15px;
  color: var(--zt-cyan);
}

.jg-period-note[hidden] {
  display: none;
}

/* —— 配置卡片 —— */
.jg-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 22px);
  margin-bottom: 16px;
}

.jg-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 36px);
  border-radius: var(--zt-radius);
  background: var(--zt-surface);
  border: 1px solid var(--zt-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.jg-plan:hover {
  border-color: var(--zt-border-strong);
  box-shadow: var(--zt-shadow-lg);
  transform: translateY(-3px);
}

.jg-plan--highlight {
  border-color: var(--zt-border-strong);
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.06) 0%, #fff 100%);
  box-shadow: var(--zt-shadow-lg);
}

.jg-plan__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--zt-mono);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--zt-blue), var(--zt-cyan));
}

.jg-plan__tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--zt-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--zt-blue-dark);
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid var(--zt-border);
}

.jg-plan__tag--gold {
  color: var(--zt-blue-dark);
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.25);
}

.jg-plan__name {
  margin: 0 0 12px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  color: var(--zt-ink);
}

.jg-plan__price {
  margin: 0 0 18px;
  font-family: var(--zt-mono);
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--zt-blue-dark);
}

.jg-plan__per {
  font-size: 16px;
  font-weight: 500;
  color: var(--zt-muted);
}

.jg-plan__specs {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.jg-plan__specs li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--zt-muted);
}

.jg-plan__specs i {
  width: 16px;
  height: 16px;
  color: var(--zt-blue);
  flex-shrink: 0;
}

.jg-plan__fit {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--zt-muted);
}

.jg-plan__cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.jg-plan__cta i {
  width: 16px;
  height: 16px;
}

.jg-plans-foot {
  margin: 0 0 20px;
  text-align: center;
  font-size: 13px;
  line-height: 1.65;
  color: var(--zt-muted);
}

/* 价格切换动画 */
.jg-price-flash {
  animation: zp-price-flash 0.3s ease;
}

@keyframes zp-price-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* —— 加购项 —— */
.jg-addons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 800px;
  margin-inline: auto;
}

.jg-addon {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--zt-radius);
  background: var(--zt-surface);
  border: 1px solid var(--zt-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.jg-addon:hover {
  border-color: var(--zt-cyan);
  box-shadow: var(--zt-shadow);
}

.jg-addon__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(14, 165, 233, 0.15);
}

.jg-addon__ico i {
  width: 22px;
  height: 22px;
  color: var(--zt-blue-dark);
}

.jg-addon__body {
  flex: 1;
  min-width: 0;
}

.jg-addon__body h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.jg-addon__body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--zt-muted);
}

.jg-addon__price {
  flex-shrink: 0;
  margin: 0;
  font-family: var(--zt-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--zt-blue-dark);
  text-align: right;
  white-space: nowrap;
}

.jg-addon__per {
  font-size: 12px;
  font-weight: 500;
  color: var(--zt-muted);
}

@media (max-width: 640px) {
  .jg-addon {
    flex-wrap: wrap;
  }

  .jg-addon__price {
    width: 100%;
    text-align: left;
    padding-left: 60px;
  }
}

/* —— 技术规格 —— */
.zp-specs {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 40px);
  align-items: center;
  margin-bottom: 20px;
}

.zp-specs__visual img {
  display: block;
  width: 100%;
  height: auto;
}

.zp-specs__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.zp-spec-cell {
  padding: 16px 18px;
  border-radius: var(--zt-radius);
  background: var(--zt-surface);
  border: 1px solid var(--zt-border);
}

.zp-spec-cell dt {
  margin-bottom: 4px;
  font-family: var(--zt-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--zt-muted);
}

.zp-spec-cell dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--zt-ink);
}

.zp-spec-cell dd small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--zt-muted);
}

@media (max-width: 800px) {
  .zp-specs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .zp-specs__grid {
    grid-template-columns: 1fr;
  }
}

/* —— 计费四列适配 —— */
.zt-pricing .zt-scenes {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .zt-pricing .zt-scenes {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .zt-pricing .zt-scenes {
    grid-template-columns: 1fr;
  }
}

/* —— 选型提示 —— */
.zp-choose-tip {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 26px;
  border-radius: var(--zt-radius);
  background: rgba(14, 165, 233, 0.04);
  border: 1px dashed var(--zt-border-strong);
}

.zp-choose-tip > i {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  color: var(--zt-blue);
}

.zp-choose-tip h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.zp-choose-tip p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--zt-muted);
}

/* —— 机房节点 —— */
.zp-regions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 40px);
  align-items: center;
}

.zp-regions__visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--zt-radius);
  border: 1px solid var(--zt-border);
  box-shadow: var(--zt-shadow-lg);
}

.zt-pricing .zt-hardware__ports a {
  color: var(--zt-blue-dark);
  font-weight: 600;
  text-decoration: none;
}

.zt-pricing .zt-hardware__ports a:hover {
  color: var(--zt-blue);
}

@media (max-width: 800px) {
  .zp-regions {
    grid-template-columns: 1fr;
  }
}

/* —— 区块锚点 —— */
#jg-plans,
#jg-specs,
#jg-includes,
#jg-versus,
#jg-billing,
#jg-addons,
#jg-journey,
#jg-regions,
#jg-notes {
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

@media (max-width: 700px) {
  .jg-plans {
    grid-template-columns: 1fr;
  }
}

/* —— fade-in —— */
.zt-pricing .fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.zt-pricing .fade-in.visible {
  opacity: 1;
  transform: none;
}

.zt-pricing .zp-hero.fade-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .zt-pricing .fade-in,
  .zt-pricing .zt-stagger > *,
  .zp-hero__grid-bg {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  .jg-plan:hover {
    transform: none;
  }
}
