/* ============================================================
   优科生物官网 - 原料清单样式（列表页 + 详情页共用）
   依赖：css/global.css（CSS 变量、容器、图标、导航、页脚）
         css/news.css（横幅、面包屑、侧边栏、分页、正文等通用样式）
   设计参考：css/patent.css（深色横幅 + 纯文字、少图标）
   ============================================================ */

/* ---------- 页面横幅（覆盖 news.css 的 .page-hero） ---------- */
.page-ingredients-list .page-hero,
.page-ingredients-detail .page-hero {
  position: relative;
  isolation: isolate;
  padding: 90px 0 130px;
  background: linear-gradient(103deg, rgba(0,36,22,.96) 0%, rgba(0,62,37,.92) 45%, rgba(10,120,62,.6) 100%);
  overflow: hidden;
}

.page-ingredients-list .page-hero::before,
.page-ingredients-detail .page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 52px 52px;
}

/* 标题与描述在深色背景上的可读性微调 */
.page-ingredients-list .page-hero__title,
.page-ingredients-detail .page-hero__title {
  font-size: 52px;
  line-height: 1.18;
  margin: 14px 0 12px;
  letter-spacing: 0.5px;
  color: #fff;
  overflow-wrap: break-word;
}

.page-ingredients-detail .page-hero__badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 12px;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #f5d97a;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(245, 217, 122, 0.55);
  border-radius: 999px;
  transform: translateY(-4px);
}

.page-ingredients-list .page-hero__desc,
.page-ingredients-detail .page-hero__desc {
  font-size: 17px;
  line-height: 1.9;
  color: rgba(255,255,255,.85);
  max-width: 680px;
  overflow-wrap: break-word;
}

/* ---------- 原料列表 ---------- */
.ingredient-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ingredient-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.ingredient-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.ingredient-card__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.ingredient-card__code {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.7;
  background: #e6f4ec;
  color: var(--color-primary);
}

.ingredient-card__title {
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 6px;
  overflow-wrap: break-word;
}

.ingredient-card__title a {
  color: var(--color-text);
}

.ingredient-card__title a:hover {
  color: var(--color-primary);
}

.ingredient-card__en {
  font-size: 13px;
  color: var(--color-primary-light);
  margin-bottom: 10px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.ingredient-card__desc {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

.ingredient-card__more {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  color: var(--color-primary);
  font-size: 14px;
}

.ingredient-card__more:hover {
  color: var(--color-primary-dark);
}

/* ---------- 详情页：信息区块 ---------- */
.ingredient-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ingredient-section {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}

.ingredient-section__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 3px solid var(--color-primary);
}

/* ---------- 详情页：基本信息（左图右文） ---------- */
.ingredient-basic {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.ingredient-basic__media {
  flex: 0 0 220px;
  max-width: 220px;
}

.ingredient-basic__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.ingredient-basic__body {
  flex: 1;
  min-width: 0;
}

.ingredient-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
}

.ingredient-field {
  min-width: 0;
}

.ingredient-field--full {
  grid-column: 1 / -1;
}

.ingredient-field__label {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.ingredient-field__value {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.ingredient-intro {
  font-size: 15px;
  line-height: 1.9;
  color: var(--color-text);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 详情页：区块说明文字 */
.ingredient-section__desc {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 16px;
}

/* 详情页：上一篇/下一篇空态 */
.article-nav__title--empty {
  color: var(--color-text-secondary);
}

/* ---------- 详情页：常见菌株 ---------- */
.ingredient-strains__group {
  margin-top: 24px;
}

.ingredient-strains__group:first-child {
  margin-top: 0;
}

.ingredient-strains__group-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.ingredient-strains__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
}

.ingredient-strains__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-border);
}

.ingredient-strains__zh {
  color: var(--color-text);
  font-size: 14px;
  flex-shrink: 0;
}

.ingredient-strains__la {
  color: var(--color-text-secondary);
  font-size: 13px;
  font-style: italic;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ---------- 详情页：常见发酵工艺 ---------- */
.ingredient-processes__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
}

.ingredient-processes__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-border);
}

.ingredient-processes__name {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.ingredient-processes__desc {
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

/* ---------- 详情页：常见问题 ---------- */
.ingredient-faq__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ingredient-faq__item {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ingredient-faq__item:hover,
.ingredient-faq__item[open] {
  border-color: var(--color-primary);
}

.ingredient-faq__item[open] {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.ingredient-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  list-style: none;
}

.ingredient-faq__question::-webkit-details-marker {
  display: none;
}

.ingredient-faq__question::after {
  content: "+";
  flex: none;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(7, 136, 63, 0.08);
  color: var(--color-primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s ease;
}

.ingredient-faq__item[open] .ingredient-faq__question::after {
  transform: rotate(45deg);
}

.ingredient-faq__answer {
  padding: 0 18px 18px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

/* ---------- 详情页：优科生物介绍 ---------- */
.ingredient-about__intro {
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(148, 216, 195, 0.20), rgba(148, 216, 195, 0.05));
  border: 1px solid rgba(148, 216, 195, 0.55);
  margin-bottom: 16px;
  box-sizing: border-box;
}

.ingredient-about__intro-title {
  font-size: 17px;
  font-weight: 600;
  color: #285F50;
}

.ingredient-about__intro-desc {
  font-size: 12.5px;
  color: #6B7280;
  margin-top: 4px;
  line-height: 1.7;
}

.ingredient-about__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
}

.ingredient-about__card {
  flex: 1 1 260px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--ia-border);
  background: linear-gradient(135deg, var(--ia-bg), rgba(255, 255, 255, 0.4));
  box-sizing: border-box;
}

.ingredient-about__card--green  { --ia-border: rgba(148, 216, 195, 0.40); --ia-bg: rgba(148, 216, 195, 0.12); --ia-strong: #4B7A6B; }
.ingredient-about__card--blue   { --ia-border: rgba(139, 200, 234, 0.40); --ia-bg: rgba(139, 200, 234, 0.12); --ia-strong: #2E6E8A; }
.ingredient-about__card--pink   { --ia-border: rgba(234, 167, 178, 0.40); --ia-bg: rgba(234, 167, 178, 0.12); --ia-strong: #8A4A58; }
.ingredient-about__card--orange { --ia-border: rgba(225, 185, 143, 0.45); --ia-bg: rgba(225, 185, 143, 0.14); --ia-strong: #8A642E; }
.ingredient-about__card--purple { --ia-border: rgba(159, 171, 234, 0.45); --ia-bg: rgba(159, 171, 234, 0.13); --ia-strong: #4A4E8A; }
.ingredient-about__card--leaf   { --ia-border: rgba(162, 221, 170, 0.50); --ia-bg: rgba(162, 221, 170, 0.16); --ia-strong: #3F7A45; }

.ingredient-about__card-no {
  font-size: 12px;
  color: var(--ia-strong);
  font-weight: 600;
}

.ingredient-about__card-sub {
  font-size: 12px;
  color: #6B7280;
  margin: 4px 0 6px;
  line-height: 1.6;
}

.ingredient-about__card-text {
  font-size: 12px;
  color: #1A1B1C;
  line-height: 1.7;
}

.ingredient-about__flow {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 216, 195, 0.35);
  margin: 12px 0 16px;
  box-sizing: border-box;
}

.ingredient-about__flow-title {
  font-size: 13px;
  font-weight: 600;
  color: #285F50;
}

.ingredient-about__flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ingredient-about__step {
  flex: 1 1 130px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  box-sizing: border-box;
}

.ingredient-about__step--1 { background: rgba(148, 216, 195, 0.15); }
.ingredient-about__step--2 { background: rgba(139, 200, 234, 0.15); }
.ingredient-about__step--3 { background: rgba(234, 167, 178, 0.15); }
.ingredient-about__step--4 { background: rgba(225, 185, 143, 0.16); }
.ingredient-about__step--5 { background: rgba(162, 221, 170, 0.18); }

.ingredient-about__step-label {
  font-size: 11.5px;
  color: #6B7280;
}

.ingredient-about__step-name {
  font-size: 12.5px;
  font-weight: 500;
  color: #1A1B1C;
  line-height: 1.5;
}

.ingredient-about__flow-note {
  font-size: 11.5px;
  color: #6B7280;
  margin-top: 8px;
  line-height: 1.7;
}

.ingredient-about__footer {
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(148, 216, 195, 0.08);
  border: 1px dashed rgba(148, 216, 195, 0.50);
  margin-bottom: 12px;
  box-sizing: border-box;
  text-align: center;
}

.ingredient-about__footer-title {
  font-size: 12px;
  color: #4B7A6B;
  font-weight: 600;
}

.ingredient-about__footer-desc {
  display: block;
  font-size: 11.5px;
  color: #6B7280;
  margin-top: 3px;
  line-height: 1.6;
}

/* ---------- 侧边栏：最新原料 ---------- */
.ingredient-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.ingredient-sidebar-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--color-border);
}

.ingredient-sidebar-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ingredient-sidebar-item__link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--color-text);
  font-size: 14px;
  transition: color 0.2s;
}

.ingredient-sidebar-item__link:hover {
  color: var(--color-primary);
}

.ingredient-sidebar-item__name {
  line-height: 1.5;
  overflow-wrap: break-word;
}

.ingredient-sidebar-item__code {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* ---------- 侧边栏：带缩略图的条目（产品 / 专利） ---------- */
.ingredient-sidebar-item--media .ingredient-sidebar-item__link {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.ingredient-sidebar-item__thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  background: var(--color-bg-soft);
}

.ingredient-sidebar-item__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ingredient-sidebar-item__thumb--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

.ingredient-sidebar-item__thumb--icon svg {
  display: block;
}

.ingredient-sidebar-item__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

/* ---------- 侧边栏：原料咨询 ---------- */
.ingredient-consult {
  background: linear-gradient(135deg, rgba(148, 216, 195, 0.14), rgba(255, 255, 255, 0.4));
  border-color: rgba(148, 216, 195, 0.45);
}

.ingredient-consult__desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 14px;
}

.ingredient-consult__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s;
}

.ingredient-consult__btn:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

/* ---------- 响应式 ---------- */
@media (max-width: 991px) {
  .page-ingredients-list .page-hero,
  .page-ingredients-detail .page-hero {
    padding: 64px 0 120px;
  }

  .page-ingredients-list .page-hero__title,
  .page-ingredients-detail .page-hero__title {
    font-size: 40px;
  }
}

@media (max-width: 767px) {
  .page-ingredients-list .page-hero,
  .page-ingredients-detail .page-hero {
    padding: 48px 0 110px;
  }

  .page-ingredients-list .page-hero__title,
  .page-ingredients-detail .page-hero__title {
    font-size: 30px;
  }

  .page-ingredients-list .page-hero__desc,
  .page-ingredients-detail .page-hero__desc {
    font-size: 15px;
  }

  .ingredient-card {
    padding: 20px;
  }

  .ingredient-card__title {
    font-size: 17px;
  }

  .ingredient-basic {
    flex-direction: column;
  }

  .ingredient-basic__media {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .ingredient-fields {
    grid-template-columns: 1fr;
  }

  .ingredient-strains__list {
    grid-template-columns: 1fr;
  }

  .ingredient-processes__list {
    grid-template-columns: 1fr;
  }

  .ingredient-section {
    padding: 20px;
  }
}
