/* ===========================================================================
   货运船只综合网 · 公共组件（首页 / 分类页 / 详情页共用）
   =========================================================================== */

/* ------------------------------------------------------------------ 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  font-size: 16px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  border-radius: var(--r-1);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.btn-solid { background: var(--accent); color: var(--ink-invert); }
.btn-solid:hover { background: var(--accent-strong); }
.btn-ghost { background: rgba(255, 255, 255, .78); color: var(--ink-strong); border-color: rgba(11, 37, 69, .28); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-strong); }
.btn-outline { background: transparent; color: var(--ink-strong); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* -------------------------------------------------------------- 面包屑 */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-faint);
}
.crumb a { color: var(--ink-muted); }
.crumb a:hover { color: var(--accent); }
.crumb span[aria-current] { color: var(--ink); }
.crumb > * + * {
  position: relative;
  padding-left: 15px;
}
.crumb > * + *::before {
  content: "/";
  position: absolute;
  left: 4px;
  color: var(--ink-faint);
  opacity: .7;
}

/* -------------------------------------------------------- 内页页头（L0） */
.page-hero {
  padding: 26px 0 34px;
  border-bottom: 1px solid var(--line);
}
.page-hero .crumb { margin-bottom: 22px; }
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: 42px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink-strong);
  letter-spacing: .02em;
}
.page-hero .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-muted);
}
.page-hero .hero-meta b { color: var(--ink-strong); font-weight: 700; }
.page-hero .hero-lead { margin-top: 18px; max-width: 860px; font-size: 16px; line-height: 1.75; color: var(--ink-muted); }

/* ------------------------------------------------------------ 筛选工具条 */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 15px;
  font-size: 14px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"],
.chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--ink-invert); }
.toolbar-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.sort-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-muted);
}
.sort-field select {
  min-height: 40px;
  padding: 0 30px 0 12px;
  font-size: 14px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
}
.result-count { font-size: 13.5px; color: var(--ink-muted); white-space: nowrap; }
.empty-state {
  padding: 54px 0;
  text-align: center;
  font-size: 15px;
  color: var(--ink-muted);
}
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
}
.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  transition: border-color .18s, color .18s, background .18s;
}
.pager-btn:hover { border-color: var(--accent); color: var(--accent); }
.pager-btn--on,
.pager-btn--on:hover { background: var(--ink); border-color: var(--ink); color: var(--ink-invert); }
.pager-btn--step { padding: 0 18px; }
.pager-gap { padding: 0 4px; color: var(--ink-faint); }
.pager-note { margin-top: 12px; font-size: 13px; color: var(--ink-muted); }

/* -------------------------------------------------------- 分类页卡片网格 */
.list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 26px;
  margin-top: 32px;
}
.list-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.list-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 28px rgba(11, 37, 69, .08);
  transform: translateY(-2px);
}
.list-card .card-link { display: flex; flex-direction: column; height: 100%; }
.list-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-band); }
.list-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.list-card .tag {
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--accent);
  text-transform: uppercase;
}
.list-card h2 {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink-strong);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.list-card p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.list-card .spec {
  margin-top: auto;
  padding-top: 14px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}
.list-card[hidden] { display: none; }

/* ------------------------------------------------------- 列表说明（L3） */
.list-description {
  margin-top: 54px;
  padding: 40px 0 8px;
  border-top: 1px solid var(--line);
  max-width: 900px;
}
.list-description h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-strong);
}
.list-description p {
  margin-top: 16px;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-muted);
}

/* ---------------------------------------------------------- 详情页布局 */
.article-wrap {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  padding: 40px 0 20px;
  align-items: start;
}
.article-toc {
  position: sticky;
  top: 92px;
}
.article-toc h2 {
  font-size: 12px;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.article-toc ol { margin-top: 14px; display: grid; gap: 2px; counter-reset: toc; }
.article-toc li { counter-increment: toc; }
.article-toc a {
  display: block;
  padding: 8px 0 8px 26px;
  position: relative;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-muted);
  border-left: 2px solid transparent;
}
.article-toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 8px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 10.5px;
  color: var(--ink-faint);
}
.article-toc a:hover { color: var(--accent); }
.article-toc a.is-active { color: var(--ink-strong); border-left-color: var(--accent); }
.toc-toggle { display: none; cursor: pointer; }
.toc-chevron { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.article-head .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--accent);
  text-transform: uppercase;
}
.article-head h1 {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-size: 40px;
  line-height: 1.22;
  font-weight: 700;
  color: var(--ink-strong);
}
.article-head .lead {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-muted);
  max-width: 760px;
}

.spec-table {
  margin-top: 32px;
  width: 100%;
  max-width: 760px;
  border-collapse: collapse;
  border-top: 1px solid var(--line-strong);
}
.spec-table caption {
  text-align: left;
  padding-bottom: 12px;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.spec-table th,
.spec-table td {
  text-align: left;
  padding: 11px 12px 11px 0;
  font-size: 14.5px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table th { width: 38%; color: var(--ink-muted); font-weight: 400; }
.spec-table td { color: var(--ink-strong); font-weight: 600; }
.spec-table-wrap { overflow-x: auto; }

.article-body { margin-top: 12px; max-width: 760px; }
.article-body section { padding-top: 34px; }
.article-body h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink-strong);
  scroll-margin-top: 96px;
}
.article-body p {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.95;
  color: #24425f;
}

.related {
  margin-top: 56px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.related h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-strong);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}
.related-card {
  display: flex;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.related-card:hover { border-color: var(--line-strong); box-shadow: 0 8px 22px rgba(11, 37, 69, .07); }
.related-card .thumb { flex: 0 0 96px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 3px; }
.related-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-card h3 { font-size: 15.5px; font-weight: 700; color: var(--ink-strong); font-family: var(--font-serif); }
.related-card p { margin-top: 6px; font-size: 12.5px; line-height: 1.6; color: var(--ink-muted); }

@media (max-width: 1180px) {
  .list-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .article-wrap { grid-template-columns: 210px minmax(0, 1fr); gap: 36px; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .page-hero h1 { font-size: 34px; }
  .article-wrap { grid-template-columns: 1fr; gap: 0; padding-top: 28px; }
  .article-toc { position: static; margin-bottom: 26px; }
  .toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
    font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
    color: var(--ink-strong);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-1);
    cursor: pointer;
  }
  .article-toc ol { display: none; margin-top: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-1); }
  .article-toc.is-open ol { display: grid; }
  .article-toc h2 { display: none; }
}

@media (max-width: 600px) {
  .list-grid { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 28px; }
  .article-head h1 { font-size: 30px; }
  .article-body h2 { font-size: 22px; }
  .article-body p { font-size: 15.5px; line-height: 1.9; }
  .toolbar-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .chip-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
  .related-card { flex-direction: column; }
  .related-card .thumb { flex: none; width: 100%; aspect-ratio: 16 / 9; }
}

/* -------------------------------------------------------- 内页容器补充 */
.list-section { padding-bottom: 8px; }
.list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-top: 28px; }
.list-heading .section-title { font-size: var(--fs-16); }
.detail-top { padding-top: 26px; }
.detail-top .crumb { margin-bottom: 24px; }
.inline-figure {
  margin: 26px 0 0;
  max-width: 760px;
}
.inline-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-2);
  background: var(--bg-band);
}
/* 内页里的分流通带：与首页同款，但收在容器内、带上下留白 */
.cta-band.cta-inline {
  margin-top: 56px;
  border-radius: var(--r-2);
  overflow: hidden;
}
.cta-band.cta-inline .cta-inner { padding-left: 48px; padding-right: 48px; }
@media (max-width: 900px) {
  .cta-band.cta-inline .cta-inner { padding-left: 26px; padding-right: 26px; }
}
