/* ==========================================================================
   SOTO CHINA — page-level styles（页面开发负责）
   设计 token / 通用组件见 site.css；本文件只放栏目页、列表页、详情页、
   表单页的补充排版，类名统一 pg- 前缀，避免与 site.css 冲突。
   ========================================================================== */

/* ---------- 页面 hero 变体 ---------- */
.page-hero.pg-hero--short { min-height: clamp(300px, 36vh, 430px); }
.page-hero.pg-hero--short .page-hero__inner { padding-top: clamp(56px, 7vw, 92px); }
.page-hero.pg-hero--tint {
  background:
    radial-gradient(900px 480px at 82% 8%, rgba(31, 123, 255, 0.26), transparent 62%),
    radial-gradient(720px 420px at 8% 96%, rgba(58, 210, 255, 0.12), transparent 60%),
    linear-gradient(158deg, #050b12 0%, #081522 48%, #0c2338 100%);
}
.page-hero__title { overflow-wrap: anywhere; }
.pg-hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.pg-hero__badge {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.76);
  letter-spacing: 0.02em;
}
.pg-hero__badge strong { color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 0; }
.pg-hero__note { margin-top: 16px; font-size: 12.5px; letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.46); }

/* 详情页/搜索页顶部的深色面包屑条 */
.pg-crumbbar { background: var(--ink); color: #fff; padding: 16px 0 17px; }
.pg-crumbbar .breadcrumbs { margin: 0; }

/* ---------- 通用小节补充 ---------- */
.pg-lead { max-width: 780px; color: var(--text-2); font-size: clamp(1rem, 1.15vw, 1.08rem); }
.section--dark .pg-lead,
.section--deep .pg-lead { color: rgba(255, 255, 255, 0.72); }
.pg-note { font-size: 12.5px; color: var(--muted); margin: 0; }
.pg-section-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; }

/* ---------- 工具栏（筛选 / 搜索 / 排序） ---------- */
.pg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 28px;
}
.pg-toolbar__chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.pg-toolbar__right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.pg-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.pg-field { display: inline-flex; align-items: center; gap: 8px; }
.pg-input,
.pg-select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pg-input { min-width: 240px; }
.pg-input::placeholder { color: var(--muted); }
.pg-input:focus,
.pg-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 123, 255, 0.12); }
.pg-select { padding-right: 34px; cursor: pointer; }

/* ---------- 分类入口卡片（产品分类 / 生物分类） ---------- */
.pg-cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.pg-cat-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
  min-width: 0;
}
.pg-cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.pg-cat-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand-2); }
.pg-cat-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.pg-cat-card:hover .pg-cat-card__media img { transform: scale(1.05); }
.pg-cat-card__body { padding: 18px 20px 22px; display: grid; gap: 6px; }
.pg-cat-card__title { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.pg-cat-card__latin {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.pg-cat-card__text { margin: 0; font-size: 13px; color: var(--text-2); }
.pg-cat-card__count { font-size: 12px; font-weight: 600; color: var(--accent); }
.pg-cat-card__cta { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }

/* 物种分类页的品种网格：复用 .species-card，加学名 */
.species-card__latin {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  font-style: italic;
  letter-spacing: 0.02em;
  opacity: 0.72;
  overflow-wrap: anywhere;
}

/* ---------- 团队（无照片兜底） ---------- */
.pg-team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pg-team-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 28px;
  background: var(--paper);
  min-width: 0;
}
.pg-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: linear-gradient(140deg, var(--deep) 12%, var(--accent) 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.pg-team-card__name { margin: 0 0 2px; font-size: 1.12rem; }
.pg-team-card__role {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
.pg-team-card__bio { margin: 0; font-size: 13.5px; color: var(--text-2); }

/* ---------- 资质 / 荣誉（文字卡片兜底） ---------- */
.pg-qual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pg-qual-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  min-width: 0;
}
.pg-qual-card__no {
  flex: none;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding-top: 3px;
}
.pg-qual-card__title { margin: 0 0 6px; font-size: 1.02rem; }
.pg-qual-card__text { margin: 0; font-size: 13.5px; color: var(--text-2); }

/* ---------- 空态 ---------- */
.pg-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--sand);
  padding: clamp(36px, 6vw, 64px) 24px;
  text-align: center;
}
.pg-empty__icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(31, 123, 255, 0.1);
}
.pg-empty__icon svg { width: 26px; height: 26px; }
.pg-empty__title { margin: 0 0 8px; font-size: 1.15rem; }
.pg-empty__text { max-width: 54ch; margin: 0 auto; color: var(--text-2); font-size: 14px; }
.pg-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }

/* ---------- 表单页 ---------- */
.pg-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.pg-form-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: clamp(22px, 3vw, 36px);
  min-width: 0;
}
.pg-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.pg-form-actions .form-status { margin-top: 0; }
.pg-aside { display: grid; gap: 16px; min-width: 0; }
.pg-aside-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sand);
  padding: 24px;
  min-width: 0;
}
.pg-aside-card__title {
  margin: 0 0 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.pg-contact-lines { display: grid; gap: 10px; font-size: 14px; color: var(--text-2); }
.pg-contact-lines strong { display: block; font-size: 11.5px; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.pg-contact-lines a { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.pg-contact-lines a:hover { color: var(--accent); }
.pg-qr { width: 128px; height: 128px; border-radius: 10px; background: #fff; padding: 6px; object-fit: contain; }
.pg-qr-cap { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.pg-form-privacy { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- 详情页 ---------- */
.pg-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(28px, 4.5vw, 68px);
  align-items: start;
}
.pg-detail__media { display: grid; gap: 12px; min-width: 0; }
.pg-detail__hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--sand-2);
}
.pg-detail__hero img { width: 100%; height: 100%; object-fit: cover; }
.pg-detail__hero[data-lightbox-src] { cursor: zoom-in; }
.pg-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.pg-thumb {
  width: 92px;
  height: 70px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
  background: var(--sand-2);
  transition: border-color 0.2s, transform 0.2s;
}
.pg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-thumb:hover { transform: translateY(-2px); }
.pg-thumb.is-active { border-color: var(--accent); }
.pg-detail__body { min-width: 0; }
.pg-detail__title { margin: 0 0 6px; font-size: clamp(1.8rem, 3.2vw, 2.7rem); overflow-wrap: anywhere; }
.pg-detail__latin { margin: 0 0 18px; font-size: 14px; font-style: italic; color: var(--muted); overflow-wrap: anywhere; }
.pg-detail__summary { color: var(--text-2); font-size: 15.5px; }
.pg-price {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 2px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.3vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.pg-price small { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--muted); }
.pg-detail__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.pg-meta { display: grid; margin: 26px 0 0; border-top: 1px solid var(--line); }
.pg-meta__row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.pg-meta__k { color: var(--muted); font-weight: 600; }
.pg-meta__v { color: var(--text-2); overflow-wrap: anywhere; }
.pg-meta__v a { color: var(--accent); font-weight: 600; }
.pg-detail__section { margin-top: clamp(36px, 5vw, 64px); }
.pg-detail__section-title { font-size: clamp(1.25rem, 2vw, 1.6rem); margin: 0 0 20px; }
.pg-prose { max-width: 920px; color: var(--text-2); }
.pg-prose p { color: var(--text-2); }
.pg-prose ul,
.pg-prose ol { padding-left: 1.25em; margin: 0 0 1em; display: grid; gap: 6px; }
.pg-prose li { color: var(--text-2); }
.pg-specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.pg-specs th,
.pg-specs td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.pg-specs th { width: 34%; color: var(--muted); font-weight: 600; background: rgba(243, 240, 234, 0.5); }
.pg-related-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.pg-related-head .section-title { margin: 0; }
.pg-media-placeholder {
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--sand);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 20px;
}

/* ---------- 搜索页 ---------- */
.pg-searchbar { display: flex; gap: 10px; max-width: 760px; }
.pg-searchbar .pg-input { flex: 1; min-width: 0; min-height: 54px; font-size: 16px; }
.pg-searchbar .btn { flex: none; min-height: 54px; }
.pg-search-summary { margin: 20px 0 0; color: var(--text-2); }
.pg-search-summary strong { color: var(--text); }
.pg-search-section { margin-top: clamp(34px, 5vw, 56px); }
.pg-search-section__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.pg-search-section__head h2 { margin: 0; font-size: 1.15rem; }
.pg-search-section__head span { font-size: 12.5px; color: var(--muted); }
.pg-search-kinds { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- 下载中心 ---------- */
.pg-download-extra { display: flex; align-items: center; gap: 10px; }
.pg-download-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ---------- 招募 / 加入我们 ---------- */
.pg-careers { display: grid; gap: 18px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .pg-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pg-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .pg-detail { grid-template-columns: minmax(0, 1fr); }
  .pg-detail__hero { aspect-ratio: 16 / 10; }
  .pg-detail__body { order: 0; }
  .pg-form-layout { grid-template-columns: minmax(0, 1fr); }
  .pg-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .pg-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-qual-grid { grid-template-columns: minmax(0, 1fr); }
  .pg-toolbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .pg-toolbar__chips { max-width: 100%; }
  .pg-toolbar__right { margin-left: 0; justify-content: space-between; }
  .pg-toolbar__chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .pg-toolbar__chips::-webkit-scrollbar { display: none; }
  .pg-toolbar__chips .chip { flex: none; }
  .pg-field { flex: 1; }
  .pg-input { min-width: 0; width: 100%; }
  .pg-select { width: 100%; }
  .pg-searchbar { flex-direction: column; align-items: stretch; }
  .pg-searchbar .btn { width: 100%; }
  .pg-meta__row { grid-template-columns: 82px minmax(0, 1fr); }
  .pg-empty { padding: 40px 20px; }
}

@media (max-width: 560px) {
  .pg-cat-grid { grid-template-columns: minmax(0, 1fr); }
  .pg-team-grid { grid-template-columns: minmax(0, 1fr); }
  .pg-cat-card__media { aspect-ratio: 16 / 10; }
  .pg-thumb { width: 76px; height: 58px; }
  .pg-detail__actions .btn { flex: 1 1 auto; justify-content: center; }
  .pg-toolbar__right { flex-direction: column; align-items: stretch; gap: 10px; }
  .pg-count { text-align: left; }
  .pg-avatar { width: 50px; height: 50px; font-size: 16px; }
  .pg-form-actions { flex-direction: column; align-items: stretch; }
  .pg-form-actions .btn { width: 100%; }
  .pg-search-section__head { flex-direction: column; gap: 4px; }
  .pg-detail__hero { aspect-ratio: 4 / 3; }
}
