:root {
  --primary: #316eea;
  --primary-dark: #1a56db;
  --price: #e64a19;
  --text: #303133;
  --muted: #74788d;
  --border: #eef0f5;
  --bg: #f5f6fa;
  --card: #ffffff;
  --menu-active-bg: #f8f8fb;
  --radius: 4px;
  --font: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
}

a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; }

/* ===== Top bar (魔方财务风格) ===== */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  font-size: 18px; font-weight: 700; color: var(--primary-dark);
  letter-spacing: .02em; cursor: pointer; white-space: nowrap;
}
.brand span { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav button, .btn {
  border: none; background: transparent; color: var(--muted);
  padding: 8px 14px; border-radius: var(--radius); cursor: pointer;
}
.nav button:hover, .btn:hover { color: var(--primary); background: rgba(49,110,234,.06); }
.nav button.active { color: var(--primary); font-weight: 600; }
.btn.primary {
  background: var(--primary) !important; color: #fff !important; font-weight: 500;
  padding: 8px 18px;
}
.btn.primary:hover { background: var(--primary-dark) !important; }
.btn.sm { padding: 6px 14px; font-size: 13px; }
.btn.ghost {
  border: 1px solid var(--border); background: #fff; color: var(--text);
}
.btn.buy {
  background: var(--primary) !important; color: #fff !important;
  padding: 6px 16px; font-size: 13px; margin-top: 12px;
}

.shell { max-width: 1200px; margin: 0 auto; padding: 20px 16px 48px; }
.shell.shell-flush { max-width: none; padding: 0 0 48px; }

/* ===== Products catalog ===== */
.products-page { margin: 0; }
.prod-banner {
  background: linear-gradient(115deg, #1a56db 0%, #316eea 50%, #5b8ef5 100%);
  color: #fff; padding: 36px 16px 40px; position: relative; overflow: hidden;
}
.prod-banner::before {
  content: ""; position: absolute; right: -40px; top: -60px;
  width: 280px; height: 280px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.prod-banner::after {
  content: ""; position: absolute; right: 120px; bottom: -80px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.prod-banner .inner {
  max-width: 1200px; margin: 0 auto; position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; flex-wrap: wrap;
}
.prod-banner .eyebrow { opacity: .8; font-size: 13px; margin-bottom: 8px; }
.prod-banner h1 { margin: 0 0 8px; font-size: 26px; font-weight: 700; letter-spacing: .02em; }
.prod-banner .sub { margin: 0; opacity: .88; font-size: 14px; max-width: 36em; line-height: 1.6; }
.prod-search {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  border-radius: 24px; padding: 4px 4px 4px 16px; min-width: 280px;
  backdrop-filter: blur(6px);
}
.prod-search input {
  flex: 1; border: none; background: transparent; color: #fff;
  outline: none; height: 36px; min-width: 0;
}
.prod-search input::placeholder { color: rgba(255,255,255,.7); }
.prod-search button {
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: #fff; color: var(--primary); cursor: pointer; font-weight: 700;
}

.prod-body {
  max-width: 1200px; margin: -18px auto 0; padding: 0 16px 40px;
  display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start;
  position: relative; z-index: 2;
}
@media (max-width: 900px) {
  .prod-body { grid-template-columns: 1fr; margin-top: 16px; }
}

.prod-cats {
  background: #fff; border-radius: 10px;
  box-shadow: 0 2px 14px rgba(30,39,54,.06);
  padding: 10px 0; overflow: hidden;
  position: sticky; top: 72px;
}
.prod-cats .cat-hd {
  padding: 10px 18px 12px; font-size: 12px; color: #a0a4b3;
  letter-spacing: .06em; text-transform: uppercase;
}
.prod-cats .cat-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left; padding: 11px 18px;
  border: none; background: transparent; color: #545968;
  cursor: pointer; border-left: 3px solid transparent; font-size: 14px;
  transition: background .15s, color .15s;
}
.prod-cats .cat-item .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #d5d8e2; flex-shrink: 0;
}
.prod-cats .cat-item:hover { background: #f7f8fc; color: var(--primary); }
.prod-cats .cat-item.active {
  background: #f0f5ff; color: var(--primary); font-weight: 600;
  border-left-color: var(--primary);
}
.prod-cats .cat-item.active .dot { background: var(--primary); }

.prod-main {
  background: #fff; border-radius: 10px;
  box-shadow: 0 2px 14px rgba(30,39,54,.06);
  padding: 18px 20px 24px; min-height: 480px;
}
.prod-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1px solid #f0f2f7;
}
.prod-toolbar h2 { margin: 0; font-size: 17px; font-weight: 600; color: #1e2736; }
.prod-toolbar .meta { color: #a0a4b3; font-size: 13px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.product-card, .pcard {
  border: 1px solid #eef0f5; border-radius: 10px;
  background: #fff; overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.product-card:hover, .pcard:hover {
  border-color: rgba(49,110,234,.35);
  box-shadow: 0 10px 28px rgba(49,110,234,.12);
  transform: translateY(-2px);
}
.pcard .pcard-top {
  padding: 18px 18px 0; display: flex; gap: 12px; align-items: flex-start;
}
.pcard .picn {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 16px;
  background: linear-gradient(145deg, #4f8cff, #316eea);
  box-shadow: 0 4px 12px rgba(49,110,234,.28);
}
.pcard .picn.t2 { background: linear-gradient(145deg, #5b8def, #254fd6); }
.pcard .picn.t3 { background: linear-gradient(145deg, #6ea0f5, #2a5fd4); }
.pcard h3 {
  margin: 2px 0 0; font-size: 16px; font-weight: 600; color: #1e2736;
  line-height: 1.35;
}
.pcard .specs {
  list-style: none; margin: 14px 0 0; padding: 0 18px;
  flex: 1; min-height: 72px;
}
.pcard .specs li {
  position: relative; padding: 4px 0 4px 12px;
  color: #74788d; font-size: 13px; line-height: 1.5;
  white-space: normal; word-break: break-word;
}
.pcard .specs li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: #c5d0f0;
}
.pcard .pcard-foot {
  margin-top: 14px; padding: 14px 18px;
  background: #f8f9fc; border-top: 1px solid #f0f2f7;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}
.pcard .price-block { min-width: 0; }
.pcard .price-block .lbl { display: block; font-size: 11px; color: #a0a4b3; margin-bottom: 2px; }
.pcard .price-block .val {
  color: var(--price); font-size: 20px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.pcard .price-block .val .orig,
.product-card .price .orig,
.cart-item .orig,
.ci-price-dual .orig {
  display: inline-block; margin-right: 6px;
  color: #a0a4b3; font-size: 13px; font-weight: 500;
  text-decoration: line-through;
}
.pcard .price-block .val .now,
.product-card .price .now { color: var(--price); }
.cart-item .tags .now { color: var(--price); font-weight: 700; margin-left: 2px; }
.cart-item .tags em {
  margin-left: 4px; font-style: normal; font-size: 11px;
  color: #e64a19; background: rgba(230,74,25,.08); padding: 1px 5px; border-radius: 3px;
}
.ci-price-dual { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; line-height: 1.2; }
.ci-price-dual b { color: var(--price); font-size: 16px; }
.cart-summary .save { color: #e64a19 !important; }
.pcard .price-block .val small {
  font-size: 12px; font-weight: 400; color: #a0a4b3; margin-left: 2px;
}
.pcard .btn.buy {
  background: linear-gradient(90deg, #316eea, #4f8cff) !important;
  color: #fff !important; border: none; margin: 0;
  padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(49,110,234,.28); cursor: pointer;
  white-space: nowrap;
}
.pcard .btn.buy:hover { filter: brightness(1.05); }

.prod-empty {
  padding: 72px 20px; text-align: center; color: var(--muted);
}
.prod-empty .ico {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  background: #eef3ff; color: var(--primary);
  display: grid; place-items: center; font-size: 22px; font-weight: 700;
}
.prod-empty h3 { margin: 0 0 6px; color: #1e2736; font-size: 16px; }

/* legacy product-card (首页热门) */
.product-card .hd {
  padding: 14px 16px 0; border: none; background: transparent;
  font-weight: 600; font-size: 15px; color: #1e2736;
}
.product-card .bd { padding: 10px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.product-card .desc {
  color: var(--muted); font-size: 13px; line-height: 1.6;
  white-space: pre-wrap; min-height: 48px; margin: 0 0 12px;
  font-family: inherit; flex: 1;
}
.product-card .desc.html-desc,
.pcard .html-desc {
  white-space: normal;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  flex: 1 1 auto;
  min-height: 0;
  margin: 12px 18px 0;
  padding: 12px 14px;
  background: #f7f8fb;
  border-radius: 8px;
  color: #545968;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
}
/* 上游简介常带固定高度/overflow，强制完整展示 */
.product-card .desc.html-desc *,
.pcard .html-desc * {
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  text-overflow: unset !important;
  -webkit-line-clamp: unset !important;
}
.product-card .desc.html-desc {
  margin: 0 0 12px;
}
.product-card .desc.html-desc img,
.pcard .html-desc img { max-width: 100%; height: auto !important; }
.product-card .desc.html-desc p,
.pcard .html-desc p { margin: 0 0 6px; }
.product-card .desc.html-desc p:last-child,
.pcard .html-desc p:last-child { margin-bottom: 0; }
.product-card .desc.html-desc ul,
.pcard .html-desc ul {
  margin: 0; padding-left: 1.1em;
}
.product-card .desc.html-desc li,
.pcard .html-desc li {
  margin: 2px 0;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.product-card .price {
  text-align: left; color: var(--price); font-size: 18px; font-weight: 700;
}
.product-card .price .orig { font-size: 13px; }
.product-card .price .now { margin-right: 4px; }
.product-card .price small { font-size: 12px; font-weight: 400; color: #a0a4b3; }
.product-card .actions { text-align: right; margin-top: 10px; }
.product-card .btn.buy {
  background: linear-gradient(90deg, #316eea, #4f8cff) !important;
  border-radius: 6px; box-shadow: 0 4px 12px rgba(49,110,234,.25);
}

/* keep old side layout unused but harmless */
.cart-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
}

.side-panel { display: flex; flex-direction: column; gap: 12px; }
.side-hero {
  background: var(--primary);
  color: rgba(255,255,255,.9);
  border-radius: var(--radius);
  padding: 20px 18px;
  min-height: 140px;
}
.side-hero h3 { margin: 0 0 10px; color: #fff; font-size: 16px; font-weight: 600; }
.side-hero p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; opacity: .92; }
.side-hero .search { margin-top: 14px; position: relative; }
.side-hero .search input {
  width: 100%; height: 36px; border-radius: 18px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.15); color: #fff; padding: 0 36px 0 14px; outline: none;
}
.side-hero .search input::placeholder { color: rgba(255,255,255,.75); }

.side-cats {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--border);
  overflow: hidden; min-height: 280px;
}
.side-cats .cat-item {
  display: block; width: 100%; text-align: left;
  padding: 12px 16px; border: none; background: transparent;
  color: var(--muted); cursor: pointer; border-left: 3px solid transparent;
}
.side-cats .cat-item:hover { background: var(--menu-active-bg); color: #2f46b0; }
.side-cats .cat-item.active {
  background: var(--menu-active-bg); color: #2f46b0; font-weight: 600;
  border-left-color: var(--primary);
}

.main-card {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--border);
  padding: 20px; min-height: calc(100vh - 160px);
}
.main-card-title {
  font-size: 16px; font-weight: 600; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}

/* ===== Generic panels ===== */
.panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; max-width: 440px; margin: 32px auto;
}
.panel h2 { margin: 0 0 18px; font-size: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { color: var(--muted); font-size: 13px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius);
  border: 1px solid #dcdfe6; background: #fff; color: var(--text); outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.err { color: var(--price); font-size: 13px; margin-top: 8px; }
.ok { color: #059669; }

.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td {
  text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.table th { background: #fafbfd; color: var(--muted); font-weight: 500; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 2px; font-size: 12px;
  background: rgba(49,110,234,.1); color: var(--primary);
}
.badge.warn { background: rgba(230,74,25,.1); color: var(--price); }
.badge.ok { background: rgba(5,150,105,.1); color: #059669; }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
}
.hero-simple { margin-bottom: 16px; }
.hero-simple h1 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.hero-simple p { margin: 0; color: var(--muted); }

/* Slider captcha */
.slider-wrap { margin: 10px 0 14px; }
.slider-stage {
  position: relative; width: 320px; max-width: 100%; height: 160px;
  border-radius: var(--radius); overflow: hidden; background: #eee; border: 1px solid var(--border);
}
.slider-stage img.bg { width: 100%; height: 100%; object-fit: cover; display: block; }
.slider-stage img.piece {
  position: absolute; left: 0; width: 48px; height: 48px; pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
}
.slider-bar {
  margin-top: 10px; height: 40px; border-radius: 20px; position: relative;
  background: #f0f2f5; border: 1px solid var(--border); user-select: none;
}
.slider-bar .track-tip {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: 13px; pointer-events: none;
}
.slider-bar .knob {
  position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); cursor: grab; display: grid; place-items: center;
  color: #fff; font-weight: 700; box-shadow: 0 2px 8px rgba(49,110,234,.35);
}
.slider-bar.fail { animation: shake .35s ease; border-color: rgba(230,74,25,.5); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* 人机验证门闸 */
.captcha-gate {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 12px 16px; border-radius: 10px;
  border: 1.5px dashed var(--border); background: #f8fafc;
  cursor: pointer; user-select: none; transition: border-color .2s, background .2s, color .2s;
  color: var(--muted); font-size: 14px;
}
.captcha-gate:hover { border-color: var(--primary); color: var(--primary); background: #f0f5ff; }
.captcha-gate.busy { opacity: .7; pointer-events: none; }
.captcha-gate.ok {
  border-style: solid; border-color: #22c55e; background: #ecfdf5; color: #15803d;
  cursor: default; font-weight: 600;
}
.captcha-gate .cg-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px;
  background: rgba(0,0,0,.04);
}
.captcha-gate.ok .cg-icon { background: #22c55e; color: #fff; font-weight: 700; font-size: 11px; letter-spacing: 0; }
.captcha-slider-host { margin-top: 10px; }
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row input { flex: 1; }
.code-row .code-btn { white-space: nowrap; min-width: 118px; }
.code-row .code-btn:disabled { opacity: .55; cursor: not-allowed; }
.field .tip { margin: 6px 0 0; font-size: 12px; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button { flex: 1; border: 1px solid var(--border); background: #fff; padding: 8px; border-radius: var(--radius); cursor: pointer; }
.tabs button.active { border-color: var(--primary); color: var(--primary); }

/* ===== Landing homepage ===== */
.home-page { margin: 0; }
.home-banner {
  background: linear-gradient(120deg, #1a56db 0%, #316eea 45%, #4f8cff 100%);
  color: #fff; padding: 72px 16px 80px; position: relative; overflow: hidden;
}
.home-banner::after {
  content: ""; position: absolute; right: -80px; top: -60px; width: 360px; height: 360px;
  border-radius: 50%; background: rgba(255,255,255,.08);
}
.home-banner .inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.home-banner .eyebrow { opacity: .85; font-size: 14px; margin-bottom: 12px; }
.home-banner h1 {
  margin: 0 0 14px; font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.25;
  max-width: 16em;
}
.home-banner .sub {
  margin: 0 0 28px; font-size: 15px; opacity: .9; line-height: 1.7; max-width: 36em;
}
.home-banner .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.home-banner .btn.light {
  background: #fff !important; color: var(--primary) !important; font-weight: 600;
  padding: 10px 22px;
}
.home-banner .btn.outline {
  background: transparent !important; color: #fff !important;
  border: 1px solid rgba(255,255,255,.55); padding: 10px 22px;
}

.home-section { max-width: 1200px; margin: 0 auto; padding: 48px 16px; }
.home-section .sec-title {
  text-align: center; font-size: 26px; font-weight: 600; margin: 0 0 8px; color: #1e2736;
}
.home-section .sec-sub {
  text-align: center; color: #999; font-size: 14px; margin: 0 0 32px;
}

.service-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 900px) { .service-grid { grid-template-columns: 1fr; } }
.service-card {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 28px 24px; transition: .2s;
}
.service-card:hover { box-shadow: 0 8px 24px rgba(49,110,234,.12); transform: translateY(-2px); }
.service-card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(49,110,234,.1); color: var(--primary); font-size: 20px; font-weight: 700;
  margin-bottom: 16px;
}
.service-card h3 { margin: 0 0 10px; font-size: 18px; }
.service-card p { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.7; min-height: 3.4em; }

.feature-bar {
  background: #1e2330; color: #fff; padding: 40px 16px; margin: 0;
}
.feature-bar .inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.feature-bar h2 { margin: 0 0 8px; font-size: 24px; font-weight: 500; }
.feature-bar .tip { color: #77798f; margin: 0 0 28px; font-size: 14px; }
.feature-metrics {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 700px) { .feature-metrics { grid-template-columns: 1fr; } }
.feature-metrics .m {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px; padding: 22px;
}
.feature-metrics .label { color: #868797; font-size: 14px; margin-bottom: 6px; }
.feature-metrics .val { color: #fff; font-size: 28px; font-weight: 600; }

.home-products .product-grid { margin-top: 8px; }
.home-products .more { text-align: center; margin-top: 28px; }

/* ===== Cart page ===== */
.cart-page {
  max-width: 1080px; margin: 0 auto; padding-top: 8px;
}
.cart-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin: 8px auto 28px; max-width: 520px;
}
.cart-steps .step {
  display: flex; align-items: center; gap: 8px;
  color: #a0a4b3; font-size: 13px; white-space: nowrap;
}
.cart-steps .step .num {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid #d5d8e2; font-size: 13px; font-weight: 600;
  background: #fff; color: #a0a4b3;
}
.cart-steps .step.on { color: var(--primary); font-weight: 600; }
.cart-steps .step.on .num {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.cart-steps .line {
  flex: 1; height: 1px; background: #e4e7ef; margin: 0 14px; min-width: 28px;
}

.cart-page .page-hd {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
.cart-page .page-hd h1 {
  margin: 0; font-size: 20px; font-weight: 600; color: #1e2736;
  display: flex; align-items: center; gap: 10px;
}
.cart-page .page-hd h1 .badge-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 11px; background: rgba(49,110,234,.12);
  color: var(--primary); font-size: 12px; font-weight: 600;
}
.cart-page .page-hd .link-back {
  color: var(--primary); background: none; border: none;
  cursor: pointer; font-size: 13px; padding: 6px 0;
}
.cart-page .page-hd .link-back:hover { text-decoration: underline; }

.cart-checkout {
  display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start;
}
@media (max-width: 900px) { .cart-checkout { grid-template-columns: 1fr; } }

.cart-list {
  background: #fff; border-radius: 10px;
  box-shadow: 0 2px 12px rgba(30, 39, 54, .04);
  overflow: hidden;
}
.cart-list-hd {
  display: grid;
  grid-template-columns: 1fr 100px 120px 72px;
  gap: 12px; align-items: center;
  padding: 12px 22px;
  background: #f7f8fc; color: #8a8fa3; font-size: 12px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 700px) {
  .cart-list-hd { display: none; }
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr 100px 120px 72px;
  gap: 12px; align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid #f0f2f7;
  transition: background .15s;
}
.cart-item:last-child { border-bottom: none; }
.cart-item:hover { background: #fafbfe; }
@media (max-width: 700px) {
  .cart-item {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "info info"
      "qty price"
      "ops ops";
  }
  .cart-item .ci-info { grid-area: info; }
  .cart-item .ci-qty { grid-area: qty; justify-self: start; }
  .cart-item .ci-price { grid-area: price; }
  .cart-item .ci-ops { grid-area: ops; text-align: right; }
}

.cart-item .ci-info { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.cart-item .thumb {
  width: 52px; height: 52px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #4f8cff, #316eea);
  color: #fff; font-size: 18px; font-weight: 700;
  box-shadow: 0 4px 10px rgba(49,110,234,.25);
}
.cart-item .thumb.t2 { background: linear-gradient(145deg, #5b8def, #254fd6); }
.cart-item .thumb.t3 { background: linear-gradient(145deg, #6ea0f5, #2a5fd4); }
.cart-item .body { min-width: 0; }
.cart-item .name {
  font-weight: 600; font-size: 15px; margin: 0 0 8px;
  color: #1e2736; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cart-item .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cart-item .tag {
  display: inline-block; padding: 2px 8px; border-radius: 3px;
  background: #eef3ff; color: var(--primary); font-size: 12px;
}
.cart-item .tag.soft { background: #f3f4f8; color: #74788d; }

.cart-item .ci-qty {
  text-align: center; color: #545968; font-size: 14px; font-weight: 500;
}
.qty-box {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid #e5e6eb; border-radius: 6px; overflow: hidden;
  background: #fff;
}
.qty-box button {
  width: 28px; height: 28px; border: 0; background: #f7f8fa;
  cursor: pointer; color: #4e5969; font-size: 14px; line-height: 1;
}
.qty-box button:hover { background: #eef3ff; color: var(--primary); }
.qty-box span {
  min-width: 28px; text-align: center; font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.buy-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.product-card .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stock-line {
  margin-top: 6px; font-size: 12px; color: #74788d; font-variant-numeric: tabular-nums;
}
.host-transfer-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px;
}
.host-transfer-bar input {
  height: 34px; border: 1px solid #e5e6eb; border-radius: 6px; padding: 0 10px;
}
.host-check { margin-right: 8px; display: inline-flex; align-items: center; }
.cart-item .ci-price {
  text-align: right; font-weight: 700; color: var(--price);
  font-size: 16px; font-variant-numeric: tabular-nums;
}
.cart-item .ci-ops { text-align: center; }
.cart-item .rm {
  border: none; background: none; color: #a0a4b3;
  cursor: pointer; font-size: 13px; padding: 4px 8px; border-radius: 4px;
}
.cart-item .rm:hover { color: #e64a19; background: rgba(230,74,25,.06); }

.cart-empty {
  background: #fff; border-radius: 12px;
  box-shadow: 0 2px 12px rgba(30, 39, 54, .04);
  padding: 80px 24px 72px; text-align: center;
}
.cart-empty .illus {
  width: 120px; height: 120px; margin: 0 auto 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e8efff, #d6e4ff 55%, #c5d8ff);
  display: grid; place-items: center; position: relative;
}
.cart-empty .illus svg { width: 56px; height: 56px; color: var(--primary); opacity: .9; }
.cart-empty h3 { margin: 0 0 8px; font-size: 18px; color: #1e2736; font-weight: 600; }
.cart-empty p { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.cart-empty .btn.primary { padding: 10px 28px; }

.cart-summary {
  background: #fff; border-radius: 12px;
  box-shadow: 0 2px 12px rgba(30, 39, 54, .04);
  overflow: hidden; position: sticky; top: 72px;
}
.cart-summary .sum-hd {
  background: linear-gradient(120deg, #1a56db 0%, #316eea 55%, #4f8cff 100%);
  color: #fff; padding: 18px 20px;
}
.cart-summary .sum-hd h3 { margin: 0; font-size: 16px; font-weight: 600; }
.cart-summary .sum-hd p { margin: 6px 0 0; font-size: 12px; opacity: .85; }
.cart-summary .sum-bd { padding: 18px 20px 20px; }
.cart-summary .row-line {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: 13px; color: #74788d;
}
.cart-summary .row-line em {
  font-style: normal; color: #1e2736; font-weight: 500;
}
.cart-summary .promo-box {
  margin: 4px 0 14px; padding: 12px; border-radius: 8px;
  background: #f6f8fc; border: 1px solid #e8ecf4;
}
.cart-summary .promo-box label {
  display: block; margin-bottom: 8px; font-size: 12px; color: #74788d;
}
.cart-summary .promo-row { display: flex; gap: 8px; }
.cart-summary .promo-row input {
  flex: 1; min-width: 0; height: 36px; padding: 0 10px;
  border: 1px solid #d9dee8; border-radius: 6px; font-size: 13px;
  outline: none; background: #fff;
}
.cart-summary .promo-row input:focus { border-color: var(--primary); }
.cart-summary .btn.promo-apply {
  flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 6px;
  border: 1px solid var(--primary); background: #fff; color: var(--primary);
  font-size: 13px; cursor: pointer; white-space: nowrap;
}
.cart-summary .btn.promo-apply:hover { background: rgba(49,110,234,.06); }
.cart-summary .btn.promo-apply:disabled { opacity: .6; cursor: not-allowed; }
.cart-summary .promo-ok { margin: 8px 0 0; font-size: 12px; color: #2e7d32; }
.cart-summary .promo-tip { margin: 8px 0 0; font-size: 12px; color: #c62828; }
.cart-summary .total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0 4px; margin-top: 4px;
  border-top: 1px dashed #e4e7ef; font-size: 14px; color: #1e2736;
}
.cart-summary .total strong {
  color: var(--price); font-size: 24px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.cart-summary .btn.settle {
  width: 100%; margin-top: 18px; padding: 13px;
  font-size: 15px; font-weight: 600; border-radius: 6px;
  background: linear-gradient(90deg, #316eea, #4f8cff) !important;
  color: #fff !important; border: none; cursor: pointer;
  box-shadow: 0 6px 16px rgba(49,110,234,.3);
  transition: transform .15s, box-shadow .15s;
}
.cart-summary .btn.settle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(49,110,234,.38);
}
.cart-summary .btn.more {
  width: 100%; margin-top: 10px; padding: 10px;
  background: #fff; border: 1px solid var(--border);
  color: #545968; border-radius: 6px; cursor: pointer;
}
.cart-summary .btn.more:hover { border-color: var(--primary); color: var(--primary); }
.cart-summary .tips {
  margin: 14px 0 0; padding: 10px 12px; border-radius: 6px;
  background: #f7f8fc; color: #8a8fa3; font-size: 12px; line-height: 1.6;
}
.cart-summary .err { margin-top: 10px; }
.cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: 9px; background: var(--price); color: #fff; font-size: 11px;
}

/* ===== Host detail ===== */
.host-card { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.host-card:hover { box-shadow: 0 8px 24px rgba(49,110,234,.12); transform: translateY(-2px); }
.host-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 8px; }
.host-drawer-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 80;
}
.host-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw);
  background: #fff; z-index: 90; box-shadow: -8px 0 32px rgba(0,0,0,.12);
  display: flex; flex-direction: column;
}
.host-drawer-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.host-drawer-hd h2 { margin: 0; font-size: 16px; }
.host-drawer-bd { padding: 16px 18px; overflow: auto; flex: 1; }
.host-kv {
  display: grid; grid-template-columns: 88px 1fr; gap: 8px;
  padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13px;
}
.host-kv span { color: var(--muted); }
.host-kv b { font-weight: 500; word-break: break-all; }
.host-kv a { margin-left: 8px; font-size: 12px; font-weight: 400; }

.host-specs { margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--border); }
.host-specs-title { font-weight: 600; margin-bottom: 6px; color: var(--text); }
.host-reinstall {
  margin-top: 18px; padding: 14px; border-radius: 8px;
  background: #f7f8fc; border: 1px solid var(--border);
}
.host-reinstall .field { margin: 10px 0; }
.host-reinstall .field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.host-reinstall select, .host-reinstall input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; background: #fff;
}
.host-reinstall .btn { margin-top: 6px; }
.host-reinstall .ok-msg { color: #1a7f37; font-size: 13px; margin-top: 8px; }
.host-reinstall .err { margin-top: 8px; }

.host-power, .host-charts {
  margin-top: 18px; padding: 14px; border-radius: 8px;
  background: #f7f8fc; border: 1px solid var(--border);
}
.host-power-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.host-power .btn.danger {
  background: #fff; border: 1px solid #e35d6a; color: #c62828;
}
.host-power .btn.danger:hover { background: #fff5f5; }
.host-power .ok-msg { color: #1a7f37; font-size: 13px; margin-top: 8px; }
.host-power .err { margin-top: 8px; }

.host-chart-card {
  margin-top: 12px; padding: 12px 14px; border-radius: 10px;
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(49,110,234,.04);
}
.host-chart-hd {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; margin-bottom: 8px;
}
.host-chart-hd b { font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.host-chart-svg { width: 100%; height: 130px; display: block; }
.host-chart-svg .grid { stroke: #eef0f5; stroke-width: 1; }
.host-chart-svg .area { stroke: none; }
.host-chart-svg .line { fill: none; stroke: #316eea; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.host-chart-svg .dot { fill: #fff; stroke: #316eea; stroke-width: 1.5; }
.host-chart-svg.mem .line { stroke: #1a7f37; }
.host-chart-svg.mem .dot { stroke: #1a7f37; }
.host-chart-ft { font-size: 11px; margin-top: 6px; }

.ticket-thread { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.ticket-msg {
  padding: 12px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff;
}
.ticket-msg.me { background: #f3f7ff; border-color: #d6e4ff; }
.ticket-msg.staff { background: #f7f8fc; }
.ticket-msg-hd { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ticket-msg-bd { font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.panel .ok-msg { color: #1a7f37; font-size: 13px; margin-top: 8px; }

.host-refund {
  margin-top: 18px; padding: 14px; border-radius: 8px;
  background: #fff8f6; border: 1px solid #f5d0c8;
}
.host-refund .host-specs-title { color: #c62828; }
.host-refund .btn.danger {
  margin-top: 10px; background: #c62828 !important; color: #fff !important;
  border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer;
}
.host-refund .btn.danger:disabled { opacity: .55; cursor: not-allowed; }
.host-refund .price-em { color: var(--price); font-weight: 700; }
.host-bar-input {
  height: 34px; border: 1px solid #e5e6eb; border-radius: 6px; padding: 0 10px;
  max-width: 240px; width: 100%;
}
.host-bar-input.sm { max-width: 160px; }
.btn.danger {
  background: #fff; border: 1px solid #e35d6a; color: #c62828;
}
.btn.danger:hover { background: #fff5f5; }

.nav-toggle {
  display: none; width: 40px; height: 36px; border: 1px solid var(--border);
  background: #fff; border-radius: 8px; cursor: pointer; padding: 8px 10px;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span {
  display: block; height: 2px; background: #445; border-radius: 1px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 900px) {
  .topbar-inner { height: auto; min-height: 56px; padding: 10px 14px; flex-wrap: wrap; }
  .nav-toggle { display: flex; margin-left: auto; }
  .nav {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    gap: 2px; padding: 8px 0 4px;
  }
  .nav.open { display: flex; }
  .nav button, .nav .btn { width: 100%; text-align: left; padding: 12px 14px; }
  .shell { padding: 16px 12px 40px; }
  .product-grid { grid-template-columns: 1fr; }
  .host-drawer {
    width: 100vw; max-width: 100vw; border-radius: 0;
  }
  .host-kv { grid-template-columns: 76px 1fr; }
  .host-transfer-bar { flex-direction: column; align-items: stretch; }
  .host-bar-input, .host-bar-input.sm { max-width: none; }
  .host-power-btns .btn { flex: 1 1 calc(50% - 4px); }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  .hero-simple h1 { font-size: 22px; }
  .pcard .pcard-foot { flex-direction: column; align-items: stretch; }
  .pcard .btn.buy { width: 100%; text-align: center; }
  .buy-row { width: 100%; justify-content: space-between; }
}

@media (max-width: 700px) {
  .brand { font-size: 16px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
  .home-banner h1 { font-size: 24px; line-height: 1.35; }
  .card, .panel { padding: 14px; }
  .field input, .field select, .field textarea { width: 100%; }
}

.agree-row { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.agreement-modal {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 100;
  display: grid; place-items: center; padding: 16px;
}
.agreement-box {
  background: #fff; border-radius: 10px; width: min(560px, 96vw); max-height: 80vh;
  display: flex; flex-direction: column; padding: 18px;
}
.agreement-box h3 { margin: 0 0 10px; }
.agreement-body { overflow: auto; flex: 1; font-size: 13px; line-height: 1.7; color: #445; margin-bottom: 14px; }
