/* ═══════════════════════════════════════════════════════════════════════════════
 * STROM Trade — витрина каталога на /shop/ (inc/strom-shop-index.php)
 * Макет заказчика от 03.09.2026.
 *
 * Экран собран из трёх частей разного строения: первый экран с предметной
 * композицией, bento из шести карточек и полоса фактов. Карточки НЕ одинаковые:
 * первый ряд разбит 1-1-2, второй — на три равные, две карточки из шести тёмные.
 * Ровный ковёр из шести одинаковых плиток читался бы как список, а не как витрина.
 * ══════════════════════════════════════════════════════════════════════════════ */

.strom-shop-index .strom-toolbar,
.strom-shop-index .wd-shop-tools {
	display: none;
}

/*
 * Верхнего поля у <main> на витрине нет: первый экран начинается сразу под шапкой,
 * и открывают его крошки. Тема даёт обоим полям `.wd-content-layout
 * { padding-block: 40px }` весом (0,1,0); класс тела перебивает его без !important.
 * Нижнее поле снимает такое же правило ниже, у цоколя .shx__cap.
 */
body.strom-shop-index .wd-content-layout {
	padding-top: 0;
}

/*
 * Контейнер крошек и заголовка макета `shop_archive` на витрине пуст: заголовок мы
 * гасим (свой H1 в первом экране), крошки уносим внутрь первого экрана. Пустым он
 * всё равно держал минусовой верхний отступ -20px и 20px снизу, поэтому снимаем
 * целиком. Контейнеры Elementor приходят из кэша готовым HTML — только CSS.
 *
 * Селектор без id элемента: id макета и его контейнеров на проде и локали расходятся,
 * а «первый контейнер, внутри которого лежат крошки» — устойчивое описание.
 */
body.strom-shop-index .elementor > .e-con:has(.wd-el-breadcrumbs) {
	display: none;
}

/* Полоса акции стоит последним блоком витрины — нижний отступ ей уже не нужен. */
.shx .spr--listing {
	margin-bottom: 0;
}

/*
 * Поле страницы белое: карточки светло-серые, и на сером фоне темы они переставали
 * читаться как отдельные плашки.
 *
 * Серый ставит правило темы `.woodmart-archive-shop:not(.single-product) .wd-page-content`
 * весом (0,3,0) — на теле страницы, а не на .shx. Своё правило поэтому вешаем на два
 * класса тела сразу: (0,3,1) перебивает тему, и делать это через !important не нужно.
 */
body.strom-shop-index.woodmart-archive-shop .wd-page-content,
body.strom-shop-index.woodmart-archive-shop .wd-page-wrapper,
body.strom-shop-index.woodmart-archive-shop .wd-content-area,
body.strom-shop-index {
	background-color: #fff;
}

.shx {
	--shx-green: #0e7e50;
	--shx-ink: #14181a;
	--shx-dim: #6f756f;
	--shx-line: rgba(35, 38, 36, .13);
	--shx-ground: #f2f2f2;
	--shx-dark: #17281f;
	--shx-mono: "Plex Mono", "Plex Sans", ui-monospace, SFMono-Regular, Menlo, monospace;

	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0 0 10px;
}

/* ══ Первый экран ═════════════════════════════════════════════════════════════ */

.shx-hero {
	display: grid;
	grid-template-columns: minmax(0, 30%) minmax(0, 1fr);
	align-items: center;
	column-gap: 24px;
	row-gap: 12px;
	padding: 18px 0 10px;
}

/*
 * Крошки — первая строка первого экрана, на всю его ширину: они открывают страницу
 * и не должны уезжать в колонку с текстом, которая выровнена по центру кадра.
 *
 * Разметку даёт виджет темы (`nav.wd-breadcrumbs`), поэтому разделители, цвета и
 * наведение приходят из base.min.css сами. Классов обёртки виджета
 * (`wd-el-breadcrumbs wd-nowrap-md`) здесь намеренно НЕТ: они включают
 * горизонтальную прокрутку и `direction: rtl` — в первом экране это лишнее.
 * Кегль 13px и невыделенное последнее звено — как в блоке крошек остальных
 * страниц (assets/css/breadcrumbs.css, решение заказчика 03.09.2026).
 */
.shx-hero__crumbs {
	grid-column: 1 / -1;
}

.shx-hero__crumbs .wd-breadcrumbs {
	font-size: 13px;
	line-height: 1.5;
}

.shx-hero__crumbs .wd-breadcrumbs .wd-last,
.shx-hero__crumbs .wd-breadcrumbs .wd-last-link {
	font-weight: 400;
}

.shx-hero__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
}

.shx-hero__kicker {
	font-family: var(--shx-mono);
	font-size: .68rem;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--shx-dim);
}

.shx-hero__title {
	margin: 0;
	font-size: clamp(2.4rem, 4.2vw, 3.6rem);
	font-weight: 700;
	letter-spacing: -.035em;
	line-height: 1;
	color: var(--shx-ink);
}

.shx-hero__lead {
	margin: 0;
	max-width: 24em;
	font-size: .86rem;
	line-height: 1.5;
	color: var(--shx-dim);
}

.shx-hero__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 6px;
	padding: 14px 26px;
	border-radius: 100px;
	background: var(--shx-green);
	color: #fff;
	font-size: .92rem;
	font-weight: 600;
	transition: background-color .2s ease;
}

.shx-hero__btn:hover,
.shx-hero__btn:focus {
	background: #0a5738;
	color: #fff;
}

.shx-hero__note {
	max-width: 24em;
	font-size: .72rem;
	line-height: 1.45;
	color: var(--shx-dim);
}

/*
 * Кадр композиции снят на белом и встаёт встык с полем страницы: рамки и заливки
 * ему не нужны, иначе появится видимый прямоугольник вокруг предметов.
 *
 * Пропорции приходят инлайном из метаданных файла (strom_shop_index_hero()), здесь
 * только резерв на случай, если метаданных нет: 16/9 — формат нынешнего кадра.
 * Рамка ОБЯЗАНА совпадать с файлом: при `object-fit: cover` расхождение срезает края.
 */
.shx-hero__pic {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.shx-hero__pic .shx-hero__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* ══ Bento ════════════════════════════════════════════════════════════════════ */

/*
 * Разбивка с макета: в первом ряду третья карточка вдвое шире первых двух,
 * второй ряд — три равные. Ряды намеренно разной разбивки, иначе сетка снова
 * станет ровным ковром.
 */
.shx__grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 14px;
}

.shx__card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 286px;
	padding: 24px 26px 24px;
	overflow: hidden;
	border-radius: 12px;
	background: var(--shx-ground);
	color: var(--shx-ink);
}

.shx__card:nth-child(1),
.shx__card:nth-child(2) { grid-column: span 3; }
.shx__card:nth-child(3) { grid-column: span 6; }
.shx__card:nth-child(4),
.shx__card:nth-child(5),
.shx__card:nth-child(6) { grid-column: span 4; }

.shx__card--dark {
	background: var(--shx-dark);
	color: #fff;
}


/* Ссылка-плашка поверх карточки; чипы подразделов лежат выше и остаются кликаемыми. */
.shx__go {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.shx__num {
	position: relative;
	z-index: 3;
	pointer-events: none;
	font-size: 3.2rem;
	font-weight: 700;
	letter-spacing: -.05em;
	line-height: .88;
	color: var(--shx-green);
}

.shx__card--dark .shx__num {
	color: #2c7d55;
}

/*
 * Цвет заголовку задаём явно: у темы есть собственное правило на h2, и оно бьёт
 * цвет, унаследованный от карточки, — на тёмных карточках название пропадало.
 */
.shx__card .shx__name {
	position: relative;
	z-index: 3;
	margin: 16px 0 0;
	max-width: 9em;
	font-size: 1.32rem;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.16;
	color: var(--shx-ink);
	pointer-events: none;
}

.shx__card--dark .shx__name {
	color: #fff;
}

.shx__count {
	position: relative;
	z-index: 3;
	margin-top: 8px;
	font-size: .8rem;
	color: var(--shx-green);
	pointer-events: none;
}

.shx__card--dark .shx__count {
	color: #6fb894;
}

/* ── Кадр: три способа входа в карточку ─────────────────────────────────────── */

.shx__media {
	position: absolute;
	z-index: 1;
	display: block;
	overflow: hidden;
}

.shx__media .shx__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * full — кадр занимает карточку целиком, текст идёт поверх. Кадры под этот режим сняты
 * так, что верх у них пустой и одного тона с плашкой: ни маска, ни затемнение не нужны,
 * иначе гасится сам предмет.
 */
.shx__card--full .shx__media {
	inset: 0;
}

.shx__card--full .shx__name {
	max-width: 12em;
}

/* Название решётчатых настилов ставим в три строки — по ширине колонки, а не переносом. */
.shx__card:nth-child(5) .shx__name {
	max-width: 8em;
}

/*
 * cover — кадр полосой справа. Левый край растворяем маской, а не заливкой: заливка
 * поверх фото гасит и само фото, а маска отдаёт пиксели фону карточки, и тёмная
 * карточка остаётся тёмной ровно там, где по ней идёт текст.
 */
.shx__card--cover .shx__media {
	top: 0;
	right: 0;
	bottom: 0;
	width: 58%;
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 26%);
	mask-image: linear-gradient(to right, transparent 0, #000 26%);
}

.shx__card--cover .shx__count,
.shx__card--cover .shx__subs,
.shx__card--cover .shx__more { max-width: 46%; }

.shx__card--cover .shx__name { max-width: 11em; }

/* ── Подразделы ─────────────────────────────────────────────────────────────── */

.shx__subs {
	position: relative;
	z-index: 3;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: auto;
	padding-top: 18px;
}

.shx__sub {
	padding: 5px 12px;
	border: 1px solid var(--shx-line);
	border-radius: 100px;
	background: rgba(255, 255, 255, .92);
	color: #3e3e3e;
	font-size: .74rem;
	line-height: 1.25;
	white-space: nowrap;
}

.shx__sub:hover {
	border-color: var(--shx-green);
	color: var(--shx-green);
}

.shx__card--dark .shx__sub {
	border-color: rgba(255, 255, 255, .22);
	background: rgba(255, 255, 255, .08);
	color: #e7ece9;
}

.shx__card--dark .shx__sub:hover {
	border-color: #7fc4a1;
	background: rgba(255, 255, 255, .16);
	color: #fff;
}

.shx__more {
	position: relative;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 12px;
	color: var(--shx-green);
	font-size: .8rem;
	font-weight: 500;
}

.shx__card--dark .shx__more {
	color: #7fc4a1;
}

.shx__more:hover {
	gap: 11px;
}

/*
 * У карточки с нижним кадром строка «Ещё N разделов» попадает на фото и тонет в нём:
 * даём ей ту же белую плашку, что и чипам рядом.
 */
.shx__card--bottom .shx__more {
	align-self: flex-start;
	margin-top: 8px;
	padding: 5px 12px;
	border: 1px solid var(--shx-line);
	border-radius: 100px;
	background: rgba(255, 255, 255, .92);
}

/* Круглая стрелка — там, где подразделов нет и низ карточки пустует. */
.shx__arrow {
	position: absolute;
	z-index: 3;
	right: 22px;
	bottom: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	border: 1px solid var(--shx-line);
	border-radius: 50%;
	background: #fff;
	color: var(--shx-ink);
	font-size: .95rem;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
	pointer-events: none;
}

/* У бокового кадра стрелка встаёт вплотную к его кромке: поверх фото она теряется. */
.shx__card--cover .shx__arrow { right: calc(58% + 16px); }

.shx__card--dark .shx__arrow {
	border-color: rgba(255, 255, 255, .34);
	background: transparent;
	color: #fff;
}

.shx__card:hover .shx__arrow {
	background: var(--shx-green);
	border-color: var(--shx-green);
	color: #fff;
	transform: translateX(3px);
}

/* Карточка с подразделами: стрелку прячем, её роль играет «Ещё N разделов». */
.shx__card:has(.shx__more) .shx__arrow,
.shx__card:has(.shx__subs) .shx__arrow {
	display: none;
}

/* ── Слот под кадр, которого ещё нет ────────────────────────────────────────── */

.shx__slot {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	overflow: auto;
	background: repeating-linear-gradient(135deg, #eef1ef 0 10px, #e7ebe8 10px 20px);
	color: #5c635c;
	font-size: .72rem;
	line-height: 1.45;
}

.shx__slot b {
	align-self: flex-start;
	padding: 4px 9px;
	border-radius: 4px;
	background: var(--shx-ink);
	color: #fff;
	font-family: var(--shx-mono);
	font-size: .62rem;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
}

/* ══ Завершающий цоколь ═══════════════════════════════════════════════════════ */

/*
 * Копия цоколя со страницы «О компании» (.sa-proof::after): тонкая фирменная линия
 * и спокойный тинт, без текста и механики. Там секции сами во всю ширину экрана,
 * здесь витрина лежит в контейнере — поэтому цоколь выпускаем за его поля.
 *
 * `overflow-x: clip` на теле страницы — против второго скроллбара от 100vw (ширина
 * вьюпорта считается вместе с полосой прокрутки). Именно clip, а не hidden: он режет
 * так же, но скроллпорт не создаёт и ничего не ломает у потомков.
 */
body.strom-shop-index {
	overflow-x: clip;
}

.shx__cap {
	width: 100vw;
	max-width: 100vw;
	height: 28px;
	margin: 54px calc(50% - 50vw) 0;
	background: linear-gradient(to bottom, var(--shx-green) 0 3px, #f1f7f3 3px 100%);
}

/*
 * Цоколь — край страницы, он обязан примыкать к футеру. Между ними стоят 110px чужих
 * отступов: нижнее поле контейнера темы, отбивка Elementor-секций и собственное поле
 * витрины. На этой странице снимаем их.
 *
 * Секций .wd-negative-gap в макете ДВЕ (вторая пустая, высотой 0), поэтому их отбивка
 * складывается: 10px здесь дают 20px до футера — ровно столько же, сколько на «О компании».
 */
body.strom-shop-index .wd-content-layout {
	padding-bottom: 0;
}

body.strom-shop-index .wd-negative-gap {
	margin-bottom: 10px;
}

.strom-shop-index .shx {
	margin-bottom: 0;
}

/* ══ Полоса фактов ════════════════════════════════════════════════════════════ */

.shx-facts {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	align-items: center;
	gap: 20px;
	margin-top: 4px;
	padding: 24px 30px;
	border-radius: 12px;
	background: var(--shx-ground);
}

/*
 * Два строения в одной полосе: у пунктов со значком подпись стоит справа от него,
 * у числовых — под числом. Так число читается как число, а не как часть строки.
 */
.shx-facts__item--ico {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 2px 14px;
}

.shx-facts__item--num {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.shx-facts__ico {
	grid-row: span 2;
	color: var(--shx-ink);
	opacity: .6;
}

.shx-facts__big {
	font-size: 2.3rem;
	font-weight: 700;
	letter-spacing: -.04em;
	line-height: 1;
	color: var(--shx-ink);
}

.shx-facts__title {
	font-size: .82rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--shx-ink);
}

.shx-facts__item--ico .shx-facts__title,
.shx-facts__item--ico .shx-facts__note {
	grid-column: 2;
}

.shx-facts__note {
	font-size: .76rem;
	line-height: 1.3;
	color: var(--shx-dim);
}

.shx-facts__item--num .shx-facts__title {
	font-weight: 500;
	color: var(--shx-dim);
}

/* ══ Раскладка на узких экранах ═══════════════════════════════════════════════ */

@media (max-width: 1199px) {
	.shx__card:nth-child(n) {
		grid-column: span 6;
	}

	.shx-facts {
		grid-template-columns: repeat(3, 1fr);
		gap: 22px;
	}
}

@media (max-width: 1023px) {
	.shx-hero {
		grid-template-columns: 1fr;
		/* Одна колонка: row-gap работает и между крошками, и между текстом и кадром. */
		gap: 18px;
		padding-top: 14px;
	}
}

@media (max-width: 767px) {
	.shx__card:nth-child(n) {
		grid-column: span 12;
	}

	/* Кегль крошек до 767px — 11px, как на остальных страницах. */
	.shx-hero__crumbs .wd-breadcrumbs {
		font-size: 11px;
	}

	.shx-hero__crumbs .wd-breadcrumbs .wd-delimiter {
		margin-inline: 5px;
	}

	.shx__card {
		min-height: 250px;
		padding: 20px 20px 22px;
	}

	.shx__card--cover .shx__media {
		width: 48%;
	}

	.shx__card--cover .shx__name,
	.shx__card--cover .shx__count,
	.shx__card--cover .shx__subs,
	.shx__card--cover .shx__more {
		max-width: 54%;
	}

	.shx__num {
		font-size: 2.4rem;
	}

	.shx__card .shx__name {
		font-size: 1.16rem;
	}

	.shx-facts {
		grid-template-columns: repeat(2, 1fr);
		padding: 20px;
	}
}

@media (max-width: 479px) {
	.shx-facts {
		grid-template-columns: 1fr;
	}
}
