/**
 * HormLab Portal · 产品中心页样式
 */

/* ============ 页头（复用 main.css .page-hero 深色底，仅补标题/副标题样式） ============ */
.page-hero-h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; line-height: 1.2; margin: 18px 0 16px; letter-spacing: -1px; color: #fff; }
.page-hero-lead { color: var(--text-white-soft); font-size: 17px; line-height: 1.7; margin: 0 auto; max-width: 640px; }
.page-hero-h1 .accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 快捷锚点 */
.pkg-quicknav { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.pkg-quicknav-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  color: var(--text-dark); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: all .25s ease;
}
.pkg-quicknav-item:hover {
  border-color: var(--line-color, var(--primary-blue));
  color: var(--line-color, var(--primary-blue));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.pkg-quicknav-item .qn-icon {
  display: inline-flex; width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  align-items: center; justify-content: center;
  background: var(--qn-bg, rgba(91,108,255,.12));
  color: var(--line-color, var(--primary-blue));
}
.pkg-quicknav-item .qn-icon svg { width: 14px; height: 14px; display: block; }
.pkg-quicknav-item .qn-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============ 产品线区块 ============ */
.pkg-line-section { padding: 48px 0; }
.pkg-line-section + .pkg-line-section { border-top: 1px dashed var(--border-light); }
.pkg-line-header {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 32px;
  padding: 22px 26px;
  background: linear-gradient(135deg, rgba(91,108,255,0.04) 0%, rgba(0,229,199,0.04) 100%);
  border: 1px solid var(--border-light);
  border-radius: 16px;
}
.pkg-line-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(91,108,255,0.18);
}
.pkg-line-icon svg { width: 26px; height: 26px; display: block; }
.pkg-line-icon img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.pkg-line-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; line-height: 1.3; }
.pkg-line-desc { color: var(--text-mid); font-size: 14px; line-height: 1.6; margin: 0; }
.pkg-planned-badge {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: rgba(91,108,255,.12); color: var(--primary-blue); vertical-align: middle; margin-left: 6px;
}

/* 套餐卡片 */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.pkg-card {
  position: relative;
  background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--r-lg);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.pkg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.1);
  border-color: var(--line-color, var(--primary-blue));
}
.pkg-card.pkg-hot { border-color: var(--line-color); box-shadow: 0 8px 28px rgba(139,92,246,.12); }
.pkg-hot-badge {
  position: absolute; top: -11px; right: 16px;
  background: linear-gradient(135deg, var(--primary-blue), #E8B86D);
  color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(91,108,255,.35);
}
.pkg-card-head { display: flex; align-items: center; gap: 12px; }
.pkg-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  overflow: hidden;
}
.pkg-icon img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.pkg-name { font-size: 18px; font-weight: 700; }
.pkg-sub { font-size: 13px; color: var(--text-mid); margin-top: 2px; }
.pkg-price { display: flex; align-items: baseline; gap: 8px; }
.pkg-price-num { font-size: 30px; font-weight: 800; color: var(--line-color, var(--primary-blue)); font-variant-numeric: tabular-nums; }
.pkg-price-meta { font-size: 12px; color: var(--text-light); }
.pkg-indicators { font-size: 13px; color: var(--text-mid); }
.pkg-ind-num { font-size: 18px; font-weight: 700; color: var(--text-dark); }
.pkg-hormones { display: flex; flex-wrap: wrap; gap: 6px; }
.pkg-hormone {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(0,0,0,.045); font-weight: 500;
}
.pkg-desc { font-size: 13.5px; color: var(--text-mid); line-height: 1.65; margin: 0; flex: 1; }
.pkg-card-actions { display: flex; gap: 10px; }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }

/* ============ 怎么选 ============ */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.guide-card {
  background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--r-lg);
  padding: 24px; transition: transform .25s ease, box-shadow .25s ease;
}
.guide-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.08); }
.guide-icon { margin-bottom: 12px; }
.guide-icon img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-md); display: block; }
.guide-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.guide-desc { font-size: 13.5px; color: var(--text-mid); line-height: 1.7; margin-bottom: 14px; }
.guide-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-tags span {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: rgba(91,108,255,.1); color: var(--primary-blue);
}

/* ============ 对比表 ============ */
.compare-wrap {
  overflow-x: auto; border-radius: var(--r-lg);
  border: 1px solid var(--border-light); background: var(--bg-card);
  -webkit-overflow-scrolling: touch;
}
.compare-table { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14px; }
.compare-table th, .compare-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border-light); }
.compare-table thead th {
  background: transparent; font-size: 13px; font-weight: 600;
  color: var(--text-mid); white-space: nowrap; position: sticky; top: 0;
}
.compare-table tbody tr { transition: background .15s ease; }
.compare-table tbody tr:hover { background: rgba(91,108,255,.04); }
.compare-table tbody tr:last-child td { border-bottom: none; }
.cmp-name { font-weight: 600; white-space: nowrap; }
.cmp-star { color: var(--primary-blue); margin-right: 4px; }
.cmp-line { font-weight: 500; white-space: nowrap; }
.cmp-line svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 5px; }
.cmp-line img { width: 20px; height: 20px; object-fit: cover; border-radius: 5px; vertical-align: -4px; margin-right: 4px; }
.cmp-hormones { color: var(--text-mid); font-size: 13px; }
.cmp-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp-price { font-weight: 700; color: var(--primary-blue); }
.cmp-fit { color: var(--text-mid); font-size: 13px; }

/* ============ 全部包含 ============ */
.include-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.include-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-lg); padding: 26px;
  transition: transform .25s ease, border-color .25s ease;
}
.include-card:hover { transform: translateY(-3px); border-color: rgba(91,108,255,.4); }
.include-icon { margin-bottom: 12px; }
.include-icon img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-md); display: block; }
.include-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: #fff; }
.include-desc { font-size: 13.5px; color: rgba(255,255,255,.65); line-height: 1.7; }

.section-dark .section-eyebrow { color: var(--primary-blue); }
.section-dark .section-h2 { color: #fff; }

/* ============ FAQ ============ */
.container-narrow { max-width: 780px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--r-md);
  overflow: hidden; transition: border-color .2s ease;
}
.faq-item:hover { border-color: rgba(91,108,255,.4); }
.faq-item summary {
  padding: 16px 20px; font-size: 15px; font-weight: 600; cursor: pointer;
  list-style: none; position: relative; padding-right: 44px; user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 20px; font-weight: 300; color: var(--primary-blue); transition: transform .25s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { padding: 0 20px 18px; font-size: 14px; color: var(--text-mid); line-height: 1.75; margin: 0; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .pkg-line-header { flex-direction: column; gap: 10px; }
  .pkg-grid { grid-template-columns: 1fr; }
  .pkg-quicknav { gap: 8px; }
  .pkg-quicknav-item { padding: 8px 14px; font-size: 13px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pkg-card, .guide-card, .include-card, .pkg-quicknav-item { transition: none; }
}

/* ============================================================
   移动端收口（2026-09-16）—— 一律追加在文件末尾
   修复点：① 12 款套餐对比表 min-width:760px、共 6 列，手机上只能横向
             拖动，产品名滑走后就不知道在看哪一行 → 560px 以下改为卡片式
             （每套餐一张卡，字段名由 products.js 写入的 data-label 提供）；
           ② 锚点胶囊、FAQ 折叠标题点击目标偏小。
   ============================================================ */
@media (max-width: 768px) {
  .page-hero-lead { font-size: 15px; }
  .pkg-quicknav { justify-content: flex-start; }
  .pkg-quicknav-item { padding: 9px 15px; font-size: 13px; min-height: 40px; }
  .pkg-line-header { padding: 18px; border-radius: 14px; }
  .pkg-line-icon { width: 46px; height: 46px; }
  .pkg-line-title { font-size: 19px; }
  .pkg-card { padding: 20px 18px; }
  .pkg-price-num { font-size: 27px; }
  .pkg-card-actions > * { flex: 1; justify-content: center; }
  .guide-card, .include-card { padding: 22px 18px; }
  /* 对比表在 769–960px 仍保留表格形态，但首列粘住，横向滑动时产品名始终可见 */
  .compare-table { min-width: 700px; font-size: 13px; }
  .compare-table th, .compare-table td { padding: 12px 13px; }
  .compare-table th:first-child, .compare-table td:first-child {
    position: sticky; left: 0; z-index: 2;
    background: var(--bg-card);
    box-shadow: 1px 0 0 var(--border-light);
  }
  .compare-table thead th:first-child { z-index: 3; }
  .cmp-line img { width: 18px; height: 18px; }
  .faq-item summary { padding: 15px 42px 15px 16px; font-size: 14.5px; }
  .faq-item summary::after { right: 16px; }
  .faq-item p { padding: 0 16px 16px; font-size: 14.5px; line-height: 1.85; }
}

/* 小屏：对比表卡片化（表头隐藏，每个套餐一张卡） */
@media (max-width: 560px) {
  .compare-wrap { overflow: visible; border: none; background: transparent; border-radius: 0; }
  .compare-table { display: block; min-width: 0; width: 100%; font-size: 13.5px; }
  .compare-table thead { display: none; }
  .compare-table tbody, .compare-table tr { display: block; }
  .compare-table tbody tr {
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: 14px; margin-bottom: 12px; overflow: hidden;
  }
  .compare-table tbody tr:last-child { margin-bottom: 0; }
  .compare-table tbody tr:hover { background: var(--bg-card); }
  /* 先按基础规则把「最后一行 td 无下边框」还原成有边框，
     再由下面的 td:last-child 去掉每张卡内部的最后一条分隔线 */
  .compare-table tbody tr:last-child td { border-bottom: 1px solid var(--border-light); }
  .compare-table td {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 10px 16px; border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
  .compare-table tbody tr td:last-child { border-bottom: none; }
  .compare-table td::before {
    content: attr(data-label); flex: 0 0 62px;
    font-size: 11.5px; font-weight: 700; color: var(--text-light);
    letter-spacing: 0.3px; line-height: 1.75;
  }  .compare-table td.cmp-name {
    background: linear-gradient(135deg, rgba(91,108,255,0.10), rgba(0,229,199,0.10));
    padding: 14px 16px; font-size: 16px; font-weight: 700; color: var(--text-dark);
  }
  .compare-table td.cmp-name::before { display: none; }
  .cmp-name, .cmp-line { white-space: normal; }
  /* 长文本字段（激素组合 / 适合人群）改「标签在上、内容在下」，避免右侧被挤成窄柱 */
  .compare-table td.cmp-hormones, .compare-table td.cmp-fit { display: block; }
  .compare-table td.cmp-hormones::before, .compare-table td.cmp-fit::before {
    display: block; flex: none; margin-bottom: 3px;
  }
  .cmp-hormones, .cmp-fit { font-size: 12.5px; }
}

/* ============================================================
   移动端收口（2026-09-16 · 二轮）
   ============================================================ */
@media (max-width: 768px) {
  /* 套餐卡元信息（检测激素 / 单价说明）：12px 在 375px 屏上偏小 */
  .pkg-hormone, .pkg-price-meta { font-size: 12.5px; }
  .pkg-hot-badge, .pkg-planned-badge { font-size: 12.5px; }
  .guide-tags span { font-size: 12.5px; }
}

@media (max-width: 560px) {
  /* 卡片化后的字段名原为 11.5px，是全页最小的文字，抬到 12.5px 对齐基线；
     同时收紧单元格内边距 —— 12 张卡合计省下约 120px 的无效高度 */
  .compare-table td::before { font-size: 12.5px; }
  .compare-table td { padding: 9px 15px; }
  .compare-table td.cmp-name { padding: 13px 15px; }
  .cmp-hormones, .cmp-fit { line-height: 1.6; }
}
