:root {
  color-scheme: light; /* 禁止微信/浏览器在系统深色模式下强制暗化页面 */
  --blue: #0e5fd9;
  --blue-soft: #e8f0fe;
  --orange: #ff7a00;
  --orange-soft: #fff1e0;
  --green: #16a34a;
  --green-soft: #e6f6ec;
  --text: #1f2329;
  --sub: #6b7280;
  --line: #ebeef2;
  --bg: #f4f6f9;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(20, 35, 70, 0.06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 关键修复：防止 display:flex 等自定义样式覆盖 hidden 属性导致弹层常驻显示 */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 96px;
  background: var(--bg);
  padding-bottom: 24px;
}

/* 顶部品牌头 */
.topbar {
  background: linear-gradient(120deg, var(--blue), #2f7ff0);
  color: #fff;
  padding: 16px 16px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  overflow: hidden; flex-shrink: 0;
}
.logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-text strong { display: block; font-size: 17px; letter-spacing: .5px; }
.brand-text small { opacity: .85; font-size: 12px; }

/* 搜索 */
.search-wrap { padding: 12px 14px 6px; }
#search {
  width: 100%; height: 40px; border: none; border-radius: 20px;
  background: var(--card); padding: 0 16px; font-size: 14px;
  box-shadow: var(--shadow); outline: none;
}

/* 品牌快捷选型 */
.brands {
  display: flex; gap: 8px; padding: 4px 14px 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.brands::-webkit-scrollbar { display: none; }
.brand-chip {
  flex: 0 0 auto; height: 32px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--card); color: var(--text);
  font-size: 13px; cursor: pointer; white-space: nowrap;
}
.brand-chip.active { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 600; }

/* 应用领域快捷选型 */
.fields {
  display: flex; gap: 8px; padding: 2px 14px 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.fields::-webkit-scrollbar { display: none; }
.field-chip {
  flex: 0 0 auto; height: 30px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 15px; background: var(--card); color: var(--text);
  font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.field-chip.safe { border-left: 3px solid var(--orange); }
.field-chip.env { border-left: 3px solid var(--green); }
.field-chip.active { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 600; }

/* 工具条 */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 16px 10px;
}
/* 顶部并排入口：高级筛选 + 选型向导 */
.top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.top-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 14px; border-radius: 16px;
  border: none; background: #fff; color: var(--blue);
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.top-btn.primary { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.badge {
  background: var(--orange); color: #fff; font-size: 11px;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}
.count { color: var(--sub); font-size: 12px; }

/* 已选条件标签栏 */
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 10px; border-radius: 13px;
  background: rgba(14, 95, 217, 0.08); color: var(--blue);
  font-size: 12px; border: 1px solid rgba(14, 95, 217, 0.25);
}
.tag i { font-style: normal; font-size: 14px; line-height: 1; opacity: .7; }
.tag-clear { border: none; background: none; color: var(--sub); cursor: pointer; text-decoration: underline; }
.empty-clear {
  display: block; margin: 14px auto 0; height: 36px; padding: 0 20px;
  border: 1px solid var(--blue); border-radius: 18px; background: var(--card);
  color: var(--blue); font-size: 13px; font-weight: 600; cursor: pointer;
}

/* 列表 */
.list { padding: 0 14px; display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; position: relative; overflow: hidden; cursor: pointer;
  border-left: 4px solid var(--blue);
}
.card.safe { border-left-color: var(--orange); }
.card.env { border-left-color: var(--green); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-model { font-size: 15px; font-weight: 700; }
.card-brand {
  font-size: 11px; color: var(--blue); background: var(--blue-soft);
  padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.chip {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: #f1f3f7; color: var(--sub);
}
.chip.gas { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.card-range { font-size: 12px; color: var(--sub); }
.card-range b { color: var(--text); font-weight: 600; }
.card-app { font-size: 12px; color: var(--sub); margin-top: 4px; }

/* 底部 */
.foot { text-align: center; color: var(--sub); font-size: 12px; padding: 20px 16px 0; }
.foot-logo { display: block; margin: 0 auto 6px; height: 30px; width: auto; max-width: 200px; object-fit: contain; }
.foot-sub { opacity: .8; margin-top: 2px; }

/* 筛选抽屉 */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: flex-end; z-index: 50;
  max-width: 480px; margin: 0 auto; left: 0; right: 0;
}
.sheet {
  width: 100%; background: #fff; border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  max-height: 80vh; display: flex; flex-direction: column;
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet-reset { border: none; background: none; color: var(--blue); font-size: 13px; cursor: pointer; }
.sheet-body {
  overflow-y: auto; flex: 1; min-height: 0; background: #fff;
  -webkit-overflow-scrolling: touch;
}
.sheet-foot { display: flex; gap: 10px; padding-top: 10px; }
.sheet-cancel, .sheet-ok {
  flex: 1; height: 42px; border: none; border-radius: 21px; font-size: 15px; cursor: pointer;
}
.sheet-cancel { background: #f1f3f7; color: var(--text); }
.sheet-ok { background: var(--blue); color: #fff; }

.filter-group { margin-bottom: 14px; }
.filter-group h4 { margin: 0 0 8px; font-size: 13px; color: var(--sub); }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  font-size: 13px; padding: 6px 12px; border-radius: 16px;
  background: #f1f3f7; color: var(--text); cursor: pointer; border: 1px solid transparent;
}
.opt.on { background: var(--blue-soft); color: var(--blue); border-color: var(--blue); font-weight: 600; }

/* 详情弹层 */
.detail-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; z-index: 60;
  max-width: 480px; margin: 0 auto; left: 0; right: 0;
}
.detail {
  width: 100%; background: #fff; border-radius: 18px 18px 0 0;
  max-height: 86vh; overflow-y: auto;
  padding: 20px 18px calc(24px + env(safe-area-inset-bottom, 0px));
}
.detail-close {
  position: absolute; top: 14px; right: 16px; font-size: 22px; color: var(--sub);
  background: none; border: none; cursor: pointer; line-height: 1;
}
.detail-title { font-size: 19px; font-weight: 700; margin: 0 0 2px; }
.detail-sub { color: var(--sub); font-size: 13px; margin-bottom: 14px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.detail-desc { background: var(--blue-soft); color: #143a7a; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.spec { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec:last-child { border-bottom: none; }
.spec .k { color: var(--sub); }
.spec .v { font-weight: 600; text-align: right; max-width: 60%; }
.feat-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.feat { font-size: 12px; color: var(--green); background: var(--green-soft); padding: 3px 10px; border-radius: 10px; }
.empty { text-align: center; color: var(--sub); padding: 40px 0; font-size: 14px; }

/* 顶部向导按钮（已并入 .top-actions / .top-btn） */

/* 选型向导弹层 */
.wz-head { display: flex; justify-content: space-between; align-items: center; }
.wz-title { font-size: 16px; font-weight: 700; }
.wz-step { margin-left: 8px; font-size: 12px; color: var(--sub); }
.wz-close {
  border: none; background: #f1f3f7; width: 28px; height: 28px; border-radius: 50%;
  font-size: 16px; color: var(--sub); cursor: pointer; line-height: 1;
}
.wz-progress { display: flex; gap: 6px; margin: 12px 0 2px; }
.wz-seg { flex: 1; font-size: 11px; color: var(--sub); text-align: center; }
.wz-seg i { display: block; height: 4px; border-radius: 2px; background: #e8ebf1; margin-bottom: 4px; }
.wz-seg.done { color: var(--blue); font-weight: 600; }
.wz-seg.done i { background: var(--blue); }
.wz-q { font-size: 17px; font-weight: 700; margin: 14px 0 4px; }
.wz-sub { font-size: 12px; color: var(--sub); margin-bottom: 10px; }
.wz-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wz-chips .opt { font-size: 13px; padding: 7px 13px; }
.wz-cats { display: flex; gap: 10px; margin-top: 12px; }
.wz-cat {
  flex: 1; position: relative; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 14px;
  padding: 14px 14px 12px; background: #fafbfd;
}
.wz-cat.safe { border-top: 3px solid var(--orange); }
.wz-cat.env { border-top: 3px solid var(--green); }
.wz-cat:active { border-color: var(--blue); background: var(--blue-soft); }
.wz-cat em { font-style: normal; font-size: 24px; line-height: 1; }
.wz-cat strong { display: block; font-size: 15px; margin: 8px 0 4px; }
.wz-cat span { font-size: 11px; color: var(--sub); line-height: 1.7; display: block; }
.wz-cat b {
  position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 600;
  color: var(--blue); background: var(--blue-soft); padding: 2px 8px; border-radius: 10px;
}
.wz-foot { display: flex; gap: 10px; margin-top: 16px; }
.wz-foot .sheet-cancel, .wz-foot .sheet-ok { flex: 1; }

/* 底部咨询条 */
.consult-bar {
  position: fixed; bottom: 0; left: 0; right: 0; max-width: 480px; margin: 0 auto;
  display: flex; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(20, 35, 70, 0.06); z-index: 40;
}
.consult-wx {
  flex: 1; height: 44px; border: none; border-radius: 22px;
  background: var(--orange-soft); color: var(--orange); font-size: 14px; font-weight: 600; cursor: pointer;
}
.consult-mail {
  flex: 1; height: 44px; border-radius: 22px; background: var(--blue); color: #fff;
  font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; text-decoration: none;
}

/* 详情咨询按钮 */
.detail-consult {
  width: 100%; margin-top: 18px; height: 46px; border: none; border-radius: 23px;
  background: var(--blue); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
/* 详情-原厂规格书链接 */
.detail-spec-link {
  display: block; margin-top: 14px; padding: 12px 14px; text-align: center;
  text-decoration: none; border: 1px solid var(--green); color: var(--green);
  border-radius: 22px; font-size: 14px; font-weight: 600; background: var(--green-soft);
}

/* 行业应用场景区块 */
.scene { padding: 6px 14px 4px; }
.scene-title { font-size: 13px; color: var(--sub); margin: 6px 0 10px; font-weight: 600; }
.scene-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.scene-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; border-top: 3px solid var(--orange); cursor: pointer;
}
.scene-card.env { border-top-color: var(--green); }
.scene-card h4 { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.scene-card span { font-size: 11px; color: var(--sub); }
.scene-card.active { outline: 2px solid var(--blue); border-top-color: var(--blue); }
