/* select.css - /select 选车页 + /select/series 详情页全量样式
   视觉基准：汽车之家新版体系（ah_ux.md §4）— #0088FF 主蓝 / #FF6600 价格橙 /
   #111E36 深蓝黑三级文字 / #F4F6FA 底色 / 2-4px 小圆角 / 边框分层无阴影 */

:root {
  /* 品牌色 */
  --c-primary:        #0088FF;
  --c-primary-bg:     #F0F8FF;
  --c-primary-bg-act: #CCEBFF;
  --c-primary-bg-hov: #E6F3FF;
  --c-price:          #FF6600;
  --c-green:          #0E9F6E;
  --c-green-bg:       #E8F7F1;

  /* 文字三级（深蓝黑基调） */
  --t-1: #111E36;  --t-2: #464E64;  --t-3: #828CA0;

  /* 底色/边框：边框分层，无阴影 */
  --bg-page: #F4F6FA;  --bg-card: #FFFFFF;  --bg-soft: #F0F3F8;
  --bd-strong: #D8DEE6;  --bd-light: #F0F3F8;

  --ff-base: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --r-sm: 2px;  --r-md: 4px;  --h-btn: 32px;
  --w-container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-base);
  font-size: 14px; line-height: 1.5;
  color: var(--t-1); background: var(--bg-page);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: var(--w-container); margin: 0 auto; padding: 0 16px; }

/* ---------------- header（52px，白底下边框） ---------------- */
.hd { height: 52px; background: var(--bg-card); border-bottom: 1px solid var(--bd-light); }
.hd-in { height: 100%; display: flex; align-items: center; gap: 20px; }
.hd-logo { font-size: 17px; font-weight: 700; color: var(--c-primary); white-space: nowrap; }
.hd-logo:hover { opacity: .85; }
.hd-search { flex: 0 0 420px; position: relative; }
.hd-search input {
  width: 100%; height: 34px; padding: 0 36px 0 12px;
  border: 1px solid var(--bd-strong); border-radius: var(--r-md);
  font-size: 13px; color: var(--t-1); background: var(--bg-card); outline: none;
}
.hd-search input:focus { border-color: var(--c-primary); }
.hd-search input::placeholder { color: var(--t-3); }
.hd-search-btn {
  position: absolute; right: 1px; top: 1px; width: 40px; height: 32px;
  border: 0; background: transparent; color: var(--t-3); font-size: 15px;
}
.hd-search-btn:hover { color: var(--c-primary); }
.hd-stat { margin-left: auto; font-size: 12px; color: var(--t-3); white-space: nowrap; }
.hd-stat b { color: var(--t-2); font-weight: 600; }

/* 搜索联想下拉 */
.sugg { position: absolute; top: 38px; left: 0; right: 0; z-index: 60;
  background: var(--bg-card); border: 1px solid var(--bd-strong); border-radius: var(--r-md);
  max-height: 380px; overflow-y: auto; display: none; }
.sugg.show { display: block; }
.sugg-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; }
.sugg-item:hover, .sugg-item.is-act { background: var(--c-primary-bg-hov); }
.sugg-item.is-off .sugg-name { color: var(--t-3); font-weight: 400; }
.sugg-off { display: inline-block; vertical-align: 1px; margin-left: 5px; font-style: normal;
  font-size: 10px; line-height: 1; color: var(--t-3); background: var(--bg-soft);
  border: 1px solid var(--bd-strong); border-radius: 2px; padding: 2px 4px; }
.sugg-name { font-size: 13px; font-weight: 600; color: var(--t-1); }
.sugg-meta { font-size: 12px; color: var(--t-3); }
.sugg-price { margin-left: auto; font-size: 12px; color: var(--c-price); }

/* ---------------- 快捷 tab 行（sticky 吸顶） ---------------- */
.qtabs { position: sticky; top: 0; z-index: 40; height: 44px;
  background: var(--bg-card); border-bottom: 1px solid var(--bd-light); }
.qtabs-in { display: flex; align-items: center; gap: 4px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.qtabs-in::-webkit-scrollbar { display: none; }
.qtab { flex: none; height: 28px; padding: 0 14px; border: 0; background: transparent;
  border-radius: var(--r-md); font-size: 13px; color: var(--t-2); }
.qtab:hover { background: var(--c-primary-bg-hov); color: var(--c-primary); }
.qtab.is-on { background: var(--c-primary); color: #fff; font-weight: 600; }

/* 快捷 tab 下方的筛选按钮（移动端显示） */
.m-filter-bar { display: none; position: sticky; top: 44px; z-index: 39;
  background: var(--bg-card); border-bottom: 1px solid var(--bd-light); padding: 8px 0; }
.m-filter-btn { height: 30px; padding: 0 14px; border: 1px solid var(--bd-strong);
  border-radius: var(--r-md); background: var(--bg-card); font-size: 13px; color: var(--t-2); }
.m-filter-btn.is-on { border-color: var(--c-primary); color: var(--c-primary); }

/* ---------------- 筛选区（白卡） ---------------- */
.filters { margin-top: 12px; background: var(--bg-card);
  border: 1px solid var(--bd-light); border-radius: var(--r-md); padding: 6px 16px; }
.f-row { display: flex; padding: 9px 0; border-bottom: 1px solid var(--bd-light); }
.f-row:last-child { border-bottom: 0; }
.f-label { flex: none; width: 64px; padding-top: 4px; font-size: 13px; color: var(--t-3); }
.f-opts { flex: 1; display: flex; flex-wrap: wrap; gap: 2px 4px; }
.f-chip { padding: 4px 12px; font-size: 13px; border-radius: var(--r-sm);
  color: var(--t-2); background: transparent; border: 0; }
.f-chip:hover { color: var(--c-primary); background: var(--c-primary-bg-hov); }
.f-chip.is-on { color: #fff; background: var(--c-primary); font-weight: 600; }
.f-chip .cnt { font-size: 11px; opacity: .75; margin-left: 2px; }

/* 品牌字母 tab 行 */
.brand-tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.brand-chips { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--bd-strong);
  display: none; flex-wrap: wrap; gap: 2px 4px; }
.brand-chips.show { display: flex; }

/* ---------------- 已选回显条 ---------------- */
.applied { margin-top: 10px; display: none; align-items: center; flex-wrap: wrap; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--bd-light); border-radius: var(--r-md); padding: 8px 12px; }
.applied.show { display: flex; }
.a-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  background: var(--c-primary-bg); border-radius: var(--r-sm); font-size: 12px; color: var(--c-primary); }
.a-chip button { border: 0; background: transparent; color: var(--c-primary); font-size: 13px; line-height: 1; padding: 0; }
.a-chip button:hover { color: var(--c-price); }
.a-clear { border: 0; background: transparent; font-size: 12px; color: var(--t-3); margin-left: auto; }
.a-clear:hover { color: var(--c-price); }

/* ---------------- 结果控制行 ---------------- */
.ctrl { position: sticky; top: 44px; z-index: 30; display: flex; align-items: center;
  padding: 10px 2px; }
.ctrl-count { font-size: 13px; color: var(--t-3); }
.ctrl-count b { font-size: 15px; color: var(--t-1); font-weight: 700; }
.ctrl-sort { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.sort-chip { height: 26px; padding: 0 10px; border: 0; background: transparent;
  border-radius: var(--r-sm); font-size: 13px; color: var(--t-2); }
.sort-chip:hover { color: var(--c-primary); background: var(--c-primary-bg-hov); }
.sort-chip.is-on { color: var(--c-primary); background: var(--c-primary-bg-act); font-weight: 600; }

/* ---------------- 车系卡片网格 ---------------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.s-card { display: flex; gap: 12px; padding: 16px 14px; background: var(--bg-card);
  border: 1px solid var(--bd-strong); border-radius: var(--r-md); cursor: pointer;
  position: relative; }
.s-card:hover { border-color: var(--c-primary); }
.s-avatar { flex: none; width: 56px; height: 56px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; color: #fff; background: var(--av, #3D5A80); }
.s-main { flex: 1; min-width: 0; }
.s-name { font-size: 15px; font-weight: 600; color: var(--t-1); line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 2px; }
.s-new { display: inline-block; vertical-align: 2px; margin-left: 5px; font-style: normal;
  font-size: 10px; line-height: 1; color: #fff; background: var(--c-price);
  border-radius: 2px; padding: 2px 4px; position: relative; top: -1px; }
.s-price { font-size: 16px; font-weight: 600; color: var(--c-price); margin: 5px 0 4px; }
.s-price.na { font-size: 13px; color: var(--t-3); font-weight: 400; }
.s-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 2px;
  background: var(--bg-soft); color: var(--t-2); }
.tag-ev { background: var(--c-primary-bg); color: var(--c-primary); }
.s-sales { margin-top: 7px; font-size: 12px; color: var(--t-3); }
.s-sales b { color: var(--t-2); font-weight: 600; }
.s-sales .up { color: var(--c-green); }
.s-sales .down { color: var(--c-price); }
.s-sales .conf { font-size: 10px; color: var(--t-3); border: 1px solid var(--bd-strong);
  border-radius: 2px; padding: 0 3px; margin-left: 4px; vertical-align: 1px; }

/* 加载更多 / 哨兵 / 空态 */
.more-sentinel { height: 2px; }
.more-btn { display: none; margin: 16px auto; height: 36px; padding: 0 28px;
  border: 1px solid var(--bd-strong); background: var(--bg-card);
  border-radius: var(--r-md); font-size: 13px; color: var(--t-2); }
.more-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.empty-box { display: none; text-align: center; padding: 48px 20px;
  background: var(--bg-card); border: 1px solid var(--bd-strong); border-radius: var(--r-md); }
.empty-box.show { display: block; }
.empty-tit { font-size: 16px; font-weight: 700; color: var(--t-1); }
.empty-sub { margin-top: 10px; font-size: 13px; color: var(--t-3); }
.empty-sub a { color: var(--c-primary); margin: 0 6px; }
.empty-sub a:hover { text-decoration: underline; }

/* 骨架屏 */
.skel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.skel-card { height: 122px; background: var(--bg-card); border: 1px solid var(--bd-light);
  border-radius: var(--r-md); padding: 16px 14px; display: flex; gap: 12px; }
.skel-av { width: 56px; height: 56px; border-radius: var(--r-md); background: var(--bg-soft); }
.skel-lines { flex: 1; }
.skel-line { height: 14px; border-radius: 2px; background: var(--bg-soft); margin-bottom: 10px; }
.skel-line.w60 { width: 60%; }
.skel-line.w80 { width: 80%; }
.skel-av, .skel-line { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* 错误态 */
.err-box { display: none; text-align: center; padding: 48px 20px;
  background: var(--bg-card); border: 1px solid var(--bd-strong); border-radius: var(--r-md); }
.err-box.show { display: block; }
.err-box p { font-size: 14px; color: var(--t-2); margin-bottom: 12px; }
.err-retry { height: 32px; padding: 0 20px; border: 1px solid var(--c-primary);
  background: var(--bg-card); border-radius: var(--r-md); color: var(--c-primary); font-size: 13px; }
.err-retry:hover { background: var(--c-primary-bg-hov); }

/* ---------------- footer 口径脚注 ---------------- */
.ft { margin: 28px 0 20px; text-align: center; font-size: 12px; color: var(--t-3); }
.ft a { color: var(--t-3); text-decoration: underline; }

/* ---------------- 车系详情页 ---------------- */
.crumb { padding: 12px 0 4px; font-size: 13px; color: var(--t-3); }
.crumb a:hover { color: var(--c-primary); }
.crumb .sep { margin: 0 6px; color: var(--bd-strong); }

.hero { margin-top: 8px; background: var(--bg-card); border: 1px solid var(--bd-light);
  border-radius: var(--r-md); padding: 20px; display: flex; gap: 16px; }
.hero-av { flex: none; width: 72px; height: 72px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 600; color: #fff; background: var(--av, #3D5A80); }
.hero-main { flex: 1; min-width: 0; }
.hero-name { font-size: 22px; font-weight: 700; color: var(--t-1); line-height: 1.3; }
.hero-name .s-new { vertical-align: 6px; }
.pill { display: inline-block; vertical-align: 4px; margin-left: 8px; font-size: 11px;
  line-height: 1; padding: 4px 8px; border-radius: 10px; background: var(--bg-soft); color: var(--t-2); }
.pill-on { background: var(--c-green-bg); color: var(--c-green); }
.hero-price { margin-top: 8px; font-size: 20px; font-weight: 700; color: var(--c-price); }
.hero-price.na { font-size: 14px; color: var(--t-3); font-weight: 400; }
.hero-price em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--t-3); margin-left: 6px; }
.hero-tags { margin-top: 8px; font-size: 13px; color: var(--t-3); }
.hero-sales { flex: none; align-self: stretch; min-width: 170px; padding: 12px 16px;
  background: var(--bg-soft); border-radius: var(--r-md); display: flex;
  flex-direction: column; justify-content: center; }
.hero-sales .hs-num { font-size: 20px; font-weight: 700; color: var(--t-1); }
.hero-sales .hs-num b { color: var(--c-green); }
.hero-sales .hs-sub { margin-top: 4px; font-size: 12px; color: var(--t-3); }
.hero-sales .hs-lbl { font-size: 12px; color: var(--t-3); margin-bottom: 2px; }

/* 车型列表卡 */
.spec-list { margin-top: 12px; background: var(--bg-card); border: 1px solid var(--bd-light);
  border-radius: var(--r-md); padding: 16px 20px 20px; }
.spec-head { display: flex; align-items: center; }
.spec-head h2 { font-size: 16px; font-weight: 700; color: var(--t-1); }
.spec-head .cnt { font-size: 13px; font-weight: 400; color: var(--t-3); margin-left: 8px; }
.st-pills { margin-left: auto; display: flex; gap: 4px; }
.st-pill { height: 26px; padding: 0 12px; border: 0; border-radius: 13px;
  background: var(--bg-soft); font-size: 12px; color: var(--t-2); }
.st-pill.is-on { background: var(--c-primary-bg-act); color: var(--c-primary); font-weight: 600; }

.year-tabs { display: flex; gap: 4px; margin-top: 12px; padding: 10px 0;
  border-top: 1px solid var(--bd-light); border-bottom: 1px solid var(--bd-light);
  overflow-x: auto; scrollbar-width: none; }
.year-tabs::-webkit-scrollbar { display: none; }
.y-chip { flex: none; height: 26px; padding: 0 12px; border: 0; background: transparent;
  border-radius: var(--r-sm); font-size: 13px; color: var(--t-2); }
.y-chip:hover { background: var(--c-primary-bg-hov); color: var(--c-primary); }
.y-chip.is-on { background: var(--c-primary); color: #fff; font-weight: 600; }

.spec-table-head { display: flex; height: 40px; align-items: center; padding: 0 12px;
  background: var(--bg-soft); border-radius: var(--r-sm) var(--r-sm) 0 0;
  font-size: 12px; color: var(--t-3); }
.spec-table-head .col-name { flex: 1; }
.spec-table-head .col-price { width: 120px; }
.spec-table-head .col-status { width: 64px; text-align: center; }
.spec-table-head .col-op { width: 76px; text-align: right; }

.y-title { display: flex; align-items: baseline; gap: 10px; padding: 14px 12px 8px; }
.y-title h3 { font-size: 15px; font-weight: 700; color: var(--t-1); }
.y-sub { font-size: 12px; color: var(--t-3); }

.spec-row { display: flex; align-items: center; padding: 0 12px; min-height: 48px;
  border-bottom: 1px solid var(--bd-light); }
.spec-row:hover { background: var(--c-primary-bg-hov); }
.sp-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--t-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 12px; }
.sp-power { flex: none; font-size: 11px; line-height: 1; padding: 3px 6px;
  border-radius: 2px; background: var(--c-primary-bg); color: var(--c-primary); margin-right: 10px; }
.sp-price { flex: none; width: 120px; font-size: 14px; font-weight: 600; color: var(--c-price); }
.sp-price.na { font-size: 12px; color: var(--t-3); font-weight: 400; }
.sp-status { flex: none; width: 64px; text-align: center; }
.sp-status .pill { margin: 0; vertical-align: middle; }
.sp-op { flex: none; width: 76px; text-align: right; }
.btn-outline { height: 26px; padding: 0 12px; border: 1px solid rgba(0,136,255,.4);
  border-radius: var(--r-sm); background: transparent; font-size: 12px; color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary-bg-hov); }

.spec-loading { padding: 32px 0; text-align: center; font-size: 13px; color: var(--t-3); }
.spec-err { padding: 24px 0; text-align: center; font-size: 13px; color: var(--t-3); }
.spec-err a { color: var(--c-primary); cursor: pointer; }

/* 参数弹层 */
.modal-mask { display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(17,30,54,.45); }
.modal-mask.show { display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: var(--bg-card); border-radius: var(--r-md); width: 720px; max-width: 100%;
  max-height: 84vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-hd { display: flex; align-items: center; padding: 14px 18px;
  border-bottom: 1px solid var(--bd-light); }
.modal-hd h3 { font-size: 15px; font-weight: 700; color: var(--t-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-close { margin-left: auto; border: 0; background: transparent;
  font-size: 20px; color: var(--t-3); line-height: 1; padding: 0 4px; }
.modal-close:hover { color: var(--t-1); }
.modal-bd { overflow-y: auto; padding: 6px 18px 18px; }
.p-group h4 { display: flex; align-items: baseline; gap: 8px; padding: 12px 0 6px;
  font-size: 14px; font-weight: 700; color: var(--t-1);
  border-bottom: 1px solid var(--bd-light); }
.p-group h4 span { font-size: 12px; font-weight: 400; color: var(--t-3); }
.p-group table { width: 100%; border-collapse: collapse; }
.p-group td { padding: 7px 4px; font-size: 13px; border-bottom: 1px solid var(--bd-light);
  color: var(--t-2); }
.p-group td:first-child { width: 38%; color: var(--t-3); }
.modal-loading { padding: 40px 0; text-align: center; font-size: 13px; color: var(--t-3); }

/* ---------------- 移动端筛选抽屉 ---------------- */
.drawer-mask, .drawer { display: none; }
.drawer-mask.show { display: block; position: fixed; inset: 0; z-index: 90;
  background: rgba(17,30,54,.45); }
.drawer.show { display: flex; flex-direction: column; position: fixed; left: 0; right: 0;
  bottom: 0; z-index: 91; max-height: 80vh; background: var(--bg-card);
  border-radius: 12px 12px 0 0; }
.drawer-hd { flex: none; display: flex; align-items: center; padding: 14px 16px;
  border-bottom: 1px solid var(--bd-light); }
.drawer-hd h3 { font-size: 15px; font-weight: 700; }
.drawer-close { margin-left: auto; border: 0; background: transparent;
  font-size: 20px; color: var(--t-3); }
.drawer-bd { flex: 1; overflow-y: auto; padding: 0 16px; }
.drawer-bd .f-row { border-bottom: 1px solid var(--bd-light); }
.drawer-ft { flex: none; display: flex; gap: 10px; padding: 12px 16px
  calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--bd-light); }
.drawer-reset { flex: none; height: 44px; padding: 0 18px; border: 1px solid var(--bd-strong);
  border-radius: var(--r-md); background: var(--bg-card); font-size: 14px; color: var(--t-2); }
.drawer-apply { flex: 1; height: 44px; border: 0; border-radius: var(--r-md);
  background: var(--c-primary); color: #fff; font-size: 15px; font-weight: 600; }
.drawer-apply b { font-weight: 700; }

/* ---------------- 响应式（<768 移动端） ---------------- */
@media (max-width: 767px) {
  .container { padding: 0 12px; }
  .hd { height: 48px; }
  .hd-in { gap: 12px; }
  .hd-search { flex: 1; }
  .hd-stat { display: none; }
  .hd-search input { height: 32px; }

  .qtabs { top: 0; }
  .m-filter-bar { display: block; }
  .ctrl { position: static; flex-wrap: wrap; gap: 6px; }
  .ctrl-sort { margin-left: 0; width: 100%; }
  .sort-chip { height: 30px; }

  /* 筛选区藏进抽屉：PC 平铺 DOM 移动端整体收起，抽屉内复用同一份 f-row */
  .filters { display: none; }
  .drawer .filters { display: block; margin: 0; border: 0; border-radius: 0; padding: 0 16px; }
  .drawer .f-label { width: 52px; }

  .grid, .skel-grid { grid-template-columns: 1fr; gap: 8px; }
  .s-card { padding: 14px 12px; }

  .hero { flex-direction: column; padding: 16px; }
  .hero-av { width: 64px; height: 64px; }
  .hero-name { font-size: 19px; }
  .hero-sales { min-width: 0; flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .hero-sales .hs-lbl { width: 100%; }

  .spec-list { padding: 14px 12px 16px; }
  .spec-table-head { display: none; }
  .spec-row { flex-wrap: wrap; padding: 10px 8px; row-gap: 6px; }
  .sp-name { flex: 1 1 100%; white-space: normal; }
  .sp-power { order: 3; }
  .sp-price { width: auto; flex: 1; order: 4; text-align: right; }
  .sp-status { width: auto; order: 5; }
  .sp-op { width: auto; order: 6; }
  .sp-op .btn-outline { display: none; }  /* 移动端点行开弹层，不需要按钮 */

  .modal-mask.show { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 12px 12px 0 0; }
}

/* ≥1600 放宽到 5 列 */
@media (min-width: 1600px) {
  :root { --w-container: 1440px; }
  .grid, .skel-grid { grid-template-columns: repeat(5, 1fr); }
}
