:root {
  --brand: #1f6feb;
  --brand-dark: #1449a3;
  --ink: #1b1f24;
  --ink-2: #4b5563;
  --ink-3: #8a939f;
  --line: #e6e9ee;
  --bg: #f4f6f9;
  --card: #ffffff;
  --ok: #14855a;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
}

img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ---------- 标题区 ---------- */
.head {
  background: var(--card);
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--line);
}
.title {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.sku {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.price {
  color: #d93025;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
}
.price .sym { font-size: 15px; font-weight: 600; margin-right: 1px; }
.price-unit { font-size: 12px; color: var(--ink-3); }
.price-ask {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.chip {
  font-size: 12px;
  color: var(--ink-2);
  background: #f0f3f8;
  border: 1px solid #e3e8f0;
  border-radius: 6px;
  padding: 3px 8px;
}
.chip.cat {
  color: var(--brand);
  background: #eef4ff;
  border-color: #d3e2fb;
}
.chip.energy {
  color: var(--ok);
  background: #eaf7f0;
  border-color: #cfe9dc;
}

/* ---------- 区块 ---------- */
.section {
  background: var(--card);
  margin-top: 10px;
  padding: 16px;
}
.sec-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sec-title::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--brand);
}

/* 参数表 */
.params {
  display: grid;
  grid-template-columns: 96px 1fr;
  row-gap: 0;
}
.params dt {
  color: var(--ink-3);
  font-size: 13.5px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.params dd {
  margin: 0;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  word-break: break-all;
}
.params dt:first-of-type, .params dd:first-of-type { border-top: none; }

/* 特点 */
.features { list-style: none; margin: 0; padding: 0; }
.features li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: 14px;
  color: var(--ink-2);
}
.features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.note {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  white-space: pre-line;
}

/* ---------- 底部栏 ---------- */
.actionbar {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.btn {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:active { background: var(--brand-dark); }
.btn-ghost {
  background: #f0f3f8;
  color: var(--ink-2);
  font-weight: 500;
}

/* ---------- 列表页 ---------- */
.list-head {
  background: linear-gradient(135deg, #1f6feb 0%, #3a86e8 100%);
  color: #fff;
  padding: 22px 16px 20px;
}
.list-head h1 { margin: 0; font-size: 19px; font-weight: 600; }
.list-head p { margin: 6px 0 0; font-size: 13px; opacity: 0.85; }

.plist {
  list-style: none;
  margin: 10px 0 0;
  padding: 0 10px 20px;
}
.pcard {
  background: var(--card);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 10px;
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
}
.pcard-body { flex: 1; min-width: 0; }
.pcard-name {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
}
.pcard-meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.pcard-price { margin-top: 6px; font-size: 15px; font-weight: 700; color: #d93025; }
.pcard-price.none { color: var(--ink-3); font-weight: 500; font-size: 13px; }

/* ---------- 空态 ---------- */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--ink-3);
}
.empty .code {
  font-size: 15px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-block;
  margin-top: 12px;
  font-family: ui-monospace, Menlo, monospace;
}
