/**
 * Витрина /modeli/ — сетка карточек (как новости) + левый фильтр.
 * Scope: .sk-models-page only. Не трогает МКТ25 / learn-news слайдеры.
 */
.sk-models-page {
    --sk-brand: #497952;
    --sk-brand-dark: #127023;
    --sk-brand-soft: #e8efe6;
    --sk-brand-softest: #f3f7f2;
    --sk-brand-beige: #f8f6f1;
    --sk-ink: #3d4438;
    --sk-muted: #8a9a86;
    --sk-line: #e2ddd4;
    --sk-radius: 10px;
    /* 2 строки названия + тип + состав (слот 4-й строки всегда) */
    --sk-news-card-caption: 112px;
    --sk-news-gap: 12px;
    margin: 0 0 40px;
    color: var(--sk-ink);
}

.sk-models-page__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 20px;
}

.sk-models-page__title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--sk-ink);
}

.sk-models-page__filter-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--sk-line);
    border-radius: var(--sk-radius);
    background: var(--sk-brand-soft);
    color: var(--sk-brand-dark);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.sk-models-page__layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.sk-models-page__aside {
    position: sticky;
    top: 12px;
    padding: 16px;
    background: var(--sk-brand-beige);
    border: 1px solid var(--sk-line);
    border-radius: var(--sk-radius);
    box-sizing: border-box;
}

.sk-models-filter__block {
    margin: 0 0 18px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--sk-line);
}

.sk-models-filter__block:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.sk-models-filter__heading {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--sk-brand-dark);
}

.sk-models-filter__switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--sk-ink);
    user-select: none;
}

.sk-models-filter__switch:last-child {
    margin-bottom: 0;
}

.sk-models-filter__switch > input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sk-models-filter__switch > i {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 24px;
    border-radius: 999px;
    background: #d9e0d6;
    transition: background 0.18s ease;
}

.sk-models-filter__switch > i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(61, 68, 56, 0.2);
    transition: transform 0.18s ease;
}

.sk-models-filter__switch > input:checked + i {
    background: var(--sk-brand);
}

.sk-models-filter__switch > input:checked + i::after {
    transform: translateX(16px);
}

.sk-models-filter__switch > input:focus-visible + i {
    outline: 2px solid var(--sk-brand-dark);
    outline-offset: 2px;
}

.sk-models-filter__checks {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 260px;
    overflow: auto;
}

.sk-models-filter__check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
    color: var(--sk-ink);
}

.sk-models-filter__check input {
    margin-top: 2px;
    accent-color: var(--sk-brand);
}

.sk-models-filter__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
}

.sk-models-filter__apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 18px;
    border: 0;
    border-radius: 180px;
    background: var(--sk-brand);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.sk-models-filter__apply:hover {
    background: var(--sk-brand-dark);
}

.sk-models-filter__reset {
    font-size: 14px;
    color: var(--sk-brand-dark);
    text-decoration: underline;
}

.sk-models-page__meta {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--sk-muted);
}

.sk-models-page__empty {
    margin: 24px 0;
    padding: 20px;
    background: var(--sk-brand-softest);
    border-radius: var(--sk-radius);
    color: var(--sk-ink);
}

/*
 * Сетка карточек в .sk-models-page__main — как каталог:
 * ≥1200 → 4; 769–1199 → 3; ≤768 → 1/2 (sk_catalog_mobile_cols, дефолт 2).
 * Scope только /modeli/. Не трогает МКТ25 / learn-news слайдеры.
 */
.sk-models-page .sk-models-page__grid.articles__list,
.sk-models-page .articles__list.sk-models-page__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sk-news-gap);
    max-width: none;
    margin: 0;
    align-items: start;
}

.sk-models-page .articles__item {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    margin: 0;
    text-decoration: none;
    color: inherit;
    border-radius: var(--sk-radius);
    overflow: hidden;
    background: var(--sk-brand-soft);
    border: 1px solid transparent;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sk-models-page .articles__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(73, 121, 82, 0.14);
    border-color: rgba(18, 112, 35, 0.22);
    background: #dce8d9;
}

.sk-models-page .articles__item-photo {
    display: block;
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    padding-top: 0;
    aspect-ratio: 1 / 1;
    background: var(--sk-brand-soft);
    overflow: hidden;
}

.sk-models-page .articles__item-photo img,
.sk-models-page .articles__item-photo .photo-full-size {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

.sk-models-page .articles__item:hover .articles__item-photo img {
    transform: scale(1.03);
}

.sk-models-page .articles__item-photo--logo {
    background: var(--sk-brand-soft);
}

.sk-models-page .articles__item-photo--logo img {
    object-fit: contain;
    object-position: center;
    padding: 10% 18%;
    box-sizing: border-box;
    background: var(--sk-brand-soft);
}

.sk-models-page .articles__item-caption {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    width: 100%;
    flex: 0 0 var(--sk-news-card-caption);
    height: var(--sk-news-card-caption);
    min-height: var(--sk-news-card-caption);
    max-height: var(--sk-news-card-caption);
    box-sizing: border-box;
    margin: 0;
    padding: 8px 12px;
    background: var(--sk-brand-soft);
    overflow: hidden;
}

.sk-models-page .articles__item:hover .articles__item-caption {
    background: #dce8d9;
}

.sk-models-page .articles__item-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 0 0 auto;
    width: 100%;
    min-height: calc(1.35em * 2);
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--sk-ink);
    text-align: center;
}

.sk-models-page .articles__item:hover .articles__item-title {
    color: var(--sk-brand);
}

/* Тип (1 строка, по центру); значок «Описание» — absolute справа, не смещает текст */
.sk-models-page .articles__item-meta {
    position: relative;
    display: block;
    width: 100%;
    margin-top: 4px;
    min-height: 1.3em;
    text-align: center;
}

.sk-models-page .articles__item-date {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 20px;
    box-sizing: border-box;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--sk-brand-dark);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sk-models-page .sk-models-card__desc {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--sk-brand);
}

.sk-models-page .sk-models-card__desc:not(.is-on) {
    visibility: hidden;
}

.sk-models-page .sk-models-card__desc svg {
    display: block;
    width: 16px;
    height: 16px;
}

.sk-models-page .articles__item:hover .sk-models-card__desc.is-on {
    color: var(--sk-brand-dark);
}

/* 4-я строка: состав SOSTAV с пряжи ОТ (слот высоты всегда, даже пустой) */
.sk-models-page .sk-models-card__sostav {
    display: block;
    width: 100%;
    flex: 0 0 auto;
    margin-top: 2px;
    min-height: 1.25em;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--sk-brand);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sk-models-page__pager {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--sk-line);
}

/* —— Ниже сетки (перед футером): МКТ25 пряжа + новости —— */
.sk-models-page__below {
    margin: 36px 0 0;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.sk-models-page__products,
.sk-models-page__news {
    margin: 0;
    padding-top: 24px;
    border-top: 1px solid var(--sk-line);
}

.sk-models-page__products-head,
.sk-models-page__news-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
}

.sk-models-page__products-title,
.sk-models-page__news-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--sk-ink);
}

.sk-models-page__products-all,
.sk-models-page__news-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--sk-brand-dark);
    text-decoration: underline;
}

.sk-models-page__products-all:hover,
.sk-models-page__news-more:hover {
    color: var(--sk-brand);
}

/* МКТ25: только scope .sk-models-page — не трогаем uchimsya/news freeze */
.sk-models-page__products-grid {
    overflow: visible;
}

.sk-models-page__products .sk-catalog-slider-c25__item > .sk-card-slc25 {
    width: 100%;
    max-width: var(--sk-slc25-card-w, 260px);
}

/*
 * Стрелки МКТ25 на /modeli/: ФТЗ вместо оранжевого uk-button-secondary.
 * Источник оранжа: template_styles.css / styles.css
 *   .uk-button.uk-button-secondary { background: #ffa372 }
 *   :hover { background: #ed6663 }
 * Scope только .sk-models-page__products — freeze uchimsya/slider_c25 не трогаем.
 */
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary[data-sk-slc25-nav],
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary.uk-slidenav-previous,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary.uk-slidenav-next,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary[uk-slidenav-previous],
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary[uk-slidenav-next],
.sk-models-page__products .sk-catalog-slider-c25 [data-sk-slc25-nav].uk-button.uk-button-secondary {
    background: var(--sk-brand-dark, var(--c25-brand-dark, #127023)) !important; /* ФТЗ */
    background-color: var(--sk-brand-dark, var(--c25-brand-dark, #127023)) !important;
    border-color: var(--sk-brand-dark, var(--c25-brand-dark, #127023)) !important;
    color: #fff !important;
    text-shadow: none !important;
    box-shadow: 0 4px 12px rgba(18, 112, 35, 0.28) !important;
}

.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary[data-sk-slc25-nav]:hover,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary[data-sk-slc25-nav]:focus,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary.uk-slidenav-previous:hover,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary.uk-slidenav-previous:focus,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary.uk-slidenav-next:hover,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary.uk-slidenav-next:focus,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary[uk-slidenav-previous]:hover,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary[uk-slidenav-previous]:focus,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary[uk-slidenav-next]:hover,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary[uk-slidenav-next]:focus,
.sk-models-page__products .sk-catalog-slider-c25 [data-sk-slc25-nav].uk-button.uk-button-secondary:hover,
.sk-models-page__products .sk-catalog-slider-c25 [data-sk-slc25-nav].uk-button.uk-button-secondary:focus {
    background: var(--sk-brand, var(--c25-brand, #497952)) !important; /* ОФЗ */
    background-color: var(--sk-brand, var(--c25-brand, #497952)) !important;
    border-color: var(--sk-brand, var(--c25-brand, #497952)) !important;
    color: #fff !important;
}

.sk-models-page__products .sk-catalog-slider-c25 a.uk-button.uk-button-secondary[data-sk-slc25-nav]:active,
.sk-models-page__products .sk-catalog-slider-c25 [data-sk-slc25-nav].uk-button.uk-button-secondary:active {
    background: var(--sk-brand-dark, var(--c25-brand-dark, #127023)) !important; /* ФТЗ */
    background-color: var(--sk-brand-dark, var(--c25-brand-dark, #127023)) !important;
    border-color: var(--sk-brand-dark, var(--c25-brand-dark, #127023)) !important;
    color: #fff !important;
}

.sk-models-page__products .sk-catalog-slider-c25 [data-sk-slc25-nav] svg,
.sk-models-page__products .sk-catalog-slider-c25 [data-sk-slc25-nav] .uk-icon,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-slidenav-previous svg,
.sk-models-page__products .sk-catalog-slider-c25 a.uk-slidenav-next svg,
.sk-models-page__products .sk-catalog-slider-c25 [uk-slidenav-previous] svg,
.sk-models-page__products .sk-catalog-slider-c25 [uk-slidenav-next] svg {
    color: #fff !important;
    fill: none !important;
}

.sk-models-page__products .sk-catalog-slider-c25 [data-sk-slc25-nav] [stroke],
.sk-models-page__products .sk-catalog-slider-c25 a.uk-slidenav-previous [stroke],
.sk-models-page__products .sk-catalog-slider-c25 a.uk-slidenav-next [stroke],
.sk-models-page__products .sk-catalog-slider-c25 [uk-slidenav-previous] [stroke],
.sk-models-page__products .sk-catalog-slider-c25 [uk-slidenav-next] [stroke] {
    stroke: currentColor !important;
    fill: none !important;
}

/* Новости: desktop 4 / tablet 3 / mobile 2 — не .sk-learn-news-slider */
.sk-models-page__news .articles__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)); /* desktop */
    gap: var(--sk-news-gap, 12px);
    max-width: none;
    margin: 0;
    width: 100%;
    align-items: start;
}

.sk-models-page__news .articles__list.flex-container {
    display: grid;
}

/* Tablet 769–1199: 3 в ряд (как #catalogSection.sk-catalog-grid-c25) */
@media (min-width: 769px) and (max-width: 1199px) {
    .sk-models-page .sk-models-page__grid.articles__list,
    .sk-models-page .articles__list.sk-models-page__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .sk-models-page__layout {
        grid-template-columns: 200px minmax(0, 1fr);
        gap: 18px;
    }

    .sk-models-page__news .articles__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .sk-models-page__title {
        font-size: 26px;
    }

    .sk-models-page__filter-toggle {
        display: inline-flex;
    }

    .sk-models-page__layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .sk-models-page__aside {
        display: none;
        position: static;
    }

    .sk-models-page.is-filter-open .sk-models-page__aside {
        display: block;
    }

    /* Fallback 2 col; 1/2 — sk_catalog_mobile_cols.css + html[data-sk-catalog-mcols] */
    .sk-models-page .sk-models-page__grid.articles__list,
    .sk-models-page .articles__list.sk-models-page__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .sk-models-page__news .articles__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
