/*
 * Каталог. Построен на переменных шаблона сайта (--color--red, --color--black,
 * --transition--main), поэтому подхватывает айдентику, а не спорит с ней.
 * Свои переменные с префиксом --cat, чтобы ничего не переопределить случайно.
 *
 * Каждый селектор начинается с .cat не для красоты: у шаблона правила вида
 * `body .wrapper form { flex-direction: column }`, и без этой добавки они
 * перебивают наши по специфичности — строка поиска складывается в столбик.
 */

.cat {
    --cat-gap: 24px;
    --cat-line: #E6E6E6;
    --cat-ink: var(--color--black, #222323);
    --cat-muted: var(--color--dark-gray, #606060);
    --cat-faint: var(--color--dark-gray-two, #9A9A9A);
    --cat-accent: var(--color--red, #B93932);
    --cat-deep: #244D58;
    --cat-wash: #F4F4F3;
    /*
     * Подложка под фотографией — белая, а не серая, как у остальных плашек.
     * Источники снимают на белом, и на серой подложке кадр читался белым
     * прямоугольником: у витой колонки, у любого предмета непрямоугольной
     * формы. Обрезка поля убирает, но углы кадра всё равно белые.
     * Сверху и снизу от фотографии есть линии, отделять её фоном не нужно.
     */
    --cat-photo: #FFFFFF;
    --cat-radius: 4px;
    --cat-ease: 0.3s ease 0s;

    color: var(--cat-ink);
    padding-bottom: 120px;
}

.cat *,
.cat *::before,
.cat *::after {
    box-sizing: border-box;
}

/* ─────────────────────────── шапка раздела ─────────────────────────── */

.cat .cat-head {
    padding: 8px 0 40px;
}

.cat .cat-head__top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.cat .cat-title {
    margin: 0;
    font-size: clamp(38px, 6.2vw, 104px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    font-weight: 700;
}

.cat .cat-title--sm {
    font-size: clamp(30px, 3.6vw, 60px);
}

/* Счётчик у заголовка: мелкой цифрой сверху, как нумерация ценностей на главной */
.cat .cat-count {
    font-size: clamp(13px, 1vw, 16px);
    color: var(--cat-faint);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    padding-bottom: 10px;
}

.cat .cat-lead {
    max-width: 62ch;
    margin: 20px 0 0;
    font-size: clamp(15px, 1.15vw, 19px);
    line-height: 1.5;
    color: var(--cat-muted);
}

/* ─────────────────────────── поиск ─────────────────────────── */

.cat .cat-search {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
    margin-top: 36px;
    max-width: 980px;
}

.cat .cat-search__field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.cat .cat-search input {
    width: 100%;
    height: 56px;
    padding: 0 18px 0 46px;
    font-family: inherit;
    font-size: 16px;
    color: var(--cat-ink);
    background: #fff;
    border: 1px solid var(--cat-line);
    border-radius: var(--cat-radius);
    outline: none;
    transition: border-color var(--cat-ease), box-shadow var(--cat-ease);
}

.cat .cat-search input:focus {
    border-color: var(--cat-ink);
    box-shadow: 0 0 0 3px rgba(34, 35, 35, 0.06);
}

.cat .cat-search__icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--cat-faint);
    fill: none;
    stroke-width: 1.6;
    pointer-events: none;
}

.cat .cat-search button {
    height: 56px;
    padding: 0 40px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    background: var(--cat-accent);
    border: 0;
    border-radius: 100px;
    cursor: pointer;
    transition: background var(--cat-ease), transform var(--cat-ease);
}

.cat .cat-search button:hover {
    background: #9e2f29;
    transform: translateY(-1px);
}

/* ─────────────────────────── плитки разделов ─────────────────────────── */

.cat .cat-sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--cat-gap);
}

.cat .cat-section {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--cat-line);
    border-radius: var(--cat-radius);
    text-decoration: none;
    color: var(--cat-ink);
    transition: border-color var(--cat-ease), transform var(--cat-ease), box-shadow var(--cat-ease);
}

.cat .cat-section:hover {
    border-color: var(--cat-ink);
    transform: translateY(-4px);
    box-shadow: 0 22px 46px -30px rgba(0, 0, 0, 0.55);
}

/*
 * Обложка — фотография товара из раздела. Именно contain на светлой
 * подложке: это студийные снимки железа, а не сюжетные кадры, и кроп
 * во всю плитку отрезал бы у экрана половину.
 */
.cat .cat-section__media {
    aspect-ratio: 16 / 10;
    background: var(--cat-photo);
    overflow: hidden;
}

.cat .cat-section__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 26px;
    transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cat .cat-section:hover .cat-section__media img {
    transform: scale(1.05);
}

.cat .cat-section__body {
    padding: 24px 26px 28px;
    border-top: 1px solid var(--cat-line);
}

.cat .cat-section__title {
    font-size: clamp(16px, 1.3vw, 22px);
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.cat .cat-section__meta {
    margin-top: 9px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--cat-faint);
}

/* Стрелка ↗ — тот же жест, что на плитках решений главной */
.cat .cat-arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 34px;
    height: 34px;
    stroke: var(--cat-ink);
    stroke-width: 2.6;
    fill: none;
    opacity: 0;
    transform: translate(-6px, 6px);
    transition: opacity var(--cat-ease), transform var(--cat-ease);
}

.cat .cat-section:hover .cat-arrow,
.cat .cat-brand:hover .cat-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* Раздел, которого ещё нет: плитка на месте, но серая и без ссылки */
.cat .cat-section--soon {
    pointer-events: none;
    background: var(--cat-wash);
    border-style: dashed;
}

.cat .cat-section--soon .cat-section__body {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    height: 100%;
    border-top-color: transparent;
}

.cat .cat-section--soon .cat-section__title {
    color: var(--cat-muted);
}

.cat .cat-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cat-muted);
    background: #fff;
    border-radius: 100px;
}

/* ─────────────────────────── плитки брендов ─────────────────────────── */

/*
 * Сетка брендов подстраивается под их число, иначе пятая плитка висит
 * одна в пустом ряду. Двенадцать колонок делятся и на 2, 3, 4 и 6 —
 * поэтому раскладка задаётся не числом колонок, а шириной плитки.
 */
.cat .cat-brands {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--cat-gap);
    margin-top: 8px;
}

.cat .cat-brands > * { grid-column: span 3; }

/* Три в ряд */
.cat .cat-brands[data-count="3"] > *,
.cat .cat-brands[data-count="6"] > * { grid-column: span 4; }

/* Два в ряд */
.cat .cat-brands[data-count="2"] > * { grid-column: span 6; }

/* Пять: три сверху, две снизу во всю ширину — ряды выходят ровными */
.cat .cat-brands[data-count="5"] > * { grid-column: span 4; }
.cat .cat-brands[data-count="5"] > *:nth-child(4),
.cat .cat-brands[data-count="5"] > *:nth-child(5) { grid-column: span 6; }

/* Семь, восемь, десять и больше — обычная сетка по четыре */
.cat .cat-brands[data-count="7"] > *,
.cat .cat-brands[data-count="8"] > *,
.cat .cat-brands[data-count="10"] > *,
.cat .cat-brands[data-count="11"] > *,
.cat .cat-brands[data-count="12"] > * { grid-column: span 3; }

/* Девять — три ряда по три, иначе девятая плитка висит одна */
.cat .cat-brands[data-count="9"] > * { grid-column: span 4; }

.cat .cat-brands[data-count="1"] > * { grid-column: span 12; }

@media (max-width: 1000px) {
    .cat .cat-brands > *,
    .cat .cat-brands[data-count="5"] > *,
    .cat .cat-brands[data-count="5"] > *:nth-child(4),
    .cat .cat-brands[data-count="5"] > *:nth-child(5) { grid-column: span 6; }
}

@media (max-width: 640px) {
    .cat .cat-brands > *,
    .cat .cat-brands[data-count="5"] > *,
    .cat .cat-brands[data-count="5"] > *:nth-child(4),
    .cat .cat-brands[data-count="5"] > *:nth-child(5) { grid-column: span 12; }
}

.cat .cat-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    padding: 28px 30px;
    background: #fff;
    border: 1px solid var(--cat-line);
    border-radius: var(--cat-radius);
    text-decoration: none;
    color: var(--cat-ink);
    overflow: hidden;
    transition: border-color var(--cat-ease), transform var(--cat-ease), box-shadow var(--cat-ease);
}

.cat .cat-brand:hover {
    border-color: var(--cat-ink);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.5);
}

.cat .cat-brand__name {
    position: relative;
    z-index: 1;
    /* Картинка лежит справа абсолютом. Без ограничения ширины длинное
       название в две строки заезжало прямо на неё. */
    max-width: 54%;
    /*
     * Потолок — 30, а не 34: на широкой плитке «SMARTPLAYER» в 34 px
     * не переносится и уезжает под картинку. Шрифт и ширина картинки
     * подобраны так, чтобы между ними оставался зазор даже на наведении,
     * когда картинка подрастает.
     */
    font-size: clamp(20px, 1.9vw, 30px);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.cat .cat-brand__meta {
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: var(--cat-faint);
    letter-spacing: 0.04em;
}

/*
 * Фото товара как подложка плитки бренда — логотипов у нас нет.
 * Края растворяем маской, а не режем: снимки сняты на разном фоне, и
 * ровный прямоугольник чужого серого фона выглядел бы браком вёрстки.
 */
.cat .cat-brand__ghost {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    /*
     * Меньше, чем кажется нужным, и намеренно. Кадры приходят разной формы:
     * вертикальный монитор, широкий скриншот интерфейса, роутер с антеннами.
     * При 46% ширины высокие из них дорастали до заголовка, а на наведении
     * ещё и наезжали на него.
     */
    width: 28%;
    max-height: 56%;
    object-fit: contain;
    object-position: right center;
    /* Маски-растворения тут больше нет: обложки выбираются только те, что
       сняты на белом, а на белой плитке они и так сливаются с фоном. С маской
       было хуже — на широких кадрах слева читался засвет, на узких его не было,
       и плитки выглядели по-разному. */
    transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cat .cat-brand:hover .cat-brand__ghost {
    /* Подрастает еле-еле: на 1,05 антенны и мониторы упирались в текст */
    transform: translateY(-50%) scale(1.03);
}

/*
 * Узкая плитка — четыре в ряд. Там названия вроде «ЛИЦЕНЗИИ SMARTPLAYER»
 * не помещаются в отведённые 56%: «SMARTPLAYER» не переносится и уезжает
 * под картинку. Меряем саму плитку, а не окно: в разных разделах в ряду
 * стоит от двух до четырёх плиток, и по ширине окна их не различить.
 */
.cat .cat-brand { container-type: inline-size; }

@container (max-width: 330px) {
    .cat .cat-brand__name { font-size: 18px; max-width: 60%; }
    .cat .cat-brand__ghost { width: 30%; max-height: 48%; right: 16px; }
}

.cat .cat-brand .cat-arrow {
    top: auto;
    bottom: 22px;
    right: 22px;
    width: 30px;
    height: 30px;
    stroke: var(--cat-ink);
    stroke-width: 2.4;
}

/* ─────────────────────────── переключатель indoor / outdoor ─────────────────────────── */

.cat .cat-usage {
    display: inline-flex;
    padding: 5px;
    margin: 32px 0 8px;
    background: var(--cat-wash);
    border-radius: 100px;
}

.cat .cat-usage button {
    padding: 12px 30px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cat-muted);
    background: transparent;
    border: 0;
    border-radius: 100px;
    cursor: pointer;
    transition: color var(--cat-ease), background var(--cat-ease);
}

.cat .cat-usage button[aria-pressed='true'] {
    color: #fff;
    background: var(--cat-ink);
}

/* ─────────────────────────── фильтры и выдача ─────────────────────────── */

.cat .cat-layout {
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    margin-top: 34px;
}

.cat .cat-filters {
    position: sticky;
    top: 24px;
    padding-right: 8px;
}

.cat .cat-filters__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--cat-line);
}

.cat .cat-filters__title {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cat .cat-reset {
    font-size: 13px;
    color: var(--cat-accent);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--cat-ease);
}

.cat .cat-reset.is-on {
    opacity: 1;
}

.cat .cat-filter {
    padding: 22px 0;
    border-bottom: 1px solid var(--cat-line);
}

.cat .cat-filter__name {
    margin-bottom: 14px;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cat-faint);
}

.cat .cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat .cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 13px;
    color: var(--cat-ink);
    background: #fff;
    border: 1px solid var(--cat-line);
    border-radius: 100px;
    cursor: pointer;
    transition: all var(--cat-ease);
}

.cat .cat-chip:hover {
    border-color: var(--cat-faint);
}

.cat .cat-chip[aria-pressed='true'] {
    color: #fff;
    background: var(--cat-ink);
    border-color: var(--cat-ink);
}

.cat .cat-chip__n {
    font-size: 11px;
    color: var(--cat-faint);
}

.cat .cat-chip[aria-pressed='true'] .cat-chip__n {
    color: rgba(255, 255, 255, 0.6);
}

/* Значение, которого нет ни у одной позиции при текущих фильтрах */
.cat .cat-chip[disabled] {
    opacity: 0.35;
    cursor: default;
}

.cat .cat-results__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.cat .cat-shown {
    font-size: 13px;
    color: var(--cat-faint);
    letter-spacing: 0.04em;
}

.cat .cat-sort {
    height: 40px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 13px;
    color: var(--cat-ink);
    background: #fff;
    border: 1px solid var(--cat-line);
    border-radius: var(--cat-radius);
    cursor: pointer;
}

.cat .cat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--cat-gap);
}

/* ─────────────────────────── карточка в сетке ─────────────────────────── */

.cat .cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--cat-line);
    border-radius: var(--cat-radius);
    text-decoration: none;
    color: var(--cat-ink);
    overflow: hidden;
    transition: border-color var(--cat-ease), transform var(--cat-ease), box-shadow var(--cat-ease);
}

.cat .cat-card:hover {
    border-color: var(--cat-ink);
    transform: translateY(-4px);
    box-shadow: 0 22px 44px -30px rgba(0, 0, 0, 0.55);
}

.cat .cat-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--cat-photo);
    overflow: hidden;
}

/*
 * Кадры лежат стопкой друг на друге: на наведении курсор водит по ширине
 * карточки и переключает их, как в интернет-магазинах. Поэтому не в потоке,
 * а абсолютом — иначе второй кадр сдвинул бы карточку.
 */
.cat .cat-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18px;
    opacity: 0;
    transition: opacity 0.16s linear, transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cat .cat-card__media img.is-on {
    opacity: 1;
}

.cat .cat-card:hover .cat-card__media img {
    transform: scale(1.045);
}

/* Полоски-указатели: сколько кадров и который сейчас. Видны только на наведении. */
.cat .cat-card__dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.cat .cat-card:hover .cat-card__dots {
    opacity: 1;
}

.cat .cat-card__dot {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: rgba(36, 77, 88, 0.22);
    transition: background 0.16s linear;
}

.cat .cat-card__dot.is-on {
    background: var(--cat-ink, #244d58);
}

@media (hover: none) {
    /* На тач-экранах курсора нет — полоски только мешали бы. */
    .cat .cat-card__dots { display: none; }
}

.cat .cat-card__brand {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cat-faint);
}

.cat .cat-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 20px 22px 24px;
    border-top: 1px solid var(--cat-line);
}

.cat .cat-card__name {
    font-size: 15px;
    line-height: 1.35;
    font-weight: 500;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat .cat-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.cat .cat-spec {
    padding: 5px 10px;
    font-size: 12px;
    color: var(--cat-muted);
    background: var(--cat-wash);
    border-radius: 100px;
    white-space: nowrap;
}

.cat .cat-card__foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 18px;
}

.cat .cat-price {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.cat .cat-price--ask {
    font-size: 14px;
    font-weight: 400;
    color: var(--cat-faint);
}

.cat .cat-card__more {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cat-accent);
    opacity: 0;
    transform: translateX(-4px);
    transition: all var(--cat-ease);
}

.cat .cat-card:hover .cat-card__more {
    opacity: 1;
    transform: translateX(0);
}

.cat .cat-empty {
    padding: 70px 0;
    text-align: center;
    color: var(--cat-faint);
}

/*
 * `display: block` перебивает атрибут hidden — у него специфичность нулевая.
 * Без этой строки кнопка оставалась видимой и нажималась, когда показывать
 * уже нечего.
 */
.cat .cat-more[hidden] { display: none; }

.cat .cat-more {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 40px auto 0;
    padding: 16px;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cat-ink);
    background: #fff;
    border: 1px solid var(--cat-ink);
    border-radius: 100px;
    cursor: pointer;
    transition: all var(--cat-ease);
}

.cat .cat-more:hover {
    color: #fff;
    background: var(--cat-ink);
}

/* ─────────────────────────── страница товара ─────────────────────────── */

.cat .cat-product {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

.cat .cat-gallery__main {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--cat-photo);
    border-radius: var(--cat-radius);
    overflow: hidden;
}

.cat .cat-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 40px;
}

/*
 * Стрелки листания. Лежат поверх кадра по краям, проявляются на наведении —
 * чтобы в покое не спорили с фотографией. На тач-экранах наведения нет,
 * поэтому там они видны всегда.
 */
.cat .cat-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--cat-ink);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--cat-line);
    border-radius: 50%;
    box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--cat-ease), background var(--cat-ease), transform var(--cat-ease);
}

.cat .cat-gallery__nav svg {
    width: 20px;
    height: 20px;
}

.cat .cat-gallery__nav--prev { left: 14px; }
.cat .cat-gallery__nav--next { right: 14px; }
.cat .cat-gallery__nav--next svg { transform: rotate(180deg); }

.cat .cat-gallery:hover .cat-gallery__nav,
.cat .cat-gallery__nav:focus-visible {
    opacity: 1;
}

.cat .cat-gallery__nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.06);
}

@media (hover: none) {
    .cat .cat-gallery__nav { opacity: 1; }
}

.cat .cat-gallery__thumbs {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.cat .cat-thumb {
    width: 88px;
    height: 70px;
    padding: 6px;
    background: var(--cat-photo);
    border: 1px solid transparent;
    border-radius: var(--cat-radius);
    cursor: pointer;
    transition: border-color var(--cat-ease);
}

.cat .cat-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cat .cat-thumb[aria-pressed='true'] {
    border-color: var(--cat-ink);
}

.cat .cat-product__brand {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cat-faint);
}

.cat .cat-product__brand a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--cat-line);
}

.cat .cat-product__brand a:hover {
    color: var(--cat-ink);
}

.cat .cat-product h1 {
    margin: 14px 0 0;
    font-size: clamp(24px, 2.4vw, 38px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.cat .cat-product__sku {
    margin-top: 12px;
    font-size: 13px;
    color: var(--cat-faint);
}

.cat .cat-buy {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    margin: 28px 0 0;
    padding: 24px 0;
    border-top: 1px solid var(--cat-line);
    border-bottom: 1px solid var(--cat-line);
}

.cat .cat-buy .cat-price {
    font-size: clamp(26px, 2.4vw, 36px);
}

.cat .cat-cta {
    padding: 17px 44px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    background: var(--cat-accent);
    border: 0;
    border-radius: 100px;
    cursor: pointer;
    transition: background var(--cat-ease), transform var(--cat-ease);
}

.cat .cat-cta:hover {
    background: #9e2f29;
    transform: translateY(-2px);
}

.cat .cat-key {
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.cat .cat-key li {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 13px 0;
    border-bottom: 1px dashed var(--cat-line);
    font-size: 15px;
}

.cat .cat-key dt,
.cat .cat-key span:first-child {
    color: var(--cat-muted);
}

.cat .cat-key span:last-child {
    font-weight: 500;
    text-align: right;
}

.cat .cat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cat-ink);
    background: none;
    border: 0;
    cursor: pointer;
}

.cat .cat-toggle::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform var(--cat-ease);
}

.cat .cat-toggle[aria-expanded='true']::after {
    transform: rotate(-135deg) translate(-2px, -2px);
}

/*
 * Обёртка таблицы характеристик: её высоту и разгоняет скрипт.
 * Анимировать саму таблицу нельзя — у table высота живёт по своим
 * правилам, и в половине браузеров переход просто не запускается.
 */
.cat .cat-fold {
    overflow: hidden;
}

.cat .cat-table {
    width: 100%;
    margin-top: 18px;
    border-collapse: collapse;
    font-size: 14px;
}

.cat .cat-table tr:nth-child(odd) {
    background: var(--cat-wash);
}

.cat .cat-table td {
    padding: 12px 16px;
    vertical-align: top;
}

.cat .cat-table td:first-child {
    color: var(--cat-muted);
    width: 46%;
}

.cat .cat-descr {
    margin-top: 40px;
    max-width: 74ch;
    font-size: 16px;
    line-height: 1.6;
    color: var(--cat-muted);
}

.cat .cat-descr h2 {
    margin: 0 0 14px;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cat-ink);
}

/* ─────────────────────────── появление при прокрутке ─────────────────────────── */

.cat .cat-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cat .cat-reveal.is-in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .cat .cat-reveal,
.cat .cat-card,
.cat .cat-brand,
.cat .cat-section__media img {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ─────────────────────────── узкие экраны ─────────────────────────── */

@media (max-width: 1280px) {
    .cat .cat-layout { grid-template-columns: 248px minmax(0, 1fr); gap: 32px; }
    .cat .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    .cat .cat-sections { grid-template-columns: repeat(2, 1fr); }
    .cat .cat-product { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 860px) {
    .cat { padding-bottom: 70px; }

    /* Фильтры на телефоне — раскрывающейся панелью, а не колонкой сбоку */
    .cat .cat-layout { grid-template-columns: 1fr; gap: 0; }
    .cat .cat-filters {
        position: static;
        margin-bottom: 26px;
        padding: 0 0 8px;
    }
    .cat .cat-filters__body { display: none; }
    .cat .cat-filters.is-open .cat-filters__body { display: block; }

    /* Заголовок панели превращается в кнопку — со стрелкой, иначе неочевидно,
       что по нему нужно нажать. */
    .cat .cat-filters__head {
        cursor: pointer;
        align-items: center;
        padding: 16px 18px;
        border: 1px solid var(--cat-line);
        border-radius: var(--cat-radius);
    }
    .cat .cat-filters__title::after {
        content: '';
        display: inline-block;
        width: 7px;
        height: 7px;
        margin-left: 12px;
        border-right: 1.5px solid var(--cat-faint);
        border-bottom: 1.5px solid var(--cat-faint);
        transform: rotate(45deg) translate(-2px, -2px);
        transition: transform var(--cat-ease);
    }
    .cat .cat-filters.is-open .cat-filters__title::after {
        transform: rotate(-135deg) translate(-2px, -2px);
    }
    .cat .cat-filters.is-open .cat-filters__head {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    .cat .cat-filters.is-open .cat-filters__body {
        padding: 0 18px 8px;
        border: 1px solid var(--cat-line);
        border-top: 0;
        border-radius: 0 0 var(--cat-radius) var(--cat-radius);
    }
}

@media (max-width: 620px) {
    .cat .cat-sections { grid-template-columns: 1fr; }

    /* Переключатель indoor/outdoor в три кнопки в строку не влезает */
    .cat .cat-usage {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }
    .cat .cat-usage button {
        padding: 12px 6px;
        font-size: 11px;
        letter-spacing: 0.06em;
    }
    .cat .cat-grid { grid-template-columns: 1fr; }
    .cat .cat-search { flex-wrap: wrap; }
    .cat .cat-search button { width: 100%; }
    .cat .cat-section__media { aspect-ratio: 16 / 9; }
}

/* ─────────────────────────── модалка заявки на товар ───────────────────────────
 *
 * Разметка модалки в шаблоне сайта есть, а стилей к ней нет ни в одном из
 * бандлов — ни на копии, ни на боевом promedia.moscow. Она просто никогда
 * не открывалась: открывать её было некому, каталог пустой. Оформляем.
 *
 * Селекторы без префикса .cat: модалка лежит в <main> рядом с каталогом,
 * а не внутри него. Показ управляется инлайновым display, поэтому центруем
 * не флексом, а полями — иначе inline-стиль перебьёт раскладку.
 */

#orderModal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow-y: auto;
    background: rgba(20, 22, 22, 0.62);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#orderModal.show {
    opacity: 1;
}

#orderModal .modal-content {
    position: relative;
    width: calc(100% - 32px);
    max-width: 520px;
    margin: 7vh auto 40px;
    padding: 46px 44px 40px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.6);
    transform: translateY(14px);
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#orderModal.show .modal-content {
    transform: none;
}

#orderModal .close {
    position: absolute;
    top: 16px;
    right: 22px;
    font-size: 30px;
    line-height: 1;
    color: #9A9A9A;
    cursor: pointer;
    transition: color 0.3s ease;
}

#orderModal .close:hover {
    color: #222323;
}

#orderModal form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#orderModal .h3 {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

#orderModal .form-group input[type='text'] {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    font-family: inherit;
    font-size: 15px;
    color: #222323;
    background: #fff;
    border: 1px solid #E6E6E6;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s ease;
}

#orderModal .form-group input[type='text']:focus {
    border-color: #222323;
}

#orderModal .error {
    color: #B93932;
    font-size: 13px;
}

#orderModal .error:empty {
    display: none;
}

#orderModal .submit__container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
}

#orderModal .submit__container .h3 {
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.14em;
}

/*
 * Кнопку отправки не трогаем: у шаблона для .main-button уже есть красная
 * пилюля с белой стрелкой и паддингом 19×40. Своя ширина 54px обнуляла
 * содержимое — при border-box она меньше одних только паддингов.
 */

@media (max-width: 620px) {
    #orderModal .modal-content {
        margin: 4vh auto 24px;
        padding: 38px 22px 30px;
    }
}

/* ─────────────────────────── плитки на главной ───────────────────────────
 *
 * Блок «Оборудование» на главной: раньше четыре картинки из папки шаблона
 * со ссылкой в решётку. Теперь это живые товары, но верстка остаётся
 * прежней — слайдами swiper, иначе на телефоне сломается карусель.
 * Без префикса .cat: главная не наша страница, она из копии.
 */

.equipment-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    background: #F4F4F3;
    text-decoration: none;
}

.equipment-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8%;
    transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.equipment-card:hover img {
    transform: scale(1.05);
}

/*
 * Подпись плитки — только бренд. Название товара отсюда убрано: две строки
 * поверх фотографии читались плохо, а на плитке всё равно видно, что это
 * за железо. Градиент остался — без него белые буквы теряются на светлом
 * кадре, а плитка светлая.
 */
.equipment-card__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 34px 20px 16px;
    background: linear-gradient(180deg, rgba(20, 22, 22, 0) 0%, rgba(20, 22, 22, 0.72) 68%);
}

.equipment-card__label b {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
}
