/* pp-theme.css — 网页版浅银蓝主题（与微信小程序同源配色）
   由 tools/remap-web-theme.js 在每个页面 </head> 前挂载，作为最后一层覆盖。
   令牌名与各页 :root 一致，靠后加载 + 同选择器覆盖。
   改配色只改这一个文件，不要在页面里再写色值。 */

:root {
  --primary: #0b74e8;
  --cyan: #00b3c6;
  --warm: #f26a2e;
  --bg: #eef3f9;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --card-bg2: #f4f8fd;
  --stage-bg: #f4f9ff;
  --text-main: #0e1c2e;
  --text-sub: #6a7d92;
  --border: rgba(14, 52, 96, 0.10);
  --shadow: 0 6px 22px rgba(22, 58, 102, 0.07);
  --red: #d93a2b;
  --green: #0f9d58;
}

html { background: #eef3f9; }

body {
  background-color: #eef3f9 !important;
  background-image:
    linear-gradient(rgba(11, 116, 232, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 116, 232, 0.045) 1px, transparent 1px) !important;
  background-size: 32px 32px !important;
  background-attachment: fixed !important;
  color: #0e1c2e;
}

/* ---------- 顶部导航 ---------- */
.nav {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid rgba(14, 52, 96, 0.09) !important;
  box-shadow: 0 2px 12px rgba(22, 58, 102, 0.05);
}
.nav-brand, .nav-brand span { color: #0e1c2e; }
.nav-brand span { color: #0b74e8; }
.nav-links a { color: #6a7d92; }
.nav-links a:hover { color: #0e1c2e; }
.nav-links a.active { color: #0b74e8; font-weight: 700; }
.nav-links a.active::after { background: #0b74e8; }

/* ---------- 侧栏 / 筛选 ---------- */
.sidebar, .sidebar-title, .filter-group {
  background: transparent;
  color: #0e1c2e;
}
.sidebar { background: #ffffff !important; border-right: 1px solid rgba(14, 52, 96, 0.08) !important; }
.filter-title, .sidebar-title { color: #0e1c2e !important; }
.filter-btn {
  background: #f4f8fd !important;
  border: 1px solid rgba(14, 52, 96, 0.10) !important;
  color: #4a5f76 !important;
}
.filter-btn:hover { background: #e8f1fc !important; color: #0b74e8 !important; border-color: rgba(11, 116, 232, 0.35) !important; }
.filter-btn.active {
  background: #0b74e8 !important;
  border-color: #0b74e8 !important;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(11, 116, 232, 0.22);
}
.fb-num { color: #8ba0b5; }
.filter-btn.active .fb-num { color: rgba(255, 255, 255, 0.75); }

/* ---------- 搜索 / 排序 ---------- */
.search-bar input, .picker-tools input {
  background: #ffffff !important;
  border: 1px solid rgba(14, 52, 96, 0.12) !important;
  color: #0e1c2e !important;
  box-shadow: 0 2px 10px rgba(22, 58, 102, 0.04);
}
.search-bar input::placeholder, .picker-tools input::placeholder { color: #93a6bb !important; }
.search-bar input:focus, .picker-tools input:focus { border-color: #0b74e8 !important; box-shadow: 0 0 0 3px rgba(11, 116, 232, 0.12); }
.search-bar, .sort-bar { color: #6a7d92; }
.sort-label, .sort-note, .result-count { color: #6a7d92 !important; }
.sort-btn {
  background: #ffffff !important;
  border: 1px solid rgba(14, 52, 96, 0.10) !important;
  color: #4a5f76 !important;
}
.sort-btn:hover { color: #0b74e8 !important; border-color: rgba(11, 116, 232, 0.45) !important; }
.sort-btn.active { background: #0b74e8 !important; border-color: #0b74e8 !important; color: #ffffff !important; }
.toggle-btn { color: #0b74e8 !important; }

/* ---------- 商品卡片 ---------- */
.card {
  background: #ffffff !important;
  border: 1px solid rgba(14, 52, 96, 0.08) !important;
  box-shadow: 0 6px 22px rgba(22, 58, 102, 0.07) !important;
}
.card:hover { box-shadow: 0 10px 30px rgba(22, 58, 102, 0.13) !important; border-color: rgba(11, 116, 232, 0.28) !important; }
.card-img { background: #f4f9ff !important; }
.card-title { color: #0e1c2e !important; }
.card-brand { color: #0b74e8 !important; }
.card-desc, .card-meta, .card-handle, .card-specs { color: #6a7d92 !important; }
.card-price { color: #f26a2e !important; }
.card-badge { background: rgba(11, 116, 232, 0.10) !important; color: #0b74e8 !important; border: 1px solid rgba(11, 116, 232, 0.20) !important; }
.spec-tag { border-radius: 6px; }
.cmp-add { background: rgba(255, 255, 255, 0.94) !important; border: 1px solid rgba(14, 52, 96, 0.14) !important; color: #4a5f76 !important; }
.cmp-add:hover { color: #0b74e8 !important; border-color: #0b74e8 !important; }
.cmp-add.on { background: #0b74e8 !important; border-color: #0b74e8 !important; color: #ffffff !important; }

/* ---------- 区块 / 表格 ---------- */
.sec { background: #ffffff !important; border: 1px solid rgba(14, 52, 96, 0.08) !important; box-shadow: 0 6px 22px rgba(22, 58, 102, 0.06) !important; }
.sec-title { color: #0e1c2e !important; }
.sec-title::before { background: #0b74e8 !important; }
.sec-note { color: #7d90a6 !important; }
.spec-table th, .spec-table td { border-color: rgba(14, 52, 96, 0.08) !important; }
.spec-table th { background: #f7fafd !important; color: #6a7d92 !important; }
.spec-table td { color: #0e1c2e !important; }
.data-grid, .sum-list { color: #0e1c2e; }

/* ---------- 详情页头部 ---------- */
.p-title { color: #0e1c2e !important; }
.p-tagline, .p-desc, .p-meta, .p-price-note { color: #6a7d92 !important; }
.p-price { color: #f26a2e !important; }
.badge { background: rgba(11, 116, 232, 0.10) !important; color: #0b74e8 !important; border: 1px solid rgba(11, 116, 232, 0.20) !important; }
.badge-brand { background: #f2f7fe !important; color: #0b5fc4 !important; border-color: rgba(11, 116, 232, 0.22) !important; }
.badge-type { background: #f2f7fe !important; color: #0b5fc4 !important; }
.badge-tier-旗舰 { background: rgba(242, 106, 46, 0.10) !important; color: #c2451a !important; border-color: rgba(242, 106, 46, 0.28) !important; }
.badge-tier-高端, .badge-tier-中高端 { background: rgba(11, 116, 232, 0.10) !important; color: #0b5fc4 !important; border-color: rgba(11, 116, 232, 0.22) !important; }
.badge-tier-中端, .badge-tier-中, .badge-tier-入门 { background: #f1f5f9 !important; color: #526a82 !important; border-color: rgba(14, 52, 96, 0.10) !important; }
.mat-badge { background: #f2f7fe !important; color: #0b5fc4 !important; border: 1px solid rgba(11, 116, 232, 0.20) !important; }
.btn { border: 1px solid rgba(14, 52, 96, 0.12) !important; background: #ffffff !important; color: #33506d !important; }
.btn:hover { border-color: #0b74e8 !important; color: #0b74e8 !important; }
.btn-primary { background: linear-gradient(135deg, #0b74e8, #00b3c6) !important; border: none !important; color: #ffffff !important; box-shadow: 0 6px 18px rgba(11, 116, 232, 0.25); }
.btn-primary:hover { filter: brightness(1.05); color: #ffffff !important; }

/* ---------- 性能条（评分已下线，仅保留样式兜底） ---------- */
.bars { color: #0e1c2e; }
.bar-name, .bar-val { color: #0e1c2e !important; }
.bar-track { background: #eef3f9 !important; }
.bar-fill { background: linear-gradient(90deg, #0b74e8, #00b3c6) !important; }
.mini-dim, .mini-dims { color: #6a7d92 !important; }

/* ---------- 分析 / 优缺点 ---------- */
.ana-card { background: #f7fafd !important; border: 1px solid rgba(14, 52, 96, 0.08) !important; }
.ana-card h4 { color: #0e1c2e !important; }
.ana-card p, .ana-card li { color: #445a72 !important; }
.ana-card.pros { background: rgba(15, 157, 88, 0.05) !important; border-color: rgba(15, 157, 88, 0.20) !important; }
.ana-card.cons { background: rgba(217, 58, 43, 0.05) !important; border-color: rgba(217, 58, 43, 0.18) !important; }

/* ---------- 相关推荐 ---------- */
.rel-card { background: #ffffff !important; border: 1px solid rgba(14, 52, 96, 0.08) !important; }
.rel-card:hover { border-color: rgba(11, 116, 232, 0.3) !important; box-shadow: 0 8px 22px rgba(22, 58, 102, 0.10); }
.rel-img { background: #f4f9ff !important; }
.rel-title { color: #0e1c2e !important; }
.rel-brand, .rel-meta, .rel-spec { color: #6a7d92 !important; }
.rel-price { color: #f26a2e !important; }

/* ---------- 对比页 ---------- */
.cmp-tabs { border-color: rgba(14, 52, 96, 0.10) !important; }
.cmp-tab { background: #ffffff !important; color: #4a5f76 !important; border: 1px solid rgba(14, 52, 96, 0.10) !important; }
.cmp-tab.on { background: rgba(11, 116, 232, 0.08) !important; color: #0b74e8 !important; border-color: rgba(11, 116, 232, 0.35) !important; }
.cmp-tab.on .tab-n { background: #0b74e8 !important; color: #ffffff !important; }
.cmp-card, .pick-item { background: #ffffff !important; border: 1px solid rgba(14, 52, 96, 0.08) !important; }
.pick-item:hover { border-color: rgba(11, 116, 232, 0.30) !important; }
.pick-item.on { border-color: #0b74e8 !important; box-shadow: 0 0 0 2px rgba(11, 116, 232, 0.15); }
.pick-name, .cmp-name { color: #0e1c2e !important; }
.pick-meta, .pick-spec, .cmp-brand, .cmp-tagline { color: #6a7d92 !important; }
.pick-price, .cmp-price { color: #f26a2e !important; }
.chip { background: #ffffff !important; border: 1px solid rgba(14, 52, 96, 0.12) !important; color: #4a5f76 !important; }
.chip.active, .chip:hover { background: rgba(11, 116, 232, 0.08) !important; border-color: rgba(11, 116, 232, 0.35) !important; color: #0b74e8 !important; }
.dim-table { color: #0e1c2e; }
.dim-table th, .dim-table td { border-color: rgba(14, 52, 96, 0.08) !important; }
.dim-cell, .dim-val { color: #0e1c2e !important; }
.dim-best { color: #0f9d58 !important; font-weight: 700; }
.spec-cmp { color: #445a72 !important; }
.advice-card { background: #f7fafd !important; border: 1px solid rgba(14, 52, 96, 0.08) !important; }
.price-track { background: #eef3f9 !important; }
.price-fill { background: linear-gradient(90deg, #0b74e8, #00b3c6) !important; }
.radar-wrap { background: #ffffff !important; }
.legend-item, .legend-total { color: #4a5f76 !important; }

/* ---------- 对比托盘 / 悬浮球 ---------- */
.cmp-tray {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(11, 116, 232, 0.28) !important;
  box-shadow: 0 14px 36px rgba(22, 58, 102, 0.16) !important;
}
.cmp-tray .tray-label { color: #0b74e8 !important; }
.cmp-tray .tray-go { background: linear-gradient(135deg, #0b74e8, #00b3c6) !important; color: #ffffff !important; }
.cmp-tray .tray-clear { color: #7d90a6 !important; }
.cmp-tray .tray-clear:hover { color: #c0392b !important; }
.cmp-chip { background: rgba(11, 116, 232, 0.08) !important; border-color: rgba(11, 116, 232, 0.28) !important; color: #0b5fc4 !important; }
.cmp-chip b { background: rgba(217, 58, 43, 0.10) !important; color: #c0392b !important; }

/* ---------- AI 悬浮按钮 / 对话 ---------- */
.ai-fab, #ai-fab {
  background: linear-gradient(135deg, #0b74e8, #00b3c6) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 26px rgba(11, 116, 232, 0.35) !important;
}
.ai-panel { background: #ffffff !important; border: 1px solid rgba(14, 52, 96, 0.10) !important; box-shadow: 0 18px 44px rgba(22, 58, 102, 0.16) !important; }
.ai-header { background: #f4f8fd !important; color: #0e1c2e !important; border-bottom: 1px solid rgba(14, 52, 96, 0.08) !important; }
.msg { color: #0e1c2e !important; background: #f1f6fc !important; }
.msg.ai { background: #ffffff !important; border: 1px solid rgba(14, 52, 96, 0.08) !important; }
.msg.user { background: #0b74e8 !important; color: #ffffff !important; }
.ai-quick-btn { background: #f4f8fd !important; border: 1px solid rgba(14, 52, 96, 0.10) !important; color: #0b5fc4 !important; }
.ai-quick-btn:hover { background: #e8f1fc !important; color: #0b74e8 !important; }
#ai-input, .ai-input { background: #ffffff !important; border: 1px solid rgba(14, 52, 96, 0.12) !important; color: #0e1c2e !important; }

/* ---------- 首页 ---------- */
.logo, .subtitle { color: #0e1c2e !important; }
.subtitle { color: #6a7d92 !important; }
.option-card { background: #ffffff !important; border: 1px solid rgba(14, 52, 96, 0.08) !important; box-shadow: 0 8px 26px rgba(22, 58, 102, 0.07) !important; }
.option-card:hover { border-color: rgba(11, 116, 232, 0.30) !important; box-shadow: 0 14px 34px rgba(22, 58, 102, 0.14) !important; }
.option-title { color: #0e1c2e !important; }
.option-desc { color: #6a7d92 !important; }
.question { color: #0e1c2e !important; }

/* ---------- 二手页 ---------- */
.header { background: #ffffff !important; border-bottom: 1px solid rgba(14, 52, 96, 0.08) !important; }
.main-container, .main-content { background: transparent !important; }
.seller-bar { background: rgba(242, 106, 46, 0.07) !important; border: 1px solid rgba(242, 106, 46, 0.22) !important; color: #8a3d1c !important; }
.seller-bar-name { color: #c2451a !important; }
.seller-bar-desc { color: #8a5a44 !important; }
.tag { color: #ffffff !important; }
.btn-link { background: #f2f7fe !important; color: #0b5fc4 !important; border: 1px solid rgba(11, 116, 232, 0.25) !important; }
.btn-link:hover { background: #0b74e8 !important; color: #ffffff !important; }
.btn-reset { background: #ffffff !important; color: #0b5fc4 !important; border: 1px solid rgba(11, 116, 232, 0.28) !important; }
.btn-reset:hover { background: #0b74e8 !important; color: #ffffff !important; }
.info, .info-detail { color: #445a72 !important; }
.info h3 { color: #0e1c2e !important; }
.review { background: #f7fafd !important; border: 1px solid rgba(14, 52, 96, 0.08) !important; color: #445a72 !important; }
.used-modal { background: #ffffff !important; color: #0e1c2e !important; box-shadow: 0 24px 60px rgba(22, 58, 102, 0.22) !important; }
.used-modal-mask { background: rgba(14, 32, 56, 0.45) !important; }
.used-modal .um-go { background: linear-gradient(135deg, #0b74e8, #00b3c6) !important; color: #ffffff !important; }

/* ---------- 页脚 / 空态 ---------- */
.footer { color: #8ba0b5 !important; border-top: 1px solid rgba(14, 52, 96, 0.08); }
.empty-tip, .no-result, .empty { color: #6a7d92 !important; }
.no-result h3 { color: #0e1c2e !important; }
.crumb, .crumb a { color: #7d90a6 !important; }

/* ---------- 首页数据口径说明 ---------- */
.about-box {
  margin: 44px auto 0; max-width: 720px; text-align: left;
  background: #ffffff; border: 1px solid rgba(14, 52, 96, 0.08);
  border-radius: 16px; padding: 22px 26px;
  box-shadow: 0 6px 22px rgba(22, 58, 102, 0.06);
}
.about-title { font-size: 15px; font-weight: 700; color: #0e1c2e; margin-bottom: 12px; }
.about-box ul { margin: 0; padding-left: 18px; }
.about-box li { font-size: 13px; line-height: 1.85; color: #4a5f76; margin-bottom: 6px; }
.about-box b { color: #0e1c2e; }

/* ---------- 详情页新增区块：别称 / 器材构成 / 结构层数 ---------- */
.alias-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.alias-label { font-size: 12px; color: #7d90a6; }
.alias-chip {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: #f2f7fe; border: 1px solid rgba(11, 116, 232, 0.20); color: #0b5fc4;
}
.meta-sep { color: rgba(14, 52, 96, 0.18); margin: 0 6px; }

.mat-badge {
  margin-left: 10px; font-size: 11.5px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; background: #f2f7fe; color: #0b5fc4;
  border: 1px solid rgba(11, 116, 232, 0.20); white-space: normal; line-height: 1.5;
}
.mat-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.mat-cell { background: #f7fafd; border: 1px solid rgba(14, 52, 96, 0.08); border-radius: 10px; padding: 12px 14px; }
.mc-k { font-size: 12px; color: #7d90a6; margin-bottom: 6px; }
.mc-v { font-size: 14.5px; font-weight: 600; color: #0e1c2e; line-height: 1.5; }

.struct-wrap { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.layer-stack { display: flex; flex-direction: column; gap: 3px; min-width: 240px; }
.layer-row { display: flex; align-items: center; gap: 10px; }
.layer-bar { width: 132px; border-radius: 3px; border: 1px solid rgba(120, 90, 40, 0.16); flex: 0 0 auto; }
.layer-bar.kind-wood { background: #f2dcb4; }
.layer-bar.kind-core { background: #e6c48a; }
.layer-bar.kind-hinoki { background: #f7e6c4; }
.layer-bar.kind-carbon { background: #9aa9bb; border-color: rgba(60, 80, 110, 0.25); }
.layer-name { font-size: 12.5px; color: #4a5f76; line-height: 1.4; }
.struct-side { flex: 1 1 260px; min-width: 240px; }
.struct-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.struct-tag { font-size: 12px; padding: 3px 10px; border-radius: 6px; background: rgba(11, 116, 232, 0.08); color: #0b5fc4; }
.struct-note { font-size: 13px; line-height: 1.7; color: #4a5f76; margin-bottom: 8px; }
.struct-note.dim { color: #8ba0b5; font-size: 12px; }
.struct-disclaimer { color: #8ba0b5 !important; }

/* ---------- 交互控件兜底：蓝底上的文字必须是白色 ---------- */
#ai-send, .ai-send { color: #ffffff !important; }
.cmp-add.on, .cmp-tray .tray-go, .msg.user, .btn-primary, .filter-btn.active, .sort-btn.active { color: #ffffff !important; }
select option { background: #ffffff !important; color: #0e1c2e !important; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f6fc; }
::-webkit-scrollbar-thumb { background: #c9d8e8; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #a9c0d8; }

/* ---------- 移动端 ---------- */
body { overflow-x: hidden; }

@media (max-width: 900px) {
  .container { padding: 16px 14px 44px !important; max-width: 100% !important; }
  .nav { padding: 0 12px !important; }
  .nav-brand { flex-shrink: 0; font-size: 16px !important; }
  .nav-links {
    gap: 14px !important; overflow-x: auto; white-space: nowrap;
    -webkit-overflow-scrolling: touch; padding-bottom: 2px;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex: 0 0 auto; }
  /* 详情页主图：窄屏下图片按容器宽度缩放，避免原图撑出横向滚动 */
  .img-main { max-height: 340px; min-height: 220px; }
  .img-main img { width: 100% !important; height: auto !important; max-height: 340px; object-fit: contain; }
  .layer-bar { width: 104px; }
  .struct-wrap { gap: 16px; }
  .layer-stack { min-width: 0; }
  .struct-side { min-width: 0; flex: 1 1 auto; }
  .mat-badge { margin-left: 6px; }
}

@media (max-width: 768px) {
  body { background-size: 24px 24px !important; }
  .nav { background: #ffffff !important; }
  .sidebar { background: #ffffff !important; }
  .options { gap: 14px !important; }
  .about-box { padding: 16px 18px; margin-top: 28px; }
  .about-box li { font-size: 12.5px; }
}
