/* ==========================================================================
   题库520-莽过教育题库激活码在线下单 · 全站样式
   --------------------------------------------------------------------------
   目录：
     1. 设计变量 / Reset / 基础排版
     2. 通用工具类（container / 无障碍 / 按钮 / 骨架 / 状态 / 轻提示）
     3. 顶部导航（sticky + 底部高亮指示条 + 汉堡菜单）
     4. 首屏 Hero / 搜索 / 权威统计
     5. 板块 Tab 卡片
     6. Section 标题 / 主体布局
     7. 侧边筛选栏 / 分类速览
     8. 结果区工具条 / 已选 chips
     9. 产品卡片网格
    10. 分页
    11. 最近更新表格（移动端转卡片）
    12. 资讯公告占位 / Footer
    13. 模态框（详情 / 下单）
    14. 响应式断点：1200 / 1024 / 768 / 480
   --------------------------------------------------------------------------
   约束：纯原生 CSS，无外部字体 / 图标 / 框架 CDN；系统字体栈；离线可用。
   ========================================================================== */

/* ============================ 1. 变量 & Reset ============================ */
:root {
  /* 品牌主色：深蓝 / 靛蓝 */
  --primary-950: #0f1e4d;
  --primary-900: #172554;
  --primary-800: #1e3a8a;
  --primary-700: #1d4ed8;
  --primary-600: #2563eb;
  --primary-500: #3b82f6;
  --primary-100: #dbeafe;
  --primary-50:  #eff6ff;

  /* 强调色：橙色（价格 / CTA） */
  --accent-700: #c2410c;
  --accent-600: #ea580c;
  --accent-500: #f97316;
  --accent-100: #ffedd5;
  --accent-50:  #fff7ed;

  /* 语义色 */
  --success-600: #059669;
  --success-50:  #ecfdf5;
  --danger-600:  #dc2626;
  --danger-50:   #fef2f2;
  --warning-600: #d97706;
  --warning-50:  #fffbeb;

  /* 中性色 */
  --ink:        #0f172a;
  --ink-2:      #1e293b;
  --body:       #334155;
  --muted:      #64748b;
  --muted-2:    #94a3b8;
  --line:       #e2e8f0;
  --line-2:     #cbd5e1;
  --bg:         #f5f7fb;
  --bg-2:       #eef2f9;
  --surface:    #ffffff;

  /* 形状 / 阴影 / 动效 */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
  --shadow:    0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .16);
  --shadow-primary: 0 10px 26px rgba(37, 99, 235, .28);
  --t-fast: .16s ease;
  --t:       .26s cubic-bezier(.4, 0, .2, 1);

  --header-h: 68px;
  --container: 1240px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Microsoft JhengHei",
          "Noto Sans CJK SC", "Source Han Sans SC", Roboto, Helvetica, Arial,
          sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* 原生 [hidden] 兜底：部分组件自带 display，需强制隐藏 */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* 防止移动端横向溢出 */
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }

/* 全局内联图标默认尺寸（SVG 精灵本体不参与渲染） */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg:not(.svg-sprite) {
  width: 1.2em;
  height: 1.2em;
  display: inline-block;
  vertical-align: -.16em;
  flex: none;
}

:focus-visible {
  outline: 3px solid var(--primary-500);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

::selection { background: var(--primary-100); color: var(--primary-900); }

/* ============================ 2. 通用工具类 ============================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px; left: 16px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--primary-700);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 0; }

.muted-text { color: var(--muted); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  text-align: center;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-fast),
              transform var(--t-fast);
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--primary-700);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn--primary:hover:not(:disabled) { background: var(--primary-800); box-shadow: var(--shadow-lg); }

.btn--accent {
  background: var(--accent-600);
  color: #fff;
  box-shadow: 0 8px 20px rgba(234, 88, 12, .26);
}
.btn--accent:hover:not(:disabled) { background: var(--accent-700); }

.btn--outline {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--ink-2);
}
.btn--outline:hover:not(:disabled) { border-color: var(--primary-500); color: var(--primary-700); }

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-2);
}
.btn--ghost:hover:not(:disabled) { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-700); }

.btn--sm { min-height: 44px; padding: 8px 14px; font-size: 13px; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover { background: var(--primary-50); color: var(--primary-700); border-color: var(--primary-100); }
.icon-btn svg { width: 1.35em; height: 1.35em; }

.link-btn {
  padding: 6px 8px;
  border: 0;
  background: none;
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 600;
}
.link-btn:hover { color: var(--primary-800); text-decoration: underline; }

/* ---------- 表单控件 ---------- */
.select-wrap { position: relative; display: block; }
.select-wrap select {
  width: 100%;
  min-height: 44px;
  padding: 9px 38px 9px 13px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.select-wrap select:hover { border-color: var(--primary-500); }
.select-wrap select:focus { border-color: var(--primary-600); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); outline: none; }
.select-wrap > svg {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 1.05em; height: 1.05em;
  color: var(--muted);
  pointer-events: none;
}
.select-wrap--sm select { min-height: 44px; padding-block: 7px; font-size: 13px; }

.input-with-icon { position: relative; display: block; }
.input-with-icon > svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}
.input-with-icon input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px 9px 38px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input-with-icon input:focus { border-color: var(--primary-600); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); outline: none; }
.input-with-icon input::placeholder { color: var(--muted-2); }

.text-input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.text-input:focus { border-color: var(--primary-600); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); outline: none; }
.text-input::placeholder { color: var(--muted-2); }

/* ---------- 加载骨架 ---------- */
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-2);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skeleton--board { height: 118px; }
.skeleton--card { height: 320px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 状态块（加载 / 错误 / 空） ---------- */
.state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  padding: 40px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.state-box[hidden] { display: none; }
.state-box__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary-600);
}
.state-box__icon svg { width: 26px; height: 26px; }
.state-box__icon.is-error { background: var(--danger-50); color: var(--danger-600); }
.state-box__icon.is-empty { background: var(--bg-2); color: var(--muted); }
.state-box__title { font-size: 16px; font-weight: 700; color: var(--ink); }
.state-box__desc { max-width: 460px; font-size: 13.5px; color: var(--muted); }
.state-box__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }

/* 旋转加载指示器 */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--primary-100);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 全局轻提示 ---------- */
.toast-wrap {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary-600);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  color: var(--ink-2);
  animation: toast-in var(--t);
  pointer-events: auto;
}
.toast svg { color: var(--primary-600); margin-top: 2px; }
.toast--error { border-left-color: var(--danger-600); }
.toast--error svg { color: var(--danger-600); }
.toast--success { border-left-color: var(--success-600); }
.toast--success svg { color: var(--success-600); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ============================ 3. 顶部导航 ============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: var(--shadow-xs);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 100%;
}

/* ---------- 品牌 ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--primary-700), var(--primary-900));
  color: #fff;
  box-shadow: 0 6px 14px rgba(30, 58, 138, .28);
}
.brand__mark svg { width: 22px; height: 22px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-size: 20px; font-weight: 800; letter-spacing: .5px; color: var(--primary-900); }
.brand__name span { color: var(--accent-600); }
.brand__sub { margin-top: 4px; font-size: 10.5px; color: var(--muted); letter-spacing: .2px; white-space: nowrap; }

/* ---------- 桌面导航 ---------- */
.main-nav { flex: 1; min-width: 0; }
.main-nav__list { display: flex; align-items: stretch; justify-content: center; gap: 2px; height: var(--header-h); }
.main-nav__list li { display: flex; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 600;
  color: var(--body);
  white-space: nowrap;
  transition: color var(--t-fast);
}
.nav-link:hover { color: var(--primary-700); }
/* 底部高亮指示条 */
.nav-link::after {
  content: "";
  position: absolute;
  left: 15px; right: 15px; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--primary-600);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--t);
}
.nav-link:hover::after { transform: scaleX(.6); }
.nav-link.is-active { color: var(--primary-700); }
.nav-link.is-active::after { transform: scaleX(1); }

.header__cta { flex: none; }

/* 汉堡按钮：桌面隐藏，<=768px 由媒体查询显示 */
.nav-toggle { display: none; }

/* ============================ 4. 首屏 Hero ============================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 62px 0 54px;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(59, 130, 246, .35), transparent 70%),
    linear-gradient(135deg, var(--primary-950) 0%, var(--primary-800) 48%, var(--primary-600) 100%);
  color: #fff;
}
.hero__glow { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.hero__glow--a { width: 420px; height: 420px; top: -180px; right: -60px; background: rgba(59, 130, 246, .34); }
.hero__glow--b { width: 340px; height: 340px; bottom: -200px; left: 8%; background: rgba(249, 115, 22, .18); }
.hero__inner { position: relative; z-index: 1; text-align: center; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 15px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .4px;
  color: rgba(255, 255, 255, .92);
}
.hero__eyebrow svg { color: #fbbf24; }
.hero__title {
  margin-top: 20px;
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: 1px;
}
.hero__title span {
  background: linear-gradient(100deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__desc {
  max-width: 720px;
  margin: 16px auto 0;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(255, 255, 255, .82);
}

/* ---------- Hero 全局搜索 ---------- */
.hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 640px;
  margin: 30px auto 0;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 20px 44px rgba(8, 20, 60, .28);
}
.hero-search__icon { margin-left: 12px; color: var(--muted); width: 1.3em; height: 1.3em; }
.hero-search__input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 8px 6px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}
.hero-search__input:focus { outline: none; }
.hero-search__input::placeholder { color: var(--muted-2); }
.hero-search__btn { min-height: 46px; padding-inline: 22px; border-radius: 12px; }

.hero__hot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 18px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .7);
}
.hero__hot a {
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  color: rgba(255, 255, 255, .9);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.hero__hot a:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .55); }

/* ---------- 权威统计 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 860px;
  margin: 38px auto 0;
}
.stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 16px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .09);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: left;
}
.stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  flex: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, .15);
  color: #fbbf24;
}
.stat__icon svg { width: 21px; height: 21px; }
.stat > div { display: flex; flex-direction: column; }
.stat__num { font-size: 25px; font-weight: 800; line-height: 1.2; color: #fff; font-variant-numeric: tabular-nums; }
.stat__label { margin-top: 2px; font-size: 12px; color: rgba(255, 255, 255, .72); }

.hero__sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .68);
}

/* ============================ 5. Section 通用 ============================ */
.section { padding: 56px 0; }
.section--boards { padding-bottom: 14px; }
.section--catalog { padding-top: 34px; }
.section--changes { background: var(--surface); border-block: 1px solid var(--line); }
.section--news { padding-bottom: 64px; }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.2px;
  color: var(--primary-600);
  text-transform: uppercase;
}
.section__head h2 { font-size: clamp(21px, 2.4vw, 28px); font-weight: 800; color: var(--ink); letter-spacing: .3px; }
.section__sub { margin-top: 7px; font-size: 13.5px; color: var(--muted); }
.section__hint { font-size: 12.5px; color: var(--muted-2); white-space: nowrap; }
.section__actions { display: flex; align-items: center; gap: 12px; flex: none; }

/* ---------- 板块 Tab 卡片 ---------- */
.board-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.board-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 126px;
  padding: 20px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t), background var(--t);
}
.board-tab:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-100); }
.board-tab.is-active {
  border-color: var(--primary-600);
  background: linear-gradient(140deg, var(--primary-50), var(--surface) 75%);
  box-shadow: 0 10px 28px rgba(37, 99, 235, .16);
}
.board-tab.is-active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary-600);
}
.board-tab__top { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; }
.board-tab__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-600);
  transition: background var(--t-fast), color var(--t-fast);
}
.board-tab__icon svg { width: 21px; height: 21px; }
.board-tab.is-active .board-tab__icon { background: var(--primary-600); color: #fff; }
.board-tab__badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-50);
  color: var(--accent-700);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.board-tab.is-active .board-tab__badge { background: var(--accent-600); color: #fff; }
.board-tab__name { margin-top: 2px; font-size: 17px; font-weight: 800; }
.board-tab__desc { font-size: 12.5px; color: var(--muted); }
.board-tab__check { position: absolute; right: 16px; bottom: 16px; color: var(--primary-600); opacity: 0; transition: opacity var(--t); }
.board-tab.is-active .board-tab__check { opacity: 1; }
.board-tab__check svg { width: 20px; height: 20px; }

/* ============================ 6. 主体布局 ============================ */
.layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* ============================ 7. 侧边筛选栏 ============================ */
.filter-panel { min-width: 0; }
.filter-toggle { display: none; width: 100%; }
.filter-toggle__chevron { margin-left: auto; transition: transform var(--t); }
.filter-toggle[aria-expanded="true"] .filter-toggle__chevron { transform: rotate(180deg); }

.filter-body { display: block; }
.filter-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.filter-card + .filter-card { margin-top: 14px; }
.filter-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.filter-card__head h3 { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.filter-card__head h3 svg { color: var(--primary-600); }

.field { margin-bottom: 14px; }
.field > label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.filter-card .btn--block { margin-top: 6px; }

.filter-card--note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--primary-50);
  border-color: var(--primary-100);
  box-shadow: none;
}
.filter-card--note > svg { color: var(--primary-600); margin-top: 2px; }
.filter-card--note p { font-size: 12px; line-height: 1.7; color: var(--primary-900); }

/* ---------- 分类速览树 ---------- */
.tree-overview { max-height: 320px; overflow-y: auto; padding-right: 4px; }
.tree-overview::-webkit-scrollbar { width: 6px; }
.tree-overview::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.tree-cat { margin-bottom: 8px; }
.tree-cat__name {
  display: block;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: var(--radius-xs);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  transition: background var(--t-fast), color var(--t-fast);
}
.tree-cat__name:hover { background: var(--primary-50); color: var(--primary-700); }
.tree-cat__name > span { color: var(--muted-2); font-weight: 400; }
.tree-exams { padding: 4px 0 2px 12px; }
.tree-exam { padding: 5px 8px; font-size: 12px; color: var(--body); border-radius: var(--radius-xs); }
.tree-exam:hover { background: var(--primary-50); color: var(--primary-700); }
.tree-exam__name { display: inline-flex; align-items: center; gap: 5px; }
.tree-exam__name::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--muted-2); }
.tree-subjects { padding: 3px 0 2px 16px; }
.tree-subject {
  display: block;
  width: 100%;
  padding: 4px 8px;
  border: 0;
  border-radius: var(--radius-xs);
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  text-align: left;
  transition: color var(--t-fast), background var(--t-fast);
}
.tree-subject:hover { color: var(--primary-700); background: var(--primary-50); }

/* ============================ 8. 结果区 ============================ */
.results { min-width: 0; }
.results__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.results__count { font-size: 13.5px; color: var(--muted); }
.results__count strong { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.results__tools { display: flex; align-items: center; gap: 8px; }
.results__tools .select-wrap { min-width: 156px; }

.active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.active-chips:empty { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 8px 4px 11px;
  border: 1px solid var(--primary-100);
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-800);
  font-size: 12px;
}
.chip__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(37, 99, 235, .12);
  color: var(--primary-700);
  font-size: 14px;
  line-height: 1;
}
.chip__x:hover { background: var(--primary-600); color: #fff; }

/* ============================ 9. 产品卡片 ============================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.product-grid[aria-busy="true"] { min-height: 200px; }

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-100); }
.product-card:focus-visible { outline-offset: 3px; }

/* 卡片顶部：板块标签 + 折扣标签 */
.product-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 15px 0;
}
.board-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.board-badge svg { width: 13px; height: 13px; }
.board-badge[data-board="vip"] { background: #f5f3ff; color: #6d28d9; }
.board-badge[data-board="secret"] { background: var(--accent-50); color: var(--accent-700); }
.board-badge[data-board="school_course"] { background: var(--success-50); color: var(--success-600); }
.discount-badge {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-600);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}
.discount-badge.is-none { background: var(--bg-2); color: var(--muted); }

/* 卡片主体：点击区域 */
.product-card__main {
  display: block;
  width: 100%;
  flex: 1;
  padding: 12px 15px 4px;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.product-card__main:focus-visible { outline-offset: -3px; }
.product-card__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: 46px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  transition: color var(--t-fast);
}
.product-card__main:hover .product-card__name { color: var(--primary-700); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 4px;
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--muted);
}
.crumbs span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs i { font-style: normal; color: var(--muted-2); }

.product-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--bg);
  color: var(--muted);
  font-size: 11.5px;
}
.meta-tag svg { color: var(--primary-500); }

/* 价格区 */
.product-card__price {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 13px 15px 14px;
  border-top: 1px dashed var(--line);
  background: linear-gradient(180deg, var(--accent-50), var(--surface));
}
.price-block { display: flex; flex-direction: column; line-height: 1.25; }
.price-block__label { font-size: 10.5px; color: var(--muted); }
.official-price {
  font-size: 12.5px;
  color: var(--muted-2);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.price-main { display: flex; align-items: baseline; gap: 4px; color: var(--accent-600); }
.price-main__cny { font-size: 15px; font-weight: 800; }
.price-main__num { font-size: 27px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.price-main__label { font-size: 10.5px; font-weight: 600; color: var(--accent-700); }
.save-badge {
  margin-left: auto;
  align-self: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--accent-100);
  color: var(--accent-700);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.product-card__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px 15px;
}
.product-card__foot .btn { min-height: 42px; }
.btn--buy { flex: 1; }
.official-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.official-link:hover { color: var(--primary-700); border-color: var(--primary-500); background: var(--primary-50); }
.official-link.is-disabled { opacity: .45; pointer-events: none; }

/* ============================ 10. 分页 ============================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 28px;
}
.pagination:empty { display: none; }
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--body);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: all var(--t-fast);
}
.page-btn:hover:not(:disabled):not(.is-current) { border-color: var(--primary-500); color: var(--primary-700); background: var(--primary-50); }
.page-btn.is-current { border-color: var(--primary-600); background: var(--primary-600); color: #fff; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 44px; color: var(--muted-2); }
.page-info { width: 100%; margin-top: 8px; font-size: 12px; color: var(--muted-2); text-align: center; }
/* ============================ 11. 最近更新表格 ============================ */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.changes-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.changes-table thead { background: var(--bg); }
.changes-table th {
  padding: 13px 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.changes-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--body); vertical-align: middle; }
.changes-table tbody tr:last-child td { border-bottom: 0; }
.changes-table tbody tr:hover { background: var(--primary-50); }
.change-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.change-type--added { background: var(--success-50); color: var(--success-600); }
.change-type--price_changed { background: var(--warning-50); color: var(--warning-600); }
.change-type--updated { background: var(--primary-50); color: var(--primary-700); }
.change-type--removed { background: var(--danger-50); color: var(--danger-600); }
.change-type--reappeared { background: #f5f3ff; color: #6d28d9; }
.change-type--unknown { background: var(--bg-2); color: var(--muted); }
.change-product { font-weight: 600; color: var(--ink-2); }
.change-detail { color: var(--muted); font-variant-numeric: tabular-nums; }
.change-detail .arrow { padding: 0 5px; color: var(--muted-2); }
.change-detail .new { color: var(--accent-700); font-weight: 700; }
.change-time { color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ============================ 12. 资讯公告 / Footer ============================ */
.news-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.news-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  flex: none;
  border-radius: 15px;
  background: var(--primary-50);
  color: var(--primary-600);
}
.news-card__icon svg { width: 26px; height: 26px; }
.news-card__body h3 { font-size: 17px; font-weight: 700; color: var(--ink); }
.news-card__body p { max-width: 760px; margin: 8px 0 14px; font-size: 13.5px; color: var(--muted); line-height: 1.8; }

.site-footer { background: var(--primary-950); color: rgba(255, 255, 255, .72); padding-top: 48px; }
.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 36px;
}
.brand--footer .brand__name { color: #fff; }
.brand--footer .brand__sub { color: rgba(255, 255, 255, .6); }
.brand--footer .brand__mark { background: rgba(255, 255, 255, .14); box-shadow: none; }
.footer__brand > p { max-width: 420px; margin-top: 16px; font-size: 13px; line-height: 1.85; color: rgba(255, 255, 255, .58); }
.footer__col h3 { margin-bottom: 14px; font-size: 14px; font-weight: 700; color: #fff; }
.footer__col li { margin-bottom: 10px; font-size: 12.8px; }
.footer__col a:hover { color: #fff; text-decoration: underline; }
.footer__ico { margin-right: 6px; color: var(--primary-500); }
.footer__ico svg { width: 14px; height: 14px; }
.footer__legal {
  padding-block: 18px 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 12px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .5);
}
.footer__legal strong { color: rgba(255, 255, 255, .8); }
.footer__legal p + p { margin-top: 6px; }

/* ============================ 13. 模态框 ============================ */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .58); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  max-height: min(88vh, 820px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: modal-in var(--t);
  overflow: hidden;
}
.modal__panel--sm { max-width: 500px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.modal__head h2 { font-size: 18px; font-weight: 800; color: var(--ink); }
.modal__body { padding: 22px; overflow-y: auto; flex: 1; }
.modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  flex: none;
}
.modal__foot:empty { display: none; }

/* ---------- 产品详情内容 ---------- */
.detail-hero {
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-50), var(--surface));
  border: 1px solid var(--primary-100);
}
.detail-hero__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.detail-hero h3 { font-size: 19px; font-weight: 800; color: var(--ink); line-height: 1.5; }
.detail-crumbs { margin-top: 9px; font-size: 12.5px; color: var(--muted); }
.detail-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--primary-100);
}
.detail-price .official-price { font-size: 14px; }
.detail-price__now { color: var(--accent-600); font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; }
.detail-price__now small { font-size: 16px; }
.detail-price__save { padding: 4px 10px; border-radius: 999px; background: var(--accent-50); color: var(--accent-700); font-size: 12px; font-weight: 700; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.detail-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.detail-item__k { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.detail-item__v { font-size: 14px; font-weight: 600; color: var(--ink-2); word-break: break-all; }
.detail-item--full { grid-column: 1 / -1; }
.detail-link { color: var(--primary-700); text-decoration: underline; }
.detail-note {
  display: flex;
  gap: 9px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--warning-50);
  color: #92400e;
  font-size: 12.5px;
  line-height: 1.7;
}
.detail-note > svg { flex: none; margin-top: 2px; }

/* 价格历史（若详情接口返回） */
.price-history { margin-top: 20px; }
.price-history h4 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.price-history__list { display: flex; flex-wrap: wrap; gap: 8px; }
.price-history__item {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--bg);
  font-size: 12px;
  color: var(--body);
}

/* ---------- 下单表单 ---------- */
.order-summary {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.order-summary__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 6px 0; }
.order-summary__row + .order-summary__row { border-top: 1px dashed var(--line); }
.order-summary__row .k { color: var(--muted); }
.order-summary__row .v { font-weight: 600; color: var(--ink-2); text-align: right; }
.order-summary__row .v--price { color: var(--accent-600); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.order-summary__name { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.order-field { margin-top: 18px; }
.order-field > label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.order-field__hint { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.order-notice {
  display: flex;
  gap: 9px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  color: var(--primary-900);
  font-size: 12.5px;
  line-height: 1.7;
}
.order-notice > svg { flex: none; margin-top: 2px; }

/* ---------- 下单成功结果 ---------- */
.order-success { text-align: center; padding: 8px 0 4px; }
.order-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--success-50);
  color: var(--success-600);
  margin-bottom: 14px;
}
.order-success__icon svg { width: 32px; height: 32px; }
.order-success h3 { font-size: 19px; font-weight: 800; color: var(--ink); }
.order-success > p { margin-top: 6px; font-size: 13px; color: var(--muted); }
.order-no {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 18px;
  border: 1px dashed var(--primary-500);
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  color: var(--primary-900);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}
.order-no button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 6px; background: var(--surface); color: var(--primary-700); }
.order-no button:hover { background: var(--primary-600); color: #fff; }
.order-no button svg { width: 15px; height: 15px; }
.pay-hint {
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: var(--warning-50);
  color: #92400e;
  font-size: 12.8px;
  line-height: 1.75;
  text-align: left;
}
.order-meta { margin-top: 16px; text-align: left; }

/* 确认按钮 flex 布局（点击「立即购买」时） */
.modal__foot--split { justify-content: space-between; }

/* ==========================================================================
   14. 响应式断点
   布局切换全部由 CSS @media 完成，不依赖 JS 判断窗口尺寸。
   ========================================================================== */

/* ---------- <= 1200px：容器留白收紧、导航压缩 ---------- */
@media (max-width: 1200px) {
  .nav-link { padding-inline: 11px; font-size: 13.5px; }
  .nav-link::after { left: 11px; right: 11px; }
  .header__cta { display: none; }
}

/* ---------- <= 1024px：侧栏收窄、产品两列、板块两列 ---------- */
@media (max-width: 1024px) {
  .layout { grid-template-columns: 230px minmax(0, 1fr); gap: 18px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-tabs { grid-template-columns: repeat(2, 1fr); }
  .stats { gap: 10px; }
  .stat { padding: 14px 10px; gap: 10px; }
  .stat__num { font-size: 22px; }
  .stat__icon { width: 38px; height: 38px; }
  .footer__inner { gap: 24px; }
  .container { padding-inline: 20px; }
}

/* ---------- <= 768px：汉堡菜单 + 筛选折叠 + 单列产品 + 表格转卡片 ---------- */
@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .container { padding-inline: 16px; }
  .section { padding: 40px 0; }
  .section--catalog { padding-top: 26px; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
  .section__hint { display: none; }

  /* --- 汉堡菜单 --- */
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    order: 3;
  }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    display: none;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    /* 覆盖宽度限制，占满视口 */
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .main-nav.is-open { display: block; }
  .main-nav__list {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 8px 16px 14px;
    gap: 0;
  }
  .main-nav__list li { display: block; }
  .nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;              /* 触摸友好 ≥ 44px */
    padding: 0 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
  }
  .nav-link:hover { background: var(--primary-50); }
  /* 移动端高亮指示条改为左侧竖条 */
  .nav-link::after {
    left: 0; right: auto;
    top: 9px; bottom: 9px;
    width: 3px; height: auto;
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transform-origin: center;
  }
  .nav-link:hover::after { transform: scaleY(.6); }
  .nav-link.is-active { background: var(--primary-50); }
  .nav-link.is-active::after { transform: scaleY(1); }

  .brand__name { font-size: 18px; }
  .brand__sub { font-size: 9.5px; }
  .brand__mark { width: 36px; height: 36px; }

  /* --- Hero --- */
  .hero { padding: 44px 0 40px; }
  .hero__desc { font-size: 14px; }
  .hero-search { flex-wrap: wrap; border-radius: var(--radius); }
  .hero-search__input { min-height: 44px; }
  .hero-search__btn { width: 100%; border-radius: 10px; }
  .stats { grid-template-columns: repeat(2, 1fr); max-width: 100%; margin-top: 28px; }
  .stat { justify-content: flex-start; }

  /* --- 板块卡片 --- */
  .board-tabs { gap: 12px; }
  .board-tab { min-height: 112px; padding: 16px; }

  /* --- 布局：侧栏改到上方，筛选默认折叠 --- */
  .layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .filter-toggle { display: inline-flex; }
  .filter-body {
    display: none;
    margin-top: 12px;
  }
  .filter-body.is-open { display: block; }
  .filter-card { padding: 16px; }
  /* 折叠时筛选卡片内的字段两列排布，减少滚动 */
  .filter-body.is-open .filter-card:first-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }
  .filter-body.is-open .filter-card:first-child .filter-card__head { grid-column: 1 / -1; }
  .filter-body.is-open .filter-card:first-child .btn--block { grid-column: 1 / -1; }

  /* --- 结果区 --- */
  .results__toolbar { flex-wrap: wrap; }
  .results__tools { margin-left: auto; }

  /* --- 产品单列 --- */
  .product-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .product-card__name { min-height: 0; }
  .product-card__foot .btn,
  .official-link,
  .page-btn,
  .nav-link,
  .icon-btn,
  .select-wrap select,
  .input-with-icon input,
  .btn { min-height: 44px; }

  /* --- 表格转卡片：隐藏表头，每个 td 用 data-label 显示字段名 --- */
  .table-wrap { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .changes-table,
  .changes-table tbody,
  .changes-table tr,
  .changes-table td { display: block; width: 100%; }
  .changes-table thead { display: none; }
  .changes-table tbody tr {
    margin-bottom: 12px;
    padding: 6px 14px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
  }
  .changes-table tbody tr:hover { background: var(--surface); }
  .changes-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
    text-align: right;
  }
  .changes-table td:last-child { border-bottom: 0; }
  .changes-table td::before {
    content: attr(data-label);
    flex: none;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
  }
  .changes-table td[data-label=""]::before { display: none; }
  .change-product, .change-detail, .change-time { text-align: right; }
  .change-time { white-space: normal; }

  /* --- 资讯 / Footer --- */
  .news-card { flex-direction: column; gap: 14px; padding: 22px; }
  .footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
  .footer__brand { grid-column: 1 / -1; }

  /* --- 模态框：贴底抽屉式 --- */
  .modal { align-items: flex-end; padding: 0; }
  .modal__panel { max-width: 100%; max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal__body { padding: 18px 16px; }
  .modal__head { padding: 16px; }
  .modal__foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .modal__foot .btn { flex: 1; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-price__now { font-size: 28px; }
  .toast-wrap { right: 12px; left: 12px; bottom: 12px; max-width: none; }
}

/* ---------- <= 480px：极致紧凑，保证无横向溢出 ---------- */
@media (max-width: 480px) {
  .container { padding-inline: 13px; }
  body { font-size: 14px; }

  .brand__sub { display: none; }   /* 窄屏仅保留主 LOGO，避免挤压 */
  .brand__name { font-size: 17px; }
  .brand__mark { width: 34px; height: 34px; border-radius: 9px; }
  .header__inner { gap: 10px; }

  .hero { padding: 36px 0 34px; }
  .hero__title { font-size: 28px; }
  .hero__eyebrow { font-size: 11px; padding: 5px 11px; }
  .hero__desc { font-size: 13px; line-height: 1.75; }
  .hero__hot { font-size: 11.5px; }
  .stats { gap: 8px; }
  .stat { padding: 11px 9px; gap: 8px; }
  .stat__icon { width: 32px; height: 32px; border-radius: 9px; }
  .stat__icon svg { width: 17px; height: 17px; }
  .stat__num { font-size: 19px; }
  .stat__label { font-size: 11px; }

  .board-tabs { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .board-tab { min-height: 0; padding: 15px; }

  /* 筛选字段在窄屏恢复单列，避免 select 过窄 */
  .filter-body.is-open .filter-card:first-child { grid-template-columns: minmax(0, 1fr); }
  .filter-body.is-open .filter-card:first-child .filter-card__head,
  .filter-body.is-open .filter-card:first-child .btn--block { grid-column: auto; }

  .results__tools { width: 100%; }
  .results__tools .select-wrap { flex: 1; min-width: 0; }

  .product-card__top { flex-wrap: wrap; }
  .product-card__foot { flex-wrap: wrap; }
  .product-card__foot .btn--buy { flex-basis: 100%; order: -1; }

  .pagination { gap: 5px; }
  .page-btn { min-width: 40px; padding-inline: 8px; }

  .footer__inner { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .footer__brand { grid-column: auto; }

  .detail-hero { padding: 14px; }
  .detail-hero h3 { font-size: 16.5px; }
  .order-no { font-size: 13px; padding: 10px 12px; letter-spacing: 0; }
}
