/**
 * Энциклопедия ингредиентов — Figma 4qKihoL6nMebQhPBLUZZ1V
 * Desktop 1440 / Tablet 768 / Mobile 360
 */

body.sg-redesign--ingredients {
    background: var(--sg-bg, #0a0a0a);
}

body.sg-redesign--ingredients .breadcrumb,
body.sg-redesign--ingredients > .puzzle_block > .block_main_left_menu__content > h1 {
    display: none !important;
}

body.sg-redesign--ingredients .puzzle_block.main-container,
body.sg-redesign--ingredients .block_main_left_menu__content {
    max-width: none;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* --- Detail page --- */

.sg-ingredient {
    background: var(--sg-bg, #0a0a0a);
    color: var(--sg-text, #fbfafa);
    padding: 32px 0 96px;
}

.sg-ingredient__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--sg-container-desktop, 80px);
    display: flex;
    flex-direction: column;
    gap: 160px;
}

.sg-ingredient__top {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.sg-ingredient__breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.3;
    color: #fbfafa;
}

.sg-ingredient__breadcrumbs a,
.sg-ingredient__breadcrumbs span[aria-hidden="true"] {
    color: #fbfafa;
    opacity: 0.5;
    text-decoration: none;
}

.sg-ingredient__breadcrumbs a:hover {
    opacity: 1;
}

.sg-ingredient__breadcrumbs-current {
    opacity: 1;
}

/* Hero grid: desktop — intro+body слева, image справа */
.sg-ingredient__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 522px;
    grid-template-areas:
        "intro image"
        "body image";
    gap: 32px 20px;
    align-items: start;
}

.sg-ingredient__hero-intro {
    grid-area: intro;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sg-ingredient__hero-media {
    grid-area: image;
    border-radius: 16px;
    overflow: hidden;
    background: #131313;
    min-height: 461px;
    align-self: stretch;
}

.sg-ingredient__hero-body {
    grid-area: body;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sg-ingredient__hero-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 461px;
    object-fit: cover;
}

.sg-ingredient__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 32px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.1;
    box-sizing: border-box;
}

.sg-ingredient__tag--category {
    background: #fbfafa;
    color: #0a0a0a;
}

.sg-ingredient__tag--soft {
    background: #131313;
    color: #fbfafa;
    border: 1px solid #5f5d5d;
}

.sg-ingredient__title {
    margin: 0;
    font-size: 56px;
    font-weight: 600;
    line-height: 1.1;
}

.sg-ingredient__latin {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    color: #fbfafa;
    opacity: 0.5;
}

.sg-ingredient__lead {
    font-size: var(--sg-fs-body);
    line-height: var(--sg-lh-body);
    color: #fbfafa;
}

.sg-ingredient__lead p {
    margin: 0;
}

.sg-ingredient__lead p + p {
    margin-top: 20px;
}

.sg-ingredient__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sg-ingredient__evidence {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    width: fit-content;
    max-width: 100%;
    padding: 16px 24px;
    border-radius: 12px;
    background: #131313;
}

.sg-ingredient__evidence-label {
    font-size: 20px;
    line-height: 1.2;
    color: #5f5d5d;
}

.sg-ingredient__evidence-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sg-ingredient__evidence-meter {
    display: inline-flex;
    gap: 4px;
}

.sg-ingredient__evidence-meter--small .sg-ingredient__evidence-bar {
    width: 24px;
    height: 5px;
}

.sg-ingredient__evidence-bar {
    width: 28px;
    height: 6px;
    border-radius: 3px;
    background: #4d4d4d;
}

.sg-ingredient__evidence-bar.is-active {
    background: #fbfafa;
}

.sg-ingredient__evidence-value {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.32px;
    color: #fbfafa;
}

.sg-ingredient__quick-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.sg-ingredient__quick-fact {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border-radius: 12px;
    background: #131313;
}

.sg-ingredient__quick-fact-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.54px;
}

.sg-ingredient__quick-fact-text {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    color: #fbfafa;
    opacity: 0.55;
}

/* Sections */
.sg-ingredient__section {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.sg-ingredient__section--mechanism {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
}

.sg-ingredient__mechanism-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.sg-ingredient__section-title {
    margin: 0;
    font-size: 44px;
    font-weight: 600;
    line-height: 1.05;
}

.sg-ingredient__section-title--small {
    font-size: 26px;
    line-height: 1.1;
}

.sg-ingredient__prose {
    max-width: 767px;
    font-size: var(--sg-fs-body);
    line-height: var(--sg-lh-body);
    color: #fbfafa;
}

.sg-ingredient__prose p {
    margin: 0;
}

.sg-ingredient__prose p + p {
    margin-top: 20px;
}

.sg-ingredient__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 0 0 413px;
    width: 413px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sg-ingredient__step {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #131313;
}

.sg-ingredient__step-num {
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.32px;
    color: #fbfafa;
    opacity: 0.5;
}

.sg-ingredient__step-body {
    min-width: 0;
}

.sg-ingredient__step-title {
    margin: 0 0 3px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.32px;
}

.sg-ingredient__step-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.3;
    color: #fbfafa;
    opacity: 0.5;
}

/* Card grids */
.sg-ingredient__cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch;
}

.sg-ingredient__cards--3 > * {
    flex: 1 1 calc((100% - 40px) / 3);
    min-width: 280px;
    max-width: 100%;
}

.sg-ingredient__cards--2 > * {
    flex: 1 1 calc((100% - 20px) / 2);
    min-width: 280px;
    max-width: 100%;
}

/* Effect cards */
.sg-ingredient__effect-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: 16px;
    background: #131313;
}

.sg-ingredient__effect-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.32px;
}

.sg-ingredient__effect-meter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sg-ingredient__effect-meter > span {
    font-size: 13px;
    line-height: 1.3;
    color: #5f5d5d;
}

.sg-ingredient__effect-text {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    color: #fbfafa;
    opacity: 0.5;
}

/* Dosage cards */
.sg-ingredient__dosage-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border-radius: 16px;
    background: #131313;
}

.sg-ingredient__dosage-label {
    margin: 0;
    font-size: 13px;
    line-height: 1.3;
    color: #5f5d5d;
}

.sg-ingredient__dosage-headline {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
}

.sg-ingredient__dosage-text {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    color: #fbfafa;
    opacity: 0.5;
}

/* Myth cards */
.sg-ingredient__myth-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 24px;
    border-radius: 16px;
    background: #131313;
}

.sg-ingredient__myth-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.32px;
}

.sg-ingredient__myth-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
    color: #fbfafa;
    opacity: 0.5;
}

/* Safety cards */
.sg-ingredient__info-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border-radius: 16px;
    background: #131313;
}

.sg-ingredient__info-card--safety .sg-ingredient__info-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
}

.sg-ingredient__info-card--safety .sg-ingredient__info-text {
    font-size: 20px;
    line-height: 1.2;
    color: #fbfafa;
    opacity: 1;
}

.sg-ingredient__info-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.sg-ingredient__info-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #fbfafa;
    opacity: 0.72;
}

/* Products — единый компонент ergopromo:product.mini-card, сетка как на главной */
.sg-ingredient__products.sg-popular-products__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

body.sg-redesign--ingredients .sg-ingredient__products > .sg-product-mini {
    height: 100%;
    min-height: 579px;
}

.sg-ingredient__section--products {
    gap: 36px;
}

/* Related */
.sg-ingredient__related {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.sg-ingredient__related-card {
    flex: 0 0 calc((100% - 60px) / 4);
    width: calc((100% - 60px) / 4);
    min-width: 0;
    max-width: 305px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 135px;
    padding: 24px;
    border-radius: 16px;
    background: #131313;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

body.sg-redesign .sg-ingredient__related-card:hover,
body.sg-redesign .sg-ingredient__related-card:focus {
    background: #1a1a1a;
    color: inherit;
}

.sg-ingredient__related-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.32px;
}

.sg-ingredient__related-text {
    font-size: 14px;
    line-height: 1.2;
    color: #fbfafa;
    opacity: 0.5;
}

.sg-ingredient__related-category {
    margin-top: auto;
    font-size: 13px;
    line-height: 1.3;
    color: #5f5d5d;
}

/* Sources */
.sg-ingredient__section--sources {
    gap: 28px;
}

.sg-ingredient__sources {
    list-style: none;
    margin: 0;
    padding: 22px 24px;
    border-radius: 16px;
    background: #131313;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sg-ingredient__source {
    display: flex;
    gap: 12px;
    font-size: 16px;
    line-height: 1.2;
    color: #fbfafa;
    opacity: 0.72;
}

.sg-ingredient__source a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sg-ingredient__source a:hover {
    opacity: 1;
}

.sg-ingredient__debug {
    padding: 24px;
    border-radius: 16px;
    background: #131313;
    overflow: auto;
}

.sg-ingredient__debug pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 12px;
    color: rgba(251, 250, 250, 0.72);
}

/* --- List page --- */

.sg-ingredients-list {
    --sg-content-max: 1440px;
    --sg-gutter: var(--sg-container-desktop, 80px);
    background: var(--sg-bg, #0a0a0a);
    color: var(--sg-text, #fbfafa);
    overflow-x: clip;
}

.sg-ingredients-list__header-search {
    display: none;
}

.sg-ingredients-list__search {
    flex: 0 1 520px;
    width: 100%;
    max-width: 520px;
}

.sg-ingredients-list__search-shell {
    width: 100%;
    box-sizing: border-box;
}

.sg-ingredients-list__search.is-pinned {
    position: fixed;
    top: var(--sg-search-pin-top, var(--sg-header-height, 69px));
    left: 0;
    right: 0;
    z-index: 1200;
    flex: none;
    max-width: none;
    width: 100%;
    padding: 12px 0;
    background: rgba(19, 19, 19, 0.92);
    border-bottom: 1px solid rgba(251, 250, 250, 0.12);
    box-sizing: border-box;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sg-ingredients-list__search.is-pinned .sg-ingredients-list__search-shell {
    max-width: var(--sg-content-max, 1440px);
    margin: 0 auto;
    padding: 0 var(--sg-gutter, 80px);
    box-sizing: border-box;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__search.is-pinned .sg-ingredients-list__search-shell {
    max-width: var(--sg-content-max, 1440px);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--sg-gutter, 80px);
    box-sizing: border-box;
}

.sg-ingredients-list__search.is-pinned .sg-ingredients-list__search-label {
    max-width: none;
    width: 100%;
}

.sg-ingredients-list__search.is-animating {
    pointer-events: none;
}

.sg-ingredients-list__search-label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 0 12px 0 16px;
    border: 1px solid rgba(95, 93, 93, 0.4);
    border-radius: 4px;
    background: #0a0a0a;
    cursor: text;
    box-sizing: border-box;
    transition:
        border-color 0.25s ease,
        box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 0.25s ease,
        min-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.sg-ingredients-list__search-label:focus-within {
    border-color: rgba(251, 250, 250, 0.45);
    box-shadow: 0 0 0 3px rgba(251, 250, 250, 0.08);
}

.sg-ingredients-list__search.is-pinned .sg-ingredients-list__search-label {
    border-color: rgba(251, 250, 250, 0.22);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.sg-ingredients-list__search-clear {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #fbfafa;
    opacity: 0.55;
    cursor: pointer;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.sg-ingredients-list__search-clear:hover,
.sg-ingredients-list__search-clear:focus-visible {
    opacity: 1;
    background: rgba(251, 250, 250, 0.08);
    outline: none;
}

.sg-ingredients-list__search-clear[hidden] {
    display: none !important;
}

.sg-ingredients-list__hero {
    position: relative;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

.sg-ingredients-list__hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.sg-ingredients-list__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(10, 10, 10, 0.92) 0%,
        rgba(10, 10, 10, 0.55) 43.643%,
        rgba(10, 10, 10, 0) 71.51%
    );
    pointer-events: none;
}

.sg-ingredients-list__hero-inner {
    position: relative;
    z-index: 1;
    max-width: var(--sg-content-max, 1440px);
    margin-top: 0;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    min-height: 560px;
    padding: 32px var(--sg-gutter, 80px) 56px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 36px;
    transition: min-height 0.45s cubic-bezier(0.22, 1, 0.36, 1), padding 0.45s cubic-bezier(0.22, 1, 0.36, 1), gap 0.35s ease;
}

.sg-ingredients-list__breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.3;
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.sg-ingredients-list__breadcrumbs a,
.sg-ingredients-list__breadcrumbs-sep {
    color: #fbfafa;
    opacity: 0.55;
    text-decoration: none;
}

.sg-ingredients-list__breadcrumbs a:hover {
    opacity: 1;
}

.sg-ingredients-list__breadcrumbs-current {
    color: #fbfafa;
    opacity: 1;
}

.sg-ingredients-list__hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 720px;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.sg-ingredients-list__hero-main {
    display: flex;
    flex-direction: column;
    gap: 36px;
    width: 100%;
}

.sg-ingredients-list__search-home {
    flex: 0 1 520px;
    width: 100%;
    max-width: 520px;
    min-width: 0;
}

.sg-ingredients-list__search-home--mobile {
    display: none;
    flex: none;
    max-width: none;
}

/* Пин на body — вне overflow страницы, иначе fixed уезжает при скролле на iOS/WebKit */
.sg-ingredients-list__search-body-pin {
    margin: 0;
    padding: 0;
    border: 0;
}

.sg-ingredients-list__search-body-pin[hidden] {
    display: none !important;
}

.sg-ingredients-list__mobile-stack {
    display: none;
}

.sg-ingredients-list__mobile-intro {
    display: none;
}

.sg-ingredients-list__popular {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.sg-ingredients-list__popular-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.1;
}

.sg-ingredients-list__popular-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.sg-ingredients-list__inner {
    max-width: var(--sg-content-max, 1440px);
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    padding: 80px var(--sg-gutter, 80px) 96px;
    display: flex;
    flex-direction: column;
    gap: 80px;
    box-sizing: border-box;
    transition: padding-top 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.sg-ingredients-list__eyebrow {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #fbfafa;
    opacity: 0.55;
}

.sg-ingredients-list__title {
    margin: 0;
    font-size: 56px;
    font-weight: 600;
    line-height: 1.1;
}

.sg-ingredients-list__lead {
    margin: 0;
    font-size: var(--sg-fs-body);
    line-height: var(--sg-lh-body);
    color: #fbfafa;
}

.sg-ingredients-list__hero-search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 32px;
    width: 100%;
}

.sg-ingredients-list__hero-search-row .sg-ingredients-list__search {
    flex: 1 1 auto;
    max-width: 520px;
}

.sg-ingredients-list__search-icon {
    flex-shrink: 0;
    display: flex;
    color: #fbfafa;
    opacity: 0.5;
}

.sg-ingredients-list__search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #fbfafa;
    font: inherit;
    font-size: 20px;
    line-height: 1.2;
    outline: none;
}

.sg-ingredients-list__search-input::placeholder {
    color: rgba(251, 250, 250, 0.4);
}

.sg-ingredients-list__search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.sg-ingredients-list__hero-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.sg-ingredients-list__hero-stat {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
    color: #fbfafa;
}

.sg-ingredients-list__hero-stat-value {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.32px;
}

.sg-ingredients-list__hero-stat-label {
    opacity: 0.55;
}

.sg-ingredients-list__visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sg-ingredients-list__results {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.sg-ingredients-list__catalog {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
}

.sg-ingredients-list__catalog--search-active {
    padding-top: 0;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__hero-bg,
body.sg-ingredients-list--search-typing .sg-ingredients-list__hero-overlay {
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__breadcrumbs,
body.sg-ingredients-list--search-typing .sg-ingredients-list__hero-content,
body.sg-ingredients-list--search-typing .sg-ingredients-list__hero-stats {
    opacity: 0;
    transform: none;
    max-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
}

body.sg-ingredients-list--search-typing [data-sg-ingredients-collapsible] {
    display: none !important;
}

.sg-ingredients-list__hero-bg,
.sg-ingredients-list__hero-overlay {
    transition: opacity 0.4s ease;
}

.sg-ingredients-list__hero-stats {
    transition: opacity 0.3s ease;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__hero {
    min-height: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__search.is-pinned {
    pointer-events: auto;
    z-index: 1090;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__hero-inner {
    min-height: 0;
    height: 0;
    padding: 0;
    gap: 0;
    overflow: visible;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__hero-search-row {
    min-height: 0;
    gap: 0;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__inner {
    padding-top: 0;
    gap: 0;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__popular {
    display: none !important;
}

html.sg-ingredients-search-lock,
html.sg-ingredients-search-lock body {
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.sg-ingredients-list--search-typing {
    /* Окно не скроллим: шапка+поиск fixed, выдача — свой скролл */
    padding-top: 0;
    scroll-padding-top: 0;
}

body.sg-ingredients-list--search-typing.sg-ingredients-list--header-locked .sg-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1100 !important;
    transform: none !important;
    -webkit-transform: none !important;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__results {
    position: fixed;
    top: calc(var(--sg-search-pin-top, 69px) + var(--sg-search-pin-height, 58px));
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    background: var(--sg-bg, #0a0a0a);
    /* Как у шапки: gutter + центрирование в пределах --sg-content-max */
    padding-top: 12px;
    padding-bottom: 32px;
    padding-left: max(
        var(--sg-gutter, 80px),
        calc((100% - var(--sg-content-max, 1440px)) / 2 + var(--sg-gutter, 80px))
    );
    padding-right: max(
        var(--sg-gutter, 80px),
        calc((100% - var(--sg-content-max, 1440px)) / 2 + var(--sg-gutter, 80px))
    );
    box-sizing: border-box;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__categories {
    top: 0;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__flat {
    animation: sg-ingredients-results-in 0.35s ease both;
}

@keyframes sg-ingredients-results-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sg-ingredients-list__search,
    .sg-ingredients-list__search-label,
    .sg-ingredients-list__hero-inner,
    .sg-ingredients-list__inner,
    .sg-ingredients-list__breadcrumbs,
    .sg-ingredients-list__hero-content,
    .sg-ingredients-list__hero-stats,
    .sg-ingredients-list__hero-bg,
    .sg-ingredients-list__hero-overlay {
        transition: none !important;
    }

    body.sg-ingredients-list--search-typing .sg-ingredients-list__flat {
        animation: none;
    }
}

.sg-ingredients-list__toolbar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 0;
}

.sg-ingredients-list__catalog--search-active .sg-ingredients-list__toolbar {
    padding-top: 0;
}

.sg-ingredients-list__alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.sg-ingredients-list__alphabet-btn {
    border: 0;
    background: transparent;
    color: #fbfafa;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.sg-ingredients-list__alphabet-btn.is-active {
    color: #fbfafa;
    opacity: 1;
}

.sg-ingredients-list__alphabet-btn:not(.is-active):not(.is-disabled):hover {
    opacity: 0.85;
}

.sg-ingredients-list__alphabet-btn.is-disabled,
.sg-ingredients-list__alphabet-btn:disabled {
    color: #5f5d5d;
    cursor: default;
    opacity: 1;
}

.sg-ingredients-list__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: sticky;
    top: calc(var(--sg-search-pin-top, var(--sg-header-height, 69px)) + 8px);
    z-index: 5;
    padding: 8px 0 12px;
    background: var(--sg-bg, #0a0a0a);
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__categories {
    top: 0;
}

.sg-ingredients-list__category-btn {
    border: 1px solid rgba(251, 250, 250, 0.16);
    border-radius: 999px;
    background: transparent;
    color: #fbfafa;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sg-ingredients-list__category-btn.is-active {
    border-color: #fbfafa;
    background: #fbfafa;
    color: #0a0a0a;
}

.sg-ingredients-list__category-btn[hidden] {
    display: none !important;
}

.sg-ingredients-list__groups {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.sg-ingredients-list__groups[hidden] {
    display: none !important;
}

.sg-ingredients-list__group[hidden] {
    display: none !important;
}

.sg-ingredients-list__group-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.sg-ingredients-list__group-letter {
    margin: 0;
    flex-shrink: 0;
    font-size: 56px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -1.12px;
}

.sg-ingredients-list__group-line {
    flex: 1 1 auto;
    height: 1px;
    background: rgba(251, 250, 250, 0.12);
}

.sg-ingredients-list__group-count {
    flex-shrink: 0;
    min-width: 24px;
    font-size: 14px;
    line-height: 1.2;
    color: #5f5d5d;
    text-align: right;
}

.sg-ingredients-list__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.sg-ingredients-list__flat {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    margin: 0;
    padding: 0;
    justify-content: start;
    justify-items: stretch;
    align-items: stretch;
    box-sizing: border-box;
}

.sg-ingredients-list__flat[hidden] {
    display: none !important;
}

.sg-ingredients-list__flat > .sg-ingredients-list__card {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
}

.sg-ingredients-list__card {
    display: flex;
    flex-direction: column;
    min-height: 151px;
    min-width: 0;
    max-width: 100%;
    padding: 22px 24px;
    border-radius: 16px;
    background: #131313;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

.sg-ingredients-list__card[hidden] {
    display: none !important;
}

body.sg-redesign .sg-ingredients-list__card:hover,
body.sg-redesign .sg-ingredients-list__card:focus {
    background: #1a1a1a;
    color: inherit;
}

.sg-ingredients-list__card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.sg-ingredients-list__card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
}

.sg-ingredients-list__card-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.32px;
}

.sg-ingredients-list__card-letter {
    flex-shrink: 0;
    font-size: 46px;
    font-weight: 600;
    line-height: 1;
    color: #fbfafa;
    opacity: 0.12;
}

.sg-ingredients-list__card-text {
    font-size: 16px;
    line-height: 1.2;
    color: #fbfafa;
    opacity: 0.5;
}

.sg-ingredients-list__card-category {
    margin-top: auto;
    font-size: 14px;
    line-height: 1.2;
    color: #5f5d5d;
}

.sg-ingredients-list__empty {
    margin: 0;
    color: #fbfafa;
    opacity: 0.55;
}

.sg-ingredients-list__empty--filter {
    padding: 24px 0 0;
    text-align: center;
    font-size: 18px;
    line-height: 1.3;
}

body.sg-ingredients-list--search-typing .sg-ingredients-list__empty--filter {
    padding-top: 16px;
    margin: 0;
}

/* --- Tablet (768) --- */

@media (max-width: 1199px) {
    .sg-ingredients-list {
        --sg-gutter: var(--sg-container-tablet, 24px);
    }

    .sg-ingredient {
        padding-bottom: 100px;
    }

    .sg-ingredient__inner {
        padding: 0 var(--sg-gutter) 96px;
    }

    .sg-ingredients-list__inner {
        padding: 64px var(--sg-gutter) 96px;
        gap: 64px;
    }

    .sg-ingredients-list__hero-inner {
        padding: 32px var(--sg-gutter) 48px;
        min-height: 480px;
    }

    .sg-ingredients-list__hero {
        min-height: 480px;
    }

    .sg-ingredients-list__eyebrow {
        font-size: 16px;
        letter-spacing: 3px;
    }

    .sg-ingredient__hero {
        grid-template-columns: 1fr;
        grid-template-areas:
            "intro"
            "image"
            "body";
        gap: 24px;
    }

    .sg-ingredient__hero-intro {
        gap: 24px;
    }

    .sg-ingredient__hero-body {
        gap: 24px;
    }

    .sg-ingredient__hero-media,
    .sg-ingredient__hero-image {
        min-height: 320px;
    }

    .sg-ingredient__title,
    .sg-ingredients-list__title {
        font-size: 44px;
        line-height: 1;
    }

    .sg-ingredient__latin {
        font-size: 18px;
    }

    .sg-ingredient__lead,
    .sg-ingredient__prose {
        font-size: 18px;
    }

    .sg-ingredient__evidence-label {
        font-size: 18px;
    }

    .sg-ingredient__evidence-value {
        font-size: 15px;
        letter-spacing: -0.3px;
    }

    .sg-ingredient__quick-facts {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
    }

    .sg-ingredient__quick-fact {
        flex: 1 1 calc(50% - 8px);
        min-width: 280px;
        font-size: 18px;
    }

    .sg-ingredient__quick-fact-title {
        font-size: 18px;
        letter-spacing: -0.54px;
    }

    .sg-ingredient__quick-fact-text {
        font-size: 18px;
    }

    .sg-ingredient__section--mechanism {
        flex-direction: column;
        gap: 24px;
    }

    .sg-ingredient__mechanism-main {
        gap: 24px;
    }

    .sg-ingredient__section-title {
        font-size: 36px;
    }

    .sg-ingredient__prose {
        max-width: none;
    }

    .sg-ingredient__steps {
        flex: none;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .sg-ingredient__step {
        flex: 1 1 calc(50% - 8px);
        min-width: 280px;
    }

    .sg-ingredient__step-num,
    .sg-ingredient__step-title {
        font-size: 15px;
        letter-spacing: -0.3px;
    }

    .sg-ingredient__cards--3 > *,
    .sg-ingredient__cards--2 > * {
        flex: 1 1 calc(50% - 10px);
        min-width: 280px;
    }

    .sg-ingredient__products.sg-popular-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.sg-redesign--ingredients .sg-ingredient__products > .sg-product-mini {
        min-height: 479px;
    }

    .sg-ingredient__related-card {
        flex: 0 0 calc((100% - 20px) / 2);
        width: calc((100% - 20px) / 2);
        max-width: none;
    }

    .sg-ingredients-list__grid,
    .sg-ingredients-list__flat {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .sg-ingredients-list__popular-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-ingredients-list__group-letter {
        font-size: 44px;
    }

    .sg-ingredients-list__lead {
        font-size: 18px;
    }

    .sg-ingredients-list__inner {
        padding-top: 64px;
        gap: 64px;
    }
}

/* --- Mobile (360) --- */

@media (max-width: 767px) {
    .sg-ingredients-list {
        --sg-gutter: var(--sg-container-mobile, 20px);
        padding: 0;
        overflow-x: clip;
    }

    .sg-ingredient {
        padding: 20px 0 50px;
    }

    .sg-ingredient__inner {
        padding: 0 var(--sg-gutter) 50px;
        max-width: 100%;
    }

    .sg-ingredients-list__inner {
        padding: 24px var(--sg-gutter) 50px;
        max-width: 100%;
        gap: 100px;
    }

    body.sg-ingredients-list--search-typing .sg-ingredients-list__inner {
        padding-top: 0;
        gap: 0;
    }

    body.sg-ingredients-list--search-typing .sg-ingredients-list__results {
        padding-top: 12px;
        padding-bottom: 28px;
        padding-left: var(--sg-gutter);
        padding-right: var(--sg-gutter);
    }

    .sg-ingredients-list__search.is-pinned {
        padding: 10px 0;
    }

    .sg-ingredients-list__search-label {
        min-height: 48px;
    }

    .sg-ingredients-list__hero {
        min-height: 420px;
    }

    .sg-ingredients-list__hero-inner {
        min-height: 420px;
        padding: 20px var(--sg-gutter) 32px;
        gap: 0;
        justify-content: space-between;
    }

    .sg-ingredients-list__hero-overlay {
        background: linear-gradient(
            180deg,
            rgba(10, 10, 10, 0.35) 0%,
            rgba(10, 10, 10, 0.88) 55%,
            rgba(10, 10, 10, 0.96) 100%
        );
    }

    .sg-ingredients-list__eyebrow {
        font-size: 16px;
        letter-spacing: 5px;
        line-height: 1.2;
    }

    .sg-ingredients-list__hero-main {
        gap: 16px;
    }

    .sg-ingredients-list__hero-content {
        gap: 16px;
        max-width: none;
    }

    .sg-ingredients-list__lead--hero {
        display: none;
    }

    .sg-ingredients-list__hero-search-row {
        flex-direction: row;
        align-items: center;
        gap: 24px;
    }

    .sg-ingredients-list__hero-search-row .sg-ingredients-list__search-home {
        display: none;
    }

    .sg-ingredients-list__hero-stats {
        gap: 24px;
    }

    .sg-ingredients-list__hero-stat {
        font-size: 14px;
    }

    .sg-ingredients-list__hero-stat-value {
        font-size: 14px;
        letter-spacing: -0.28px;
    }

    .sg-ingredients-list__mobile-stack {
        display: flex;
        flex-direction: column;
        gap: 36px;
        width: 100%;
    }

    body.sg-ingredients-list--search-typing .sg-ingredients-list__mobile-stack {
        display: flex;
        /* Не display:none — иначе если поле ещё внутри, iOS убивает клавиатуру */
    }

    body.sg-ingredients-list--search-typing .sg-ingredients-list__mobile-intro {
        display: none !important;
    }

    body.sg-ingredients-list--search-typing .sg-ingredients-list__search-home--mobile {
        display: block;
        margin: 0;
        /* Спейсер под fixed-поле, пока оно в home или на body */
        min-height: var(--sg-search-pin-height, 58px);
        height: var(--sg-search-pin-height, 58px);
        overflow: visible;
        pointer-events: none;
    }

    body.sg-ingredients-list--search-typing .sg-ingredients-list__search-home--mobile .sg-ingredients-list__search {
        pointer-events: auto;
    }

    .sg-ingredients-list__mobile-intro {
        display: block;
    }

    .sg-ingredients-list__lead--mobile {
        display: block;
        margin: 0;
        font-size: 16px;
        line-height: 1.1;
    }

    .sg-ingredients-list__search-home--mobile {
        display: block;
        width: 100%;
        max-width: none;
        margin: 0;
        z-index: 20;
    }

    .sg-ingredients-list__search-home--mobile .sg-ingredients-list__search,
    .sg-ingredients-list__search-home--mobile .sg-ingredients-list__search-label {
        max-width: none;
        width: 100%;
    }

    .sg-ingredients-list__search-input {
        font-size: 16px;
    }

    .sg-ingredients-list__inner {
        padding-top: 24px;
        gap: 100px;
    }

    .sg-ingredients-list__categories {
        top: calc(var(--sg-search-pin-top, var(--sg-header-height, 69px)) + 8px);
    }

    body.sg-ingredients-list--search-typing .sg-ingredients-list__categories,
    body.sg-ingredients-list--search-pinned .sg-ingredients-list__categories {
        top: 0;
    }

    .sg-ingredients-list__popular {
        gap: 24px;
    }

    .sg-ingredients-list__popular-title {
        font-size: 16px;
        line-height: 1.1;
    }

    .sg-ingredients-list__popular-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .sg-ingredients-list__card--popular {
        min-height: 0;
        padding: 24px;
        border-radius: 16px;
    }

    .sg-ingredients-list__card--popular .sg-ingredients-list__card-title {
        font-size: 14px;
        font-weight: 500;
        letter-spacing: -0.28px;
    }

    .sg-ingredients-list__card--popular .sg-ingredients-list__card-letter {
        font-size: 28px;
        line-height: 1.05;
        color: #4d4d4d;
        opacity: 1;
    }

    .sg-ingredients-list__card--popular .sg-ingredients-list__card-text {
        font-size: 16px;
        line-height: 1.1;
        opacity: 1;
    }

    .sg-ingredients-list__card--popular .sg-ingredients-list__card-category {
        font-size: 13px;
        line-height: 1.3;
        color: #4d4d4d;
    }

    .sg-ingredients-list__card--popular .sg-ingredients-list__card-body {
        gap: 16px;
    }

    .sg-ingredients-list__card--popular .sg-ingredients-list__card-head {
        min-height: 0;
        gap: 8px;
    }

    .sg-ingredients-list__toolbar {
        gap: 20px;
        padding-top: 0;
    }

    .sg-ingredients-list__alphabet {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 6px;
        flex-wrap: unset;
        overflow: visible;
        padding-bottom: 0;
    }

    .sg-ingredients-list__alphabet-btn--all,
    .sg-ingredients-list__alphabet-btn--rare {
        display: none !important;
    }

    .sg-ingredients-list__alphabet-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        aspect-ratio: 1;
        min-height: 40px;
        padding: 0;
        margin: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #fbfafa;
        font-size: 14px;
        font-weight: 500;
        line-height: 1;
        opacity: 1;
    }

    .sg-ingredients-list__alphabet-btn.is-active {
        opacity: 1;
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    .sg-ingredients-list__alphabet-btn.is-disabled,
    .sg-ingredients-list__alphabet-btn:disabled {
        opacity: 0.28;
        cursor: default;
    }

    .sg-ingredients-list__categories {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        position: static;
        top: auto;
        padding: 0;
        background: transparent;
        overflow: visible;
    }

    .sg-ingredients-list__category-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .sg-ingredient__top {
        gap: 32px;
    }

    .sg-ingredient__title,
    .sg-ingredients-list__title {
        font-size: 36px;
        line-height: 1;
    }

    .sg-ingredient__latin {
        font-size: 16px;
        line-height: 1.1;
    }

    .sg-ingredient__lead,
    .sg-ingredient__prose {
        font-size: 16px;
        line-height: var(--sg-lh-body);
    }

    .sg-ingredient__lead p + p,
    .sg-ingredient__prose p + p {
        margin-top: 16px;
    }

    .sg-ingredient__hero-media,
    .sg-ingredient__hero-image {
        min-height: 240px;
    }

    .sg-ingredient__evidence {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        box-sizing: border-box;
    }

    .sg-ingredient__evidence-label {
        font-size: 16px;
        line-height: 1.1;
    }

    .sg-ingredient__evidence-meter--small .sg-ingredient__evidence-bar,
    .sg-ingredient__evidence-bar {
        width: 20px;
        height: 5px;
    }

    .sg-ingredient__evidence-value {
        font-size: 14px;
        letter-spacing: -0.28px;
    }

    .sg-ingredient__quick-facts {
        flex-direction: column;
        gap: 12px;
    }

    .sg-ingredient__quick-fact {
        flex: none;
        width: 100%;
        min-width: 0;
        font-size: 16px;
        line-height: 1.1;
    }

    .sg-ingredient__quick-fact-title {
        font-size: 16px;
        letter-spacing: 0;
    }

    .sg-ingredient__quick-fact-text {
        font-size: 16px;
    }

    .sg-ingredient__section-title {
        font-size: 28px;
    }

    .sg-ingredient__section-title--small {
        font-size: 22px;
    }

    .sg-ingredient__steps {
        flex-direction: column;
        gap: 12px;
    }

    .sg-ingredient__step {
        flex: none;
        width: 100%;
        min-width: 0;
    }

    .sg-ingredient__step-num,
    .sg-ingredient__step-title {
        font-size: 14px;
        letter-spacing: -0.28px;
    }

    .sg-ingredient__cards--3 > *,
    .sg-ingredient__cards--2 > * {
        flex: 1 1 100%;
        min-width: 0;
    }

    .sg-ingredient__related-card {
        flex: 0 0 100%;
        width: 100%;
        max-width: none;
    }

    .sg-ingredients-list__inner {
        gap: 32px;
    }

    .sg-ingredients-list__catalog {
        gap: 32px;
    }

    .sg-ingredients-list__groups {
        gap: 32px;
    }

    .sg-ingredients-list__grid,
    .sg-ingredients-list__flat {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }

    .sg-ingredients-list__flat > .sg-ingredients-list__card,
    .sg-ingredients-list__card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .sg-ingredients-list__group-head {
        margin-bottom: 16px;
    }

    .sg-ingredients-list__group-letter {
        font-size: 36px;
    }

    .sg-ingredients-list__card {
        min-height: 140px;
        padding: 18px 20px;
    }

    .sg-ingredients-list__card-letter {
        font-size: 36px;
    }

    .sg-ingredients-list__card-title {
        font-size: 15px;
    }

    .sg-ingredients-list__card-text {
        font-size: 14px;
    }

    .sg-ingredients-list__alphabet {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .sg-ingredients-list__alphabet::-webkit-scrollbar {
        display: none;
    }

    .sg-ingredients-list__alphabet-btn {
        flex-shrink: 0;
    }

    .sg-ingredients-list__categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .sg-ingredients-list__categories::-webkit-scrollbar {
        display: none;
    }

    .sg-ingredients-list__category-btn {
        flex-shrink: 0;
    }

    .sg-ingredients-list__lead {
        font-size: 16px;
        line-height: 1.1;
    }

    .sg-ingredient__products.sg-popular-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 575px) {
    .sg-ingredient__products.sg-popular-products__grid {
        grid-template-columns: 1fr;
    }

    body.sg-redesign--ingredients .sg-ingredient__products > .sg-product-mini {
        min-height: 432px;
    }
}
