/* 小乐妮「资质与证据」详情页样式
   用于 /products/lactase/credentials/*\/ 这些说明页。
   配色沿用乳糖酶产品页的变量，保证从产品页点进来视觉不断层。
   只做一件事：把一篇有来历的材料读清楚 —— 所以整页只有文字、表格、原件图三种元素。 */

:root {
  --blue: #079ee7;
  --blue-deep: #0877ba;
  --navy: #254b68;
  --muted: #67869a;
  --sky: #e9f8ff;
  --cream: #fffaf1;
  --gold: #f6b734;
  --mint: #e9f8f2;
  --line: #dceaf4;
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--navy);
  background: #f5fbff;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.85;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.doc-main { padding: 40px 20px 72px; }
.doc-wrap { width: min(880px, 100%); margin: 0 auto; }

.doc-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  color: #8ba6b8;
  font-size: 12.5px;
  line-height: 1.6;
}
.doc-crumb a { color: #6f8fa4; }
.doc-crumb a:hover { color: var(--blue-deep); }
.doc-crumb span { color: #b7c9d6; }
.doc-crumb b { color: var(--navy); font-weight: 700; }

.doc-head { margin-bottom: 26px; }
.doc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--blue-deep);
  background: var(--sky);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .04em;
}
.doc-kicker::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.doc-head h1 {
  margin: 0 0 16px;
  font-size: clamp(25px, 3.4vw, 33px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -.02em;
  color: #173f5d;
  text-wrap: balance;
}

.doc-lead {
  margin: 0;
  padding: 18px 21px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 4px 14px 14px 4px;
  background: var(--white);
  color: #38607c;
  font-size: 15px;
  line-height: 1.9;
}
.doc-lead strong { color: var(--blue-deep); }

/* 关键字段速览 */
.doc-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 6px;
  padding: 0;
}
.doc-fields > div {
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.doc-fields dt {
  margin-bottom: 3px;
  color: #90aabb;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .03em;
}
.doc-fields dd {
  margin: 0;
  color: #24506d;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.65;
  word-break: break-word;
}

/* 正文 */
.doc-body { margin-top: 30px; }
.doc-body h2 {
  margin: 38px 0 14px;
  padding-left: 13px;
  border-left: 4px solid var(--blue);
  color: #1b4a68;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: -.01em;
}
.doc-body > h2:first-child { margin-top: 0; }
.doc-body p {
  margin: 0 0 15px;
  color: #3d637d;
  font-size: 15px;
  line-height: 2.05;
}
.doc-body strong { color: #1b4a68; }
.doc-body ul {
  margin: 0 0 18px;
  padding-left: 0;
  list-style: none;
}
.doc-body ul li {
  position: relative;
  margin-bottom: 9px;
  padding-left: 18px;
  color: #3d637d;
  font-size: 15px;
  line-height: 1.95;
}
.doc-body ul li::before {
  content: "";
  position: absolute;
  top: 11px; left: 4px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--blue);
}

.doc-table-wrap {
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  overflow: hidden;
}
.doc-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.doc-table-wrap th {
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  background: #f2f9fe;
  color: #2a5d7d;
  font-weight: 800;
  text-align: left;
  line-height: 1.6;
}
.doc-table-wrap td {
  padding: 11px 15px;
  border-bottom: 1px solid #edf4f9;
  color: #41677f;
  line-height: 1.75;
  vertical-align: top;
}
.doc-table-wrap tr:last-child td { border-bottom: 0; }
.doc-table-wrap td:first-child {
  color: #24506d;
  font-weight: 700;
  white-space: nowrap;
}
.doc-table-cap {
  padding: 9px 15px;
  border-bottom: 1px solid var(--line);
  background: #fafdff;
  color: #90aabb;
  font-size: 12px;
  font-weight: 700;
}

/* 原件图：单张全宽，多张横排（省篇幅） */
.doc-figs {
  display: grid;
  gap: 14px;
  margin: 0 0 22px;
}
.doc-figs.n1 { grid-template-columns: minmax(0, 1fr); }
.doc-figs.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc-figs.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.doc-figs.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc-figs.n5, .doc-figs.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.doc-figs.n7, .doc-figs.n8, .doc-figs.n9 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.doc-fig {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}
.doc-fig-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #f7fbfe;
  font: inherit;
  line-height: 0;
  cursor: zoom-in;
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease;
}
.doc-fig-btn:hover { box-shadow: 0 6px 22px rgba(37, 75, 104, .14); transform: translateY(-2px); }
.doc-fig-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.doc-fig img {
  display: block;
  width: 100%;
  height: auto;
  background: #f7fbfe;
}
/* 多张并排时统一高宽比（素材均为 1060x1500，零裁切） */
.doc-figs:not(.n1) .doc-fig img {
  aspect-ratio: 1060 / 1500;
  object-fit: cover;
  object-position: top center;
}
.doc-fig figcaption {
  margin-top: 11px;
  color: #8ba6b8;
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}
.doc-figs:not(.n1) .doc-fig figcaption {
  margin-top: 9px;
  font-size: 11.8px;
  line-height: 1.6;
  padding: 0 2px;
}
.doc-fig--narrow { max-width: 520px; margin-left: auto; margin-right: auto; }

/* 点击放大 */
.doc-lightbox {
  width: auto;
  max-width: min(94vw, 880px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.doc-lightbox::backdrop {
  background: rgba(11, 30, 45, .84);
  backdrop-filter: blur(4px);
}
.doc-lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.doc-lightbox img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(94vh - 84px);
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .45);
}
.doc-lightbox figcaption {
  margin: 0;
  color: #d3e6f3;
  font-size: 13px;
  line-height: 1.75;
  text-align: center;
}
.doc-lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.doc-lightbox-bar a {
  color: #8fd0f2;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.doc-lightbox-bar button {
  padding: 6px 20px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.doc-lightbox-bar button:hover { background: rgba(255, 255, 255, .12); }

/* 核验栏 */
.doc-verify {
  margin: 34px 0 0;
  padding: 19px 21px;
  border: 1px solid #cfe9d8;
  border-radius: 14px;
  background: var(--mint);
}
.doc-verify h2 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  color: #2f6b46;
  font-size: 15px;
  font-weight: 900;
}
.doc-verify h2::before { content: "✓ "; color: #4a9b6a; }
.doc-verify p {
  margin: 0;
  color: #3f6a52;
  font-size: 14px;
  line-height: 1.9;
}

/* 相关 / 返回 */
.doc-foot {
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-deep);
  font-size: 13.5px;
  font-weight: 800;
}
.doc-back:hover { border-color: var(--blue); background: var(--sky); }
.doc-rel-label {
  margin: 0 0 11px;
  color: #90aabb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}
.doc-rel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.doc-rel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: #2a5d7d;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.6;
  transition: border-color .18s, background .18s, transform .18s;
}
.doc-rel a:hover {
  border-color: var(--blue);
  background: #f6fcff;
  transform: translateY(-1px);
}
.doc-rel a::after { content: "→"; color: var(--blue); font-weight: 900; }

@media (max-width: 720px) {
  .doc-main { padding: 26px 16px 56px; }
  .doc-head h1 { font-size: 23px; }
  .doc-lead { padding: 15px 17px; font-size: 14px; line-height: 1.85; }
  .doc-fields { grid-template-columns: 1fr; gap: 8px; }
  .doc-body h2 { margin-top: 30px; font-size: 18px; }
  .doc-body p { font-size: 14.5px; line-height: 1.95; }
  .doc-table-wrap { overflow-x: auto; }
  .doc-table-wrap table { min-width: 0; }
  .doc-table-wrap table.col3, .doc-table-wrap table.col4 { min-width: 460px; }
  .doc-table-wrap th, .doc-table-wrap td { padding: 9px 11px; font-size: 12.5px; }
  .doc-table-wrap td:first-child { width: 1%; white-space: nowrap; }
  .doc-table-wrap th:first-child { width: 1%; white-space: nowrap; }
  .doc-rel { grid-template-columns: 1fr; }
  .doc-fig { padding: 9px; border-radius: 13px; }
  .doc-figs { gap: 10px; }
  .doc-figs.n3, .doc-figs.n4, .doc-figs.n5, .doc-figs.n6,
  .doc-figs.n7, .doc-figs.n8, .doc-figs.n9 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-fig figcaption, .doc-figs:not(.n1) .doc-fig figcaption { font-size: 11px; margin-top: 7px; }
  .doc-lightbox { max-width: 96vw; }
  .doc-lightbox img { max-height: calc(92vh - 96px); }
}
