/* 肽原料站 · 产品目录 / 产品详情模块（作用域 #peptide-catalog）
 *
 * 本文件（手写）负责三件事：
 *   1. 定义 02 号设计令牌（颜色 / 字体 / 字号 / 间距）
 *   2. 重置容器内的基础元素，使其不受 01 号主题全局规则影响
 *   3. 与 01 号主题的整合修复（.shell 居中、全宽突破、表格与列表等）
 *
 * 模块自身样式见 css/peptide-catalog.css（由 tools/extract-catalog-css.py 生成）。
 * 加载顺序：peptide-catalog.css → 本文件（本文件负责覆盖主题冲突，故在后）。
 */

/* ---------------------------------------------------------------- 1. 令牌 */
#peptide-catalog {
  --main: #64d9b9;
  --second: #64d9b9;
  --gray: #ebf3f5;
  --black: #1d2939;
  --white: #ffffff;
  --red: #f5392b;
  --yellow: #f8bc26;
  --green: #b0b865;
  --gray-border: #e9e9e9;
  --black-dark: #1f242c;
  --font-main: "Mulish";
  --font-headers: "Prompt";
  --font-subheaders: "Prompt";
  --font-main-letterspacing: 0;
  --font-headers-letterspacing: 0;
  --font-subheaders-letterspacing: 0;
  --ink: var(--black);
  --body: #1d2939b8;
  --mint: var(--main);
  --mint-deep: var(--main);
  --pale: var(--gray);
  --line: var(--gray-border);
  --dark: var(--black-dark);
  --shell: 1320px;
  --shell-wide: 1344px;
  --shadow: 0 12px 40px rgba(29, 41, 57, .10);
  --font-display: var(--font-headers), "Noto Sans Display", "Inter Display", "Inter", sans-serif;
  --font-body: var(--font-main), "Lato", "Noto Sans", "Inter", sans-serif;
  --type-body: 16px;
  --type-small: 14px;
  --type-nav: 14px;
  --type-button: 14px;
  --type-eyebrow: 12px;
  --type-h1: 100px;
  --type-h2: 49px;
  --type-h3: 22px;
  --type-card-title: 17px;
  --type-lead: 17px;
  --type-card-body: 14px;
  --leading-body: 1.7;
  --leading-heading: 1.08;

  /* 全宽突破：01 号主题把内容放在受限宽度的 .hero 容器里 */
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  overflow-x: clip;
  position: relative;
  z-index: 1;
  background: var(--white);
  font-family: var(--font-body) !important;
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--ink) !important;
  text-align: left !important;
  letter-spacing: var(--font-main-letterspacing) !important;
  text-transform: none !important;
}

/* ------------------------------------------------- 2. 基础元素（容器内重置） */
#peptide-catalog,
#peptide-catalog *,
#peptide-catalog *::before,
#peptide-catalog *::after {
  box-sizing: border-box !important;
}

#peptide-catalog h1,
#peptide-catalog h2,
#peptide-catalog h3,
#peptide-catalog h4,
#peptide-catalog h5,
#peptide-catalog h6 {
  font-family: var(--font-display) !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
  letter-spacing: var(--font-headers-letterspacing) !important;
  text-transform: none !important;
  margin-top: 0 !important;
  text-shadow: none !important;
}

#peptide-catalog h1 { font-size: clamp(34px, 4.2vw, 58px) !important; line-height: 1.06 !important; }
#peptide-catalog h2 { font-size: clamp(28px, 3.2vw, 46px) !important; line-height: 1.08 !important; }
#peptide-catalog h3 { font-size: 22px !important; line-height: 1.3 !important; }

#peptide-catalog p {
  font-family: var(--font-body) !important;
  font-size: 16px !important;
  line-height: var(--leading-body) !important;
  letter-spacing: 0 !important;
  color: var(--body) !important;
  text-transform: none !important;
}

#peptide-catalog a,
#peptide-catalog a:hover,
#peptide-catalog a:focus {
  color: inherit !important;
  text-decoration: none !important;
  background: none !important;
  box-shadow: none !important;
}

#peptide-catalog strong,
#peptide-catalog b { font-weight: 600 !important; }
#peptide-catalog small { font-size: 13px !important; }

#peptide-catalog ul,
#peptide-catalog ol,
#peptide-catalog li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* 政策类正文里需要恢复项目符号（见 css/peptide-pages.css 覆盖） */

#peptide-catalog img {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
}

#peptide-catalog .svg-icon {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  flex-shrink: 0 !important;
  width: 1em !important;
  height: 1em !important;
}

#peptide-catalog .svg-sprite {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

#peptide-catalog button,
#peptide-catalog input,
#peptide-catalog select,
#peptide-catalog textarea {
  font-family: var(--font-body) !important;
  font-size: inherit !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  max-width: 100% !important;
}

#peptide-catalog button {
  background: none !important;
  border: 0 !important;
  cursor: pointer !important;
  color: inherit !important;
}

#peptide-catalog :focus-visible {
  outline: 3px solid #24947c !important;
  outline-offset: 3px !important;
}

/* ------------------------------------------------- 3. 与 01 号主题的整合修复 */
/* 主题给所有元素加了过渡/动画，模块内统一关闭位移动画，仅保留 02 的透明度过渡 */
#peptide-catalog .reveal,
#peptide-catalog .reveal:not(.reveal-pending) {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

#peptide-catalog .shell,
#peptide-catalog .wide-shell { margin-inline: auto !important; }

/* 主题的首屏/容器规则会给标题加内边距与背景，这里清掉 */
#peptide-catalog .page-hero-copy,
#peptide-catalog .product-summary,
#peptide-catalog .products-main { min-width: 0 !important; }

/* 打开弹窗/抽屉时锁定背景滚动（02 的 body 级规则未随模块抽取） */
body.modal-open { overflow: hidden !important; }
@media (max-width: 1198px) {
  body.product-filter-open { overflow: hidden !important; }
}

/* 主题的表格样式会渗进规格表 */
#peptide-catalog table { border-collapse: collapse !important; }

/* ------------------------------------------------- 4. 模块自带的新增块 */
/* 页头（目录页 / 详情页面包屑区）：轻量标题区，不使用 02 号整幅 page-hero */
#peptide-catalog .catalog-intro { padding: 48px 0 0 !important; }
#peptide-catalog .catalog-intro h1 { margin: 0 0 18px !important; }
#peptide-catalog .catalog-breadcrumb {
  font-size: 14px !important;
  color: var(--body) !important;
  margin: 0 0 22px !important;
}
#peptide-catalog .catalog-breadcrumb a { color: var(--ink) !important; }
#peptide-catalog .catalog-breadcrumb span[aria-hidden] { margin: 0 6px !important; opacity: .5 !important; }
#peptide-catalog .catalog-lead {
  max-width: 880px !important;
  font-size: var(--type-lead) !important;
  margin-bottom: 0 !important;
}

/* 详情页主标题（语义 h1；02 原件用 h2，样式沿用其 58/49/41 三档） */
#peptide-catalog .product-summary h1 {
  font-size: clamp(41px, 4.4vw, 58px) !important;
  line-height: 1 !important;
  margin: 0 0 24px !important;
}

/* FAQ 手风琴：02 用 hidden 属性控制展开，这里补上兜底样式 */
#peptide-catalog .faq-answer[hidden] { display: none !important; }
#peptide-catalog .faq-item.open .faq-question { color: var(--ink) !important; }

/* 政策页锚点跳转时避免被 01 号主题的固定页头遮住 */
#peptide-catalog .policy-content section { scroll-margin-top: 130px !important; }
#peptide-catalog .policy-sidebar nav a { scroll-margin-top: 130px !important; }

/* 侧栏里的定制合成引导块 */
#peptide-catalog .shop-widget-note p {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: var(--body) !important;
  margin: 0 0 16px !important;
}
#peptide-catalog .shop-widget-note .btn { width: 100% !important; }

@media (max-width: 767px) {
  #peptide-catalog .catalog-intro { padding: 32px 0 0 !important; }
}

@media print {
  #peptide-catalog .product-filter-toggle,
  #peptide-catalog .inquiry-modal { display: none !important; }
}

/* 分类页：该分类下暂无产品时的提示块 */
#peptide-catalog .category-empty {
  padding: 64px 40px !important;
  border-radius: 20px !important;
  background: var(--pale) !important;
  text-align: center !important;
}
#peptide-catalog .category-empty h2 {
  margin: 0 0 14px !important;
  font-size: clamp(22px, 2.2vw, 30px) !important;
  line-height: 1.25 !important;
}
#peptide-catalog .category-empty p {
  max-width: 620px !important;
  margin: 0 auto 26px !important;
}
@media (max-width: 767px) {
  #peptide-catalog .category-empty { padding: 40px 22px !important; border-radius: 16px !important; }
}
/* Inquiry catalog: render accurate live text on the approved blank-card photo. */
#peptide-catalog .powder-label-photo {
  position: relative !important;
  container-type: inline-size;
}
#peptide-catalog .powder-label-photo::after {
  content: attr(data-powder-name);
  position: absolute;
  z-index: 3;
  left: 66.3%;
  top: 45%;
  width: 29.5%;
  height: 16%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #20262b;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(5px, 4.2cqw, 26px);
  font-weight: 600;
  line-height: 1.04;
  text-align: center;
  overflow-wrap: break-word;
  text-wrap: balance;
  transform: rotate(4deg);
  pointer-events: none;
}
#peptide-catalog .powder-label-photo.is-long::after {
  font-size: clamp(5px, 3.2cqw, 21px);
}

/* Keep the policy link readable inside the dark research-use notice. */
#peptide-catalog .research-use-panel a.text-link,
#peptide-catalog .research-use-panel a.text-link:visited {
  color: #64d9b9 !important;
  margin-top: 12px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
}
#peptide-catalog .research-use-panel a.text-link:hover,
#peptide-catalog .research-use-panel a.text-link:focus-visible {
  color: #ffffff !important;
}
#peptide-catalog .research-use-panel a.text-link .svg-icon {
  color: currentColor !important;
}
#peptide-catalog .research-use-panel a.text-link:focus-visible {
  outline: 2px solid #64d9b9 !important;
  outline-offset: 5px;
}
