/* style.css — 页面级布局：首页分区、列表页、详情页 */

/* ============ 首页 · hero ============ */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 353px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(96deg, #dcefff 0%, #d3e8fe 30%, rgba(190, 220, 250, 0.82) 48%, rgba(168, 206, 245, 0.35) 66%, rgba(150, 195, 240, 0.12) 100%);
}
.hero__inner { padding: 51px 0 34px; }
.hero__title {
  max-width: 720px;
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: #0e2743;
}
.hero__lead {
  max-width: 640px;
  margin-top: 16px;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: #14324f;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 24px; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 14px;
  margin-top: 20px;
  font-size: var(--fs-sm);
  color: #3f566d;
}
.hero__meta span,
.hero__meta a { position: relative; }
.hero__meta > * + *::before {
  content: "|";
  margin-right: 14px;
  color: #9db4c9;
}
.hero__meta a { color: #10456f; font-weight: 600; }

/* ============ 首页 · 分区通用 ============ */
.section { padding: 0; }
.section + .section { margin-top: 20px; }
#categories .section-head { margin-bottom: 26px; }
#mistakes { margin-top: 18px; }
#faq { margin-top: 11px; }

/* ============ 首页 · 购买顺序 ============ */
.buying-order {
  padding: 22px 26px 26px;
  border-radius: var(--radius-lg);
  background: var(--wash);
}
.buying-order .section-head { margin-bottom: 14px; }
.order-grid {
  display: grid;
  grid-template-columns: 1fr 34px 1fr 34px 1fr;
  align-items: start;
  gap: 8px;
}
.order-step { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; }
.order-step__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; grid-column: 2; }
.order-step__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.order-step__badge::before { content: attr(data-n); }
.order-step__kicker { font-size: var(--fs-sm); font-weight: 700; color: var(--accent-strong); }
.order-step__title { font-size: 17px; font-weight: 700; }
.order-step__desc { grid-column: 2; color: #41586e; font-size: var(--fs-xs); line-height: 1.7; }
.order-arrow {
  align-self: center;
  padding-top: 24px;
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  text-align: center;
}
.order-arrow::before { content: "→"; }

/* ============ 首页 · 参数速查 ============ */
.spec-table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.spec-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 15px;
}
.spec-table caption { text-align: left; padding-bottom: 8px; color: var(--muted); font-size: var(--fs-xs); }
.spec-table thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-align: left;
  padding: 7px 16px;
  font-size: 15px;
}
.spec-table tbody th,
.spec-table tbody td { padding: 2px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table tbody th { font-weight: 600; color: var(--ink); width: 22%; }
.spec-table tbody td { color: #33495f; }
.spec-table tbody td:last-child { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.spec-table tbody tr:last-child th,
.spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table tbody tr:nth-child(even) { background: #f8fbfe; }

/* ============ 首页 · 误区 ============ */
.mistake-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mistake-card {
  padding: 16px 18px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid #f0dede;
  box-shadow: var(--shadow-soft);
}
.mistake-card__head { display: flex; align-items: center; gap: 8px; }
.mistake-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  flex: none;
}
.mistake-card__icon::before { content: "!"; }
.mistake-card__title { font-size: 18px; font-weight: 700; }
.mistake-card__desc { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.7; }

/* ============ 首页 · 问答 ============ */
.faq-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.faq-card { padding: 6px 4px 0; }
.faq-card__q { display: flex; align-items: flex-start; gap: 8px; font-size: 16.5px; font-weight: 700; }
.faq-card__icon::before { content: "?"; }
.faq-card__q .faq-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  flex: none;
}
.faq-card__a { margin-top: 10px; padding-left: 29px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }

/* ============ 首页 · CTA ============ */
.cta-band {
  position: relative;
  isolation: isolate;
  margin-top: 67px;
  padding: 40px 0;
  overflow: hidden;
  color: #fff;
}
.cta-band__media { position: absolute; inset: 0; z-index: -2; }
.cta-band__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.cta-band__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(94deg, rgba(14, 62, 112, 0.95) 0%, rgba(20, 74, 128, 0.82) 34%, rgba(30, 90, 148, 0.5) 62%, rgba(42, 104, 164, 0.16) 100%);
}
.cta-band__title { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.cta-band__lead { margin-top: 8px; font-size: 19px; color: rgba(255, 255, 255, 0.9); }
.cta-band .btn { margin-top: 22px; }

/* ============ 内页 · 页头 ============ */
.page-hero { padding: 26px 0 0; }
.page-hero__title { margin-top: 12px; font-size: 40px; letter-spacing: -0.02em; }
.page-hero__lead { margin-top: 10px; max-width: 760px; color: #3c5468; font-size: 17px; line-height: 1.75; }
.page-hero__meta { margin-top: 16px; }

/* ============ 列表页 · 工具栏 ============ */
.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.toolbar__label { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.toolbar__group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar__btn {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #33495f;
  font-family: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: all 0.16s ease;
}
.toolbar__btn:hover { border-color: var(--accent); color: var(--accent); }
.toolbar__btn[aria-pressed="true"],
.toolbar__btn[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.toolbar__btn[aria-current="page"]:hover { color: #fff; }
.toolbar__sort { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.toolbar__select {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.toolbar__count { color: var(--muted); font-size: var(--fs-xs); }

/* ============ 列表页 · 条目范围 ============ */
.list-scope {
  margin-top: 16px;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  color: #2c4a66;
  font-size: var(--fs-sm);
  line-height: 1.75;
}

/* ============ 列表页 · 分页 ============ */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}
.pager a,
.pager span {
  min-width: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: #33495f;
  font-size: var(--fs-sm);
  text-align: center;
  transition: all 0.16s ease;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .is-current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pager .is-gap,
.pager .is-disabled { border-color: transparent; background: transparent; color: var(--muted); }
.pager .is-disabled { cursor: not-allowed; opacity: 0.7; }

/* ============ 列表页 · 卡片 ============ */
.gear-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.gear-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gear-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 28px rgba(16, 52, 92, 0.14); }
.gear-card__link { display: flex; flex: 1; flex-direction: column; color: inherit; }
.gear-card__link:hover { color: inherit; }
.gear-card__thumb { overflow: hidden; }
.gear-card__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.3s ease; }
.gear-card:hover .gear-card__thumb img { transform: scale(1.03); }
.gear-card__body { padding: 14px 16px 18px; }
.gear-card__title { font-size: 18px; font-weight: 700; }
.gear-card__desc { margin-top: 6px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.65; }
.gear-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--accent-strong);
}
.gear-card__meta span { padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); }
.gear-card[hidden] { display: none; }

/* ============ 列表页 · 说明 ============ */
.list-description {
  max-width: 900px;
  padding: 26px 30px 30px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.list-description h2 { font-size: 26px; letter-spacing: -0.02em; }
.list-description p { max-width: 44em; margin-top: 14px; color: #33495f; font-size: 16px; line-height: 1.95; }
.list-description p:first-of-type { margin-top: 16px; }

/* ============ 列表页 · 相关分类 ============ */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
}
.related-card:hover { color: var(--accent); }
.related-card strong { display: block; font-size: 16px; }
.related-card span { color: var(--muted); font-size: var(--fs-xs); }
.related-card::after { content: "→"; color: var(--accent); font-size: 18px; }

/* ============ 详情页 ============ */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 244px;
  gap: 34px;
  align-items: start;
  padding-top: 4px;
}
.article-head { padding-top: 22px; }
.article-head__title { margin-top: 12px; font-size: 42px; letter-spacing: -0.025em; }
.article-head__lead { margin-top: 12px; max-width: 44em; color: #35506a; font-size: 18px; line-height: 1.8; }
.article-head__meta { margin-top: 16px; }
.article-head__meta .meta-tag span { color: var(--muted); font-weight: 500; }

.article-toc {
  grid-column: 2;
  grid-row: 1;
  margin-top: 22px;
  position: sticky;
  top: 96px;
  padding: 18px 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.article-toc__title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.article-toc__title::before { content: ""; width: 3px; height: 16px; background: var(--accent); border-radius: 2px; }
.article-toc ol { margin-top: 10px; display: grid; gap: 2px; counter-reset: toc; }
.article-toc li { counter-increment: toc; }
.article-toc a {
  display: block;
  padding: 6px 8px 6px 26px;
  position: relative;
  border-radius: 6px;
  color: #43596e;
  font-size: 13.5px;
  line-height: 1.5;
}
.article-toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 6px;
  color: #9db2c6;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.article-toc a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.article-toc a.is-active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.article-toc a.is-active::before { color: var(--accent); }

.article-body {
  grid-column: 1;
  grid-row: 1;
  padding: 26px 34px 34px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  margin-top: 22px;
}
.article-body section { scroll-margin-top: 96px; }
.article-body section + section { margin-top: 30px; }
.article-body h2 {
  font-size: 25px;
  letter-spacing: -0.02em;
  scroll-margin-top: 96px;
}
.article-body h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--accent-soft);
}
.article-body p { max-width: 42em; margin-top: 14px; color: #2f4557; font-size: 16.5px; line-height: 1.95; }
.article-body figure { margin: 22px 0 0; }
.article-body figure img { width: 100%; border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; }
.article-body figcaption { margin-top: 8px; color: var(--muted); font-size: var(--fs-xs); }

.related-articles { margin-top: 26px; }
.related-articles__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-articles .related-card { min-height: 74px; }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .order-grid { grid-template-columns: 1fr; gap: 14px; }
  .order-arrow { padding: 0; margin: -4px 0; text-align: left; transform: rotate(90deg); width: 20px; font-size: 18px; }
  .mistake-grid, .faq-grid { grid-template-columns: repeat(2, 1fr); }
  .gear-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; gap: 18px; }
  .article-toc { position: static; grid-column: 1; grid-row: auto; margin-top: 0; }
  .article-body { grid-column: 1; grid-row: auto; margin-top: 0; }
  .related-grid, .related-articles__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .hero { min-height: 0; }
  .hero__media::after {
    background: linear-gradient(168deg, rgba(228, 242, 255, 0.93) 0%, rgba(212, 234, 255, 0.84) 45%, rgba(193, 223, 251, 0.6) 100%);
  }
  .hero__inner { padding: 34px 0 30px; }
  .cta-band { padding: 38px 0; }
  .cta-band__title { font-size: 30px; }
  .cta-band__lead { font-size: 16px; }
  .related-grid, .related-articles__grid { grid-template-columns: 1fr; }
  .article-body { padding: 20px 18px 26px; }
  .list-description { padding: 20px 18px 24px; }
}

@media (max-width: 560px) {
  .hero__actions { gap: 14px; }
  .btn { padding: 11px 20px; font-size: 15px; }
  .hero__meta { font-size: 12.5px; }
  .mistake-grid, .faq-grid, .gear-grid { grid-template-columns: 1fr; }
  .order-step__title { font-size: 16px; }
  .page-hero__title { font-size: 30px; }
  .article-head__title { font-size: 28px; }
  .article-body h2 { font-size: 21px; }
  .article-body p { font-size: 16px; }
  .toolbar__sort { margin-left: 0; }
  .list-toolbar { padding: 12px 14px; }
  .hero__meta { flex-direction: column; align-items: flex-start; gap: 2px; }
  .hero__meta > * + *::before { content: ""; margin: 0; }
  /* 参数表在窄屏改为堆叠行，避免横向滚动把第三列切掉 */
  .spec-table { min-width: 0; font-size: 14.5px; }
  .spec-table thead { display: none; }
  .spec-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    padding: 11px 14px;
  }
  .spec-table tbody th, .spec-table tbody td { padding: 0; border: 0; width: auto; }
  .spec-table tbody th { grid-column: 1; grid-row: 1; }
  .spec-table tbody td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--muted); font-size: 13.5px; }
  .spec-table tbody td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
}
