/*
 * Раздел «Ингредиенты» — /ingredienty/ и /ingredienty/<slug>/.
 *
 * Базовые блоки (pdp-crumb, jr-hero, chip, eyebrow, w-btn) берём из стилей
 * журнала и статьи; здесь только то, чего в них нет. Токены — из
 * prototype-tokens.css, своих цветов и шрифтов не заводим.
 */

/* ===== Алфавитный указатель ===== */

.ing-alphabet {
  position: sticky; top: 0; z-index: 18;
  background: rgba(253, 252, 251, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--w-border-hairline);
  padding: 14px 0;
}
.ing-alphabet .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ing-alphabet .chip {
  min-width: 34px;
  text-align: center;
}

/* ===== Список ингредиентов ===== */

.ing-index { padding: 40px 0 96px; }

.ing-index__count {
  font-family: var(--w-font-sans);
  font-size: 13px;
  color: var(--w-ink-faint);
  margin: 0 0 40px;
}

.ing-index__group { margin: 0 0 48px; }

.ing-index__letter {
  font-family: var(--w-font-serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  color: var(--w-green-mid);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--w-border-hairline);
  /* Липкий указатель перекрыл бы заголовок при переходе по якорю. */
  scroll-margin-top: 96px;
}

.ing-index__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 4px 32px;
}
.ing-index__list a {
  display: block;
  padding: 10px 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: border-color var(--w-duration-fast) var(--w-ease);
}
.ing-index__list a:hover { border-bottom-color: var(--w-green-sage); }
.ing-index__list .ru {
  display: block;
  font-family: var(--w-font-sans);
  font-size: 15px;
  line-height: 1.4;
  color: var(--w-ink);
}
.ing-index__list .inci {
  display: block;
  font-family: var(--w-font-sans);
  font-size: 12px;
  line-height: 1.4;
  color: var(--w-ink-faint);
  margin-top: 2px;
}

/* ===== Страница ингредиента ===== */

.ing-hero { background: var(--w-bg); padding: 56px 0 32px; }

.ing-hero__row {
  display: flex;
  align-items: center;
  gap: 56px;
}
@media (max-width: 860px) {
  .ing-hero__row { flex-direction: column; align-items: flex-start; gap: 28px; }
}

.ing-hero__photo {
  flex: 0 0 320px;
  max-width: 320px;
}
.ing-hero__photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
@media (max-width: 860px) {
  .ing-hero__photo { flex-basis: 200px; max-width: 200px; }
}

.ing-hero__copy { flex: 1 1 auto; min-width: 0; }
.ing-hero__copy .eyebrow { display: block; margin-bottom: 18px; }
.ing-hero__copy h1 {
  font-family: var(--w-font-serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--w-ink);
  margin: 0;
}
@media (max-width: 720px) {
  .ing-hero__copy h1 { font-size: 30px; }
}

.ing-hero__inci {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 0;
}
.ing-hero__inci .label {
  font-family: var(--w-font-sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--w-ink-faint);
}
.ing-hero__inci .value {
  font-family: var(--w-font-mono, var(--w-font-sans));
  font-size: 14px;
  color: var(--w-ink-muted);
}

/* Описание */

.ing-body { padding: 8px 0 24px; }
.ing-body__text {
  max-width: 720px;
  font-family: var(--w-font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--w-ink);
}
.ing-body__text p { margin: 0 0 18px; }
.ing-body__text p:last-child { margin-bottom: 0; }

/* Средства с ингредиентом */

.ing-products { padding: 48px 0 24px; }
.ing-products .eyebrow { display: block; margin-bottom: 14px; }
.ing-products .title {
  font-family: var(--w-font-serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.25;
  color: var(--w-ink);
  margin: 0 0 32px;
}
@media (max-width: 720px) {
  .ing-products .title { font-size: 24px; }
}

.ing-products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 32px 24px;
}

.ing-product-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.ing-product-card__img {
  display: block;
  background: var(--w-bg-warm);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 14px;
}
.ing-product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--w-duration) var(--w-ease);
}
.ing-product-card:hover .ing-product-card__img img { transform: scale(1.04); }
.ing-product-card__name {
  display: block;
  font-family: var(--w-font-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--w-ink);
}

/* Назад в раздел */

.ing-back { padding: 40px 0 96px; }
