/**
 * CarbonWrap — дизайн-система и визуальная сборка (тема nsv_theme)
 * Подключается после all.css / media.css
 */

:root {
	--cw-max: 1180px;
	--cw-space-xs: 6px;
	--cw-space-sm: 12px;
	--cw-space-md: 18px;
	--cw-space-lg: 28px;
	--cw-space-xl: 40px;
	--cw-graphite: #14171d;
	--cw-ink: #1f2329;
	--cw-muted: #5a626d;
	--cw-line: #e1e6ed;
	--cw-line-strong: #cfd6e0;
	--cw-surface: #ffffff;
	--cw-surface-soft: #f4f6f9;
	--cw-page: #e9ecf1;
	--cw-purple: #51388c;
	--cw-purple-hover: #432f75;
	--cw-link: #2d6d97;
	--cw-radius-sm: 10px;
	--cw-radius-md: 14px;
	--cw-radius-lg: 18px;
	--cw-radius-xl: 22px;
	--cw-shadow-card: 0 20px 48px -36px rgba(15, 18, 28, 0.22);
	--cw-shadow-soft: 0 12px 28px -22px rgba(15, 18, 28, 0.18);
	--cw-shadow-header: 0 14px 40px -28px rgba(15, 18, 28, 0.18);
	--cw-font-title: robotoBold, system-ui, sans-serif;
	--cw-font-body: robotoRegular, system-ui, sans-serif;
}

html {
	scroll-padding-top: 140px;
}

.cw-body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.body {
	background: var(--cw-page);
}

.width-content {
	max-width: var(--cw-max);
	padding-left: clamp(12px, 3vw, 20px);
	padding-right: clamp(12px, 3vw, 20px);
}

/* ---------- Шапка: сетка desktop / mobile ---------- */
.cw-header__grid {
	display: grid;
	grid-template-columns: auto minmax(260px, 1fr) auto;
	grid-template-areas:
		"brand search tel"
		"nav nav nav";
	align-items: center;
	/* без column-gap: иначе между колонками «просвечивает» тёмный фон страницы — визуально как «полоска» у поиска */
	column-gap: 0;
	row-gap: 10px;
}

@media screen and (min-width: 1001px) {
	.cw-header__brand-slot {
		padding-right: 16px;
	}
	.cw-header__search-slot {
		padding-left: 8px;
		padding-right: 0;
		/* закрывает субпиксельный «просвет» между колонками grid на фоне страницы */
		background: var(--cw-surface);
	}
	.cw-header__tel-slot {
		position: relative;
		z-index: 2;
		padding-left: 26px;
		margin-left: -2px;
		border-left: none;
		box-shadow: none;
		text-align: right;
		background: var(--cw-surface);
	}
	/* без пробельного текстового узла между <i> и <span> в flex (см. header.php) */
	.cw-header .header-tel__main {
		gap: 8px;
	}
	.cw-header .header-tel__main .icon-nsv-phone-black {
		margin-right: 0 !important;
	}
}

/* Кнопка бургер: первый ребёнок сетки; на desktop полностью убрана из потока (без лишнего grid-узла-обёртки) */
.cw-header__menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--cw-line);
	border-radius: var(--cw-radius-sm);
	background: var(--cw-surface);
	color: var(--cw-ink);
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.cw-header__menu-toggle:hover {
	border-color: var(--cw-line-strong);
	box-shadow: var(--cw-shadow-soft);
}

.cw-header__menu-toggle:focus-visible {
	outline: 2px solid var(--cw-purple);
	outline-offset: 2px;
}

.cw-header__menu-bars {
	display: block;
	width: 20px;
	height: 14px;
	position: relative;
	margin: 0 auto;
}

.cw-header__menu-bars::before,
.cw-header__menu-bars::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
	transition: transform 0.22s ease, top 0.22s ease, bottom 0.22s ease;
}

.cw-header__menu-bars::before {
	top: 1px;
	box-shadow: 0 6px 0 currentColor;
}

.cw-header__menu-bars::after {
	bottom: 1px;
}

.cw-header--nav-open .cw-header__menu-bars::before {
	top: 6px;
	box-shadow: none;
	transform: rotate(45deg);
}

.cw-header--nav-open .cw-header__menu-bars::after {
	bottom: 6px;
	transform: rotate(-45deg);
}

.cw-header__brand-slot {
	grid-area: brand;
	display: flex;
	align-items: center;
	gap: 20px;
	min-width: 0;
}

.cw-header__search-slot {
	grid-area: search;
	min-width: 0;
	width: 100%;
	max-width: 100%;
}

.cw-header__search-slot .header-search-form {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.cw-header__tel-slot {
	grid-area: tel;
	min-width: 0;
	max-width: 340px;
	justify-self: end;
	text-align: right;
}

.cw-header__nav-slot {
	grid-area: nav;
	margin-top: 2px;
	padding-top: 12px;
	border-top: 1px solid var(--cw-line);
}

.cw-header .header-shell {
	border-radius: var(--cw-radius-xl);
	box-shadow: var(--cw-shadow-header);
}

/*
 * Поиск: flex-ряд «поле + кнопка» (шаблон header.php — .header-search-form__control).
 * Первопричина артефакта: absolute у кнопки + width:100% у input — визуальный/пиксельный «хвост» и фон ячейки сетки справа от лупы.
 */
.cw-header .header-search-form__control {
	display: flex;
	align-items: stretch;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	gap: 0;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid #dbe0e8;
	/* без правой границы: иначе 1px #dbe0e8 визуально «режет» между фиолетовой кнопкой и блоком контактов */
	border-right: none;
	background: #fff;
}

.cw-header .header-search-form__submit {
	position: static !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	height: auto !important;
	min-height: 44px;
	width: 48px !important;
	min-width: 48px;
	flex: 0 0 48px;
	transform: none !important;
	border-radius: 0 12px 12px 0 !important;
	border: none !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	z-index: 2;
	-webkit-appearance: none !important;
	appearance: none !important;
	background: var(--cw-purple)
		url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M10.286 7.429c0-2.205-1.795-4-4-4s-4 1.795-4 4 1.795 4 4 4 4-1.795 4-4zM14.857 14.857c0 0.625-0.518 1.143-1.143 1.143-0.304 0-0.598-0.125-0.804-0.339l-3.063-3.054c-1.045 0.723-2.295 1.107-3.563 1.107-3.473 0-6.286-2.813-6.286-6.286s2.813-6.286 6.286-6.286 6.286 2.813 6.286 6.286c0 1.268-0.384 2.518-1.107 3.563l3.063 3.063c0.205 0.205 0.33 0.5 0.33 0.804z'/%3E%3C/svg%3E")
		center/16px 16px no-repeat !important;
}

/* Убираем нативные декорации search (WebKit): «крестик», зазоры — частая причина артефакта у кнопки отправки */
.cw-header .header-search-form__input {
	flex: 1 1 auto;
	min-width: 0;
	width: auto !important;
	max-width: none !important;
	padding-right: 14px !important;
	border: none !important;
	border-radius: 0 !important;
	margin: 0 !important;
	position: relative;
	z-index: 1;
	-webkit-appearance: none;
	appearance: none;
	background: transparent !important;
	box-shadow: none !important;
}

.cw-header .header-search-form:focus-within .header-search-form__control {
	border-color: var(--cw-purple) !important;
	border-right: none !important;
}

.cw-header .header-search-form__result[hidden] {
	display: none !important;
	max-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
}


@media screen and (min-width: 1001px) {
	.cw-header__menu-toggle {
		display: none !important;
		position: absolute !important;
		width: 0 !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
		clip: rect(0, 0, 0, 0) !important;
		border: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}
}

@media screen and (max-width: 1000px) {
	/* Чуть больше полезной ширины под телефон + почту в одну строку */
	html body.cw-body .cw-header .header-shell {
		padding-left: 12px !important;
		padding-right: 12px !important;
	}

	/* Высота шапки: бургер+лого, поиск, строка тел+почта, меню */
	html {
		scroll-padding-top: 180px;
	}

	.cw-header__grid {
		grid-template-columns: 48px minmax(0, 1fr);
		grid-template-areas:
			"toggle brand"
			"search search"
			"tel tel"
			"nav nav";
		column-gap: 12px;
		row-gap: 14px;
		align-items: center;
	}

	.cw-header__brand-slot,
	.cw-header__search-slot,
	.cw-header__tel-slot {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	.cw-header__menu-toggle {
		grid-area: toggle;
		display: inline-flex !important;
		width: 46px !important;
		height: 46px !important;
		margin: 0 !important;
		border: 1px solid var(--cw-line) !important;
		position: static !important;
		clip: auto !important;
		visibility: visible !important;
		pointer-events: auto !important;
	}

	.cw-header__nav-slot {
		display: none;
		margin-top: 2px;
		padding-top: 12px;
		padding-bottom: 4px;
		border-top: 1px solid var(--cw-line);
	}

	.cw-header--nav-open .cw-header__nav-slot {
		display: block;
	}

	.cw-header__brand-slot {
		justify-content: flex-start;
		gap: 8px;
		min-width: 0;
		width: 100%;
		flex-wrap: nowrap;
	}

	html .cw-header .header-brand {
		width: auto !important;
		flex: 1 1 auto !important;
		min-width: 0;
		overflow: hidden;
	}

	/* Узкие экраны: оба логотипа помещаются в ряд с бургером */
	@media screen and (max-width: 420px) {
		html .cw-header .logo {
			width: 118px !important;
			flex: 0 0 118px !important;
			height: 28px !important;
		}
		html .cw-header .logo_mpkm {
			width: 76px !important;
			flex: 0 0 76px !important;
			height: 26px !important;
		}
	}

	@media screen and (max-width: 360px) {
		html .cw-header .logo {
			width: 108px !important;
			flex: 0 0 108px !important;
		}
		html .cw-header .logo_mpkm {
			width: 70px !important;
			flex: 0 0 70px !important;
		}
	}

	/* ≤600px: в ряду с бургером два логотипа дают обрезку/«DI…»; партнёрский лого скрыт (Dipchel на desktop и в футере) */
	@media screen and (max-width: 600px) {
		html body.cw-body .cw-header .header-brand a.logo_mpkm {
			display: none !important;
			width: 0 !important;
			height: 0 !important;
			flex: 0 0 0 !important;
			overflow: hidden !important;
			visibility: hidden !important;
			pointer-events: none !important;
		}
		html .cw-header .logo {
			width: auto !important;
			max-width: 100% !important;
			flex: 1 1 auto !important;
		}
	}

	html .cw-header .header-search {
		width: 100% !important;
		max-width: none !important;
		order: unset !important;
	}

	html .cw-header .cw-header__search-slot {
		margin-top: 2px;
	}

	/*
	 * Mobile ТЗ: под поиском один ряд — телефон слева, e-mail справа.
	 * Читаемый кегль (не ниже ~14px), без «каши» и налезаний.
	 */
	html body.cw-body .cw-header .cw-header__tel-slot.header-tel {
		grid-area: tel;
		max-width: none !important;
		width: 100% !important;
		justify-self: stretch !important;
		/* Две колонки: телефон | почта (чуть шире колонка под e-mail) */
		display: grid !important;
		grid-template-columns: minmax(0, 44%) minmax(0, 56%) !important;
		column-gap: 8px !important;
		align-items: center !important;
		text-align: left !important;
		border-top: 1px solid var(--cw-line) !important;
		padding-top: 12px !important;
		margin-top: 4px !important;
		margin-bottom: 0 !important;
		min-width: 0;
		box-sizing: border-box;
	}

	.cw-header__tel-slot .header-tel__main {
		grid-column: 1;
		min-width: 0;
		max-width: 100%;
		overflow: hidden;
		display: flex !important;
		flex-direction: row !important;
		align-items: center !important;
		justify-content: flex-start !important;
		gap: 8px !important;
		margin: 0 !important;
		text-align: left !important;
	}

	.cw-header__tel-slot .header-tel__main span {
		display: block !important;
		min-width: 0 !important;
		flex: 1 1 auto !important;
		overflow: hidden;
	}

	.cw-header__tel-slot .header-tel__main span a {
		white-space: nowrap !important;
		word-break: normal !important;
		/* rem на сайте привязан к уменьшенному root — только px гарантируют ≥14px */
		font-size: clamp(14px, 3.4vw, 16px) !important;
		line-height: 1.25 !important;
		display: inline-block;
		max-width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		letter-spacing: 0;
		font-family: var(--cw-font-title);
	}

	html body.cw-body .cw-header .cw-header__tel-slot .header-tel__mail {
		grid-column: 2 !important;
		min-width: 0 !important;
		max-width: 100% !important;
		display: block !important;
		margin: 0 !important;
		margin-left: 0 !important;
		margin-top: 0 !important;
		/* media.css: word-break:break-word ломает nowrap и визуально «съедает» адрес */
		word-break: normal !important;
		overflow-wrap: normal !important;
		overflow: hidden;
		text-overflow: ellipsis;
		text-align: right !important;
		font-size: clamp(14px, 3.1vw, 15px) !important;
		line-height: 1.25 !important;
		white-space: nowrap !important;
		letter-spacing: -0.02em !important;
		text-decoration: none;
		color: var(--cw-muted);
		align-self: center;
	}

	.cw-header__tel-slot .header-tel__mail:hover {
		color: var(--cw-purple);
	}

	.cw-header__tel-slot .icon-nsv-phone-black {
		font-size: 1.2rem !important;
		flex-shrink: 0;
	}

	.cw-header .header-nav__ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.cw-header .header-nav__ul a {
		padding: 14px 4px;
		border-bottom: 1px solid var(--cw-line);
		font-size: 1.05rem;
		white-space: normal;
	}

	.cw-header .header-nav__ul li:last-child a {
		border-bottom: none;
	}
}

/* ---------- Главная: фон баннера + hero ---------- */
body.cw-body--home .body {
	position: relative;
}

body.cw-body--home .bs_block {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: min(58vh, 580px);
	z-index: 0;
	overflow: hidden;
}

body.cw-body--home .bs_block::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(233, 236, 241, 0.35) 0%,
		rgba(233, 236, 241, 0.78) 55%,
		#e9ecf1 100%
	);
}

body.cw-body--home .bs_block img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 40%;
	filter: grayscale(1) contrast(1.06);
	opacity: 0.5;
	display: block;
}

body.cw-body--home .header {
	position: relative;
	z-index: 2;
	background: linear-gradient(
		180deg,
		rgba(233, 236, 241, 0.97) 0%,
		rgba(233, 236, 241, 0.82) 70%,
		rgba(233, 236, 241, 0) 100%
	);
}

body.cw-body--home .all-article {
	position: relative;
	z-index: 1;
}

.cw-home-hero {
	position: relative;
	padding-top: 4px;
}

body.cw-body--home .first-container {
	margin-top: clamp(12px, 2.5vw, 28px);
	margin-bottom: clamp(28px, 4vw, 44px);
	max-width: 820px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
}

body.cw-body--home .first-container h1 {
	font-size: clamp(1.55rem, 4vw, 2.15rem);
	line-height: 1.18;
	letter-spacing: -0.02em;
}

body.cw-body--home .first-container p {
	font-size: clamp(0.98rem, 2.2vw, 1.08rem);
	line-height: 1.68;
}

@media screen and (max-width: 760px) {
	body.cw-body--home .bs_block {
		height: min(42vh, 380px);
	}
	body.cw-body--home .first-container {
		margin-top: 10px;
		margin-bottom: 22px;
		padding: 22px 18px;
	}
}

/* ---------- Каталог на главной ---------- */
.second-container {
	box-shadow: var(--cw-shadow-card);
}

.start-catalog__intro h1 {
	font-family: var(--cw-font-title);
	letter-spacing: -0.02em;
}

.start-catalog__grid {
	gap: 14px !important;
}

.start-catalog__card {
	border-radius: var(--cw-radius-lg);
	border: 1px solid var(--cw-line);
	box-shadow: 0 10px 28px -24px rgba(15, 18, 28, 0.2);
	min-height: 88px;
	padding: 18px 20px;
	position: relative;
}

.start-catalog__card::before {
	content: "";
	position: absolute;
	left: 0;
	top: 12px;
	bottom: 12px;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: var(--cw-purple);
	opacity: 0;
	transition: opacity 0.2s;
}

.start-catalog__card:hover::before,
.start-catalog__card:focus-visible::before {
	opacity: 1;
}

.start-catalog__card:focus-visible {
	outline: 2px solid var(--cw-purple);
	outline-offset: 2px;
}

.start-catalog__grid .shop-category-item-name {
	font-size: 1.02rem;
	font-weight: 700;
	color: var(--cw-ink);
}

@media screen and (max-width: 760px) {
	html .start-catalog__grid > .shop-category-item {
		max-width: 100% !important;
		flex: 0 0 100% !important;
	}
}

/* ---------- Преимущества ---------- */
.cw-advantages {
	display: grid !important;
	grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
	gap: clamp(22px, 3vw, 40px) clamp(24px, 4vw, 48px);
	align-items: start;
	box-shadow: var(--cw-shadow-card);
}

.third-container.cw-advantages > * {
	width: 100% !important;
	max-width: 100% !important;
}

.cw-advantages__text {
	min-width: 0;
}

.cw-advantages__text h2,
.cw-advantages__text h3 {
	font-family: var(--cw-font-title);
	color: var(--cw-ink);
}

.cw-advantages__text ul {
	margin: 0;
	padding-left: 0;
	list-style: none;
}

.cw-advantages__text li {
	position: relative;
	padding-left: 1.35rem;
	margin-bottom: 0.65rem;
	line-height: 1.55;
	color: #3a4049;
	font-size: 0.98rem;
}

.cw-advantages__text li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--cw-purple);
	opacity: 0.85;
}

.cw-advantages__visual {
	min-width: 0;
	border-radius: var(--cw-radius-lg);
	overflow: hidden;
	border: 1px solid var(--cw-line);
	box-shadow: var(--cw-shadow-soft);
	background: var(--cw-surface-soft);
}

.cw-advantages__visual .slider-company,
.cw-advantages__visual .owl-carousel {
	margin: 0 !important;
	max-width: 100% !important;
	width: 100% !important;
}

@media screen and (min-width: 900px) {
	.cw-advantages__text ul {
		column-count: 2;
		column-gap: 28px;
	}
	.cw-advantages__text li {
		break-inside: avoid;
	}
}

@media screen and (max-width: 900px) {
	.cw-advantages {
		grid-template-columns: 1fr !important;
	}
	.cw-advantages__visual {
		order: -1;
		max-height: 220px;
	}
	.cw-advantages__visual img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
}

/* ---------- Контакты и карта ---------- */
.cw-contacts-section .fourth-container .width-content,
.fourth-container.cw-contacts-section .width-content {
	box-shadow: var(--cw-shadow-card);
}

.contacts-layout__map {
	position: relative;
	background: var(--cw-surface-soft) !important;
	border: 1px solid var(--cw-line) !important;
	aspect-ratio: 4 / 3;
	min-height: 280px;
	max-height: 440px;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.contacts-layout__map iframe {
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	display: block;
}

.contacts-layout__info h2 {
	font-family: var(--cw-font-title);
	color: var(--cw-ink);
	margin-bottom: var(--cw-space-md);
}

.contacts-layout__info p,
.contacts-layout__info li {
	color: #3a4049;
}

/* ---------- Контентные страницы: карточка ---------- */
.section-content {
	box-shadow: var(--cw-shadow-card);
	border: 1px solid rgba(225, 230, 237, 0.9);
}

.section-content h1 {
	font-family: var(--cw-font-title);
	letter-spacing: -0.02em;
	color: var(--cw-graphite);
}

.breadcrumb-nsv a,
.breadcrumb-nsv span {
	font-size: 0.82rem !important;
	line-height: 1.4;
	color: var(--cw-muted);
}

.breadcrumb-nsv a {
	color: var(--cw-link);
}

/* ---------- Листинг товаров ---------- */
/* Сетка категории: только фото, название, цена, CTA — без таблицы параметров и без раскрытия вариантов по hover */
.section-content .shop-all-items._shop_block .product-item-params,
.section-content .shop-all-items._shop_block .product-item-hidden,
.section-content .shop-all-items._shop_block .shop_form_param,
.section-content .shop-all-items._shop_block .shop_form .product-item-hidden {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	min-height: 0 !important;
	max-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
	pointer-events: none !important;
}

.section-content .shop-all-items._shop_block .product-item:hover .product-item-hidden {
	display: none !important;
}

/* Шаблон всплывающей формы из buy_form — в потоке листинга давал «простыню»/дыру между названием и ценой; убираем из раскладки, плагин nsv_popup всё ещё находит узел в DOM */
.section-content .shop-all-items._shop_block .product-item__child {
	position: relative;
}
.section-content .shop-all-items._shop_block .popup-nsv_template_callback {
	position: absolute !important;
	left: -9999px !important;
	top: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	margin: 0 !important;
	padding: 0 !important;
	width: auto !important;
	max-width: 90vw !important;
	z-index: -1 !important;
}

.section-content .shop-category .grid-items,
.section-content .shop-all-items .grid-items {
	border-radius: var(--cw-radius-lg) !important;
	border: 1px solid var(--cw-line) !important;
	box-shadow: var(--cw-shadow-soft);
	transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.section-content .shop-category .grid-items:hover,
.section-content .shop-all-items .grid-items:hover {
	border-color: var(--cw-line-strong) !important;
	box-shadow: 0 22px 50px -34px rgba(15, 18, 28, 0.28);
}

.section-content .product-item-images {
	background: linear-gradient(180deg, #f8f9fc 0%, #eef1f6 100%) !important;
	border-radius: var(--cw-radius-md) !important;
}

.section-content .product-item-title {
	font-family: var(--cw-font-title);
	font-size: 1.08rem !important;
	line-height: 1.3 !important;
	color: var(--cw-graphite) !important;
	-webkit-line-clamp: 3;
	min-height: 0 !important;
}

.section-content .shop-all-items .product-item-title-wrapper,
.section-content .shop-category .product-item-title-wrapper {
	min-height: 0 !important;
}

.section-content .product-item-price {
	font-size: 1.42rem !important;
	color: var(--cw-graphite) !important;
	letter-spacing: -0.02em;
}

.section-content .product-item .btn-nsv,
.section-content .product-item-btn-cart-one-click input {
	border-radius: var(--cw-radius-sm) !important;
	padding: 13px 18px !important;
	font-size: 0.95rem !important;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	position: relative;
	z-index: 4;
	touch-action: manipulation;
	min-height: 46px;
}

.section-content .shop-category .product-item-title,
.section-content .shop-all-items .product-item-title {
	position: relative;
	z-index: 2;
}

.section-content .shop-category .owl-carousel_product-item-img .owl-item a,
.section-content .shop-all-items .owl-carousel_product-item-img .owl-item a {
	position: relative;
	z-index: 2;
	touch-action: manipulation;
}

.section-content .shop-category .product-item-title-wrapper,
.section-content .shop-all-items .product-item-title-wrapper {
	position: relative;
	z-index: 3;
}

/* Листинг: колонка карточки */
.section-content .shop-all-items .product-item__child,
.section-content .shop-category .product-item__child {
	display: flex;
	flex-direction: column;
	min-height: 100%;
}
/* Сетка категории магазина: цена сразу под названием (margin-top:auto давало огромную «дыру» после убранных параметров) */
.section-content .shop-all-items._shop_block .product-item .shop-price {
	margin-top: 0 !important;
	padding-top: 6px !important;
}
.section-content .shop-all-items._shop_block .product-item-title-wrapper {
	margin-top: 10px !important;
	margin-bottom: 0 !important;
}
.section-content .shop-all-items._shop_block .product-item__child > .shop_form {
	flex: 0 0 auto;
	margin: 0 !important;
	padding: 0 !important;
}
.section-content .shop-all-items:not(._shop_block) .product-item .shop-price,
.section-content .shop-category .product-item .shop-price {
	margin-top: auto;
	padding-top: 10px;
}

/* В листинге не показываем подпись к цене («за рулон …») — только сумма и CTA */
.section-content .shop-all-items .product__tocart__counttext,
.section-content .shop-category .product__tocart__counttext {
	display: none !important;
}

/* Desktop: 3 колонки с чуть большим «воздухом» */
@media screen and (min-width: 901px) {
	.section-content .shop-category .grid-items,
	.section-content .shop-all-items .grid-items {
		max-width: calc((100% - 32px) / 3) !important;
		margin-right: 16px !important;
		margin-bottom: 18px !important;
	}
	.section-content .shop-category .grid-items:nth-child(3n),
	.section-content .shop-all-items .grid-items:nth-child(3n) {
		margin-right: 0 !important;
	}
}

/* Mobile / узкий экран: одна карточка в ряд */
@media screen and (max-width: 720px) {
	html .section-content .shop-all-items._shop_block {
		display: flex !important;
		flex-direction: column !important;
		gap: 14px !important;
	}
	html .section-content .shop-all-items._shop_block > .product-item,
	html .section-content .shop-all-items._shop_block > .grid-items,
	html .shop-all-items._shop_block > .product-item,
	html .shop-all-items._shop_block > .grid-items {
		max-width: 100% !important;
		flex: 0 0 100% !important;
		width: 100% !important;
		margin-right: 0 !important;
		margin-left: 0 !important;
	}
	html .section-content .shop-category .grid-items {
		max-width: 100% !important;
		flex: 0 0 100% !important;
		width: 100% !important;
		margin-right: 0 !important;
	}
	.section-content .product-item-title {
		font-size: 1.05rem !important;
		-webkit-line-clamp: 4;
	}
}

/* ---------- Пагинация ---------- */
.paginator {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
	margin-top: var(--cw-space-lg);
}

.paginator .btn-nsv_color_silver,
.paginator .btn-nsv_color_red,
.paginator_more_button {
	border-radius: var(--cw-radius-sm) !important;
	padding: 10px 16px !important;
	font-family: var(--cw-font-body) !important;
	font-size: 0.92rem !important;
	border: 1px solid var(--cw-line-strong) !important;
	background: var(--cw-surface) !important;
	color: var(--cw-ink) !important;
	min-height: 44px;
	box-sizing: border-box;
}

.paginator .btn-nsv_color_red {
	border-color: var(--cw-purple) !important;
	color: var(--cw-purple) !important;
}

.paginator .btn-nsv_color_silver:hover,
.paginator_more_button:hover {
	border-color: var(--cw-purple) !important;
	color: var(--cw-purple) !important;
}

/* ---------- Карточка товара ---------- */
.shop-item-summary {
	border-radius: var(--cw-radius-xl) !important;
	box-shadow: var(--cw-shadow-card) !important;
	border-color: var(--cw-line) !important;
}

.shop-item-summary__purchase {
	background: linear-gradient(180deg, #f9fafc 0%, #f1f4f8 100%) !important;
	border-radius: var(--cw-radius-lg) !important;
}

.product-id-price {
	font-size: clamp(1.65rem, 3vw, 2.15rem) !important;
	letter-spacing: -0.03em;
}

.product-id-btn-cart,
.shop-item-summary__purchase .btn-nsv {
	border-radius: var(--cw-radius-sm) !important;
	padding: 14px 20px !important;
	font-size: 1rem !important;
}

.product-id-btn-cart {
	background: var(--cw-purple) !important;
	color: #fff !important;
	border: none !important;
	font-family: var(--cw-font-title) !important;
}

.product-id-btn-cart:hover {
	background: var(--cw-purple-hover) !important;
}

.shop-item-container-description h2 {
	font-family: var(--cw-font-title);
	color: var(--cw-graphite);
	margin-top: 2rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--cw-line);
}

.shop-item-container-description h2:first-child {
	border-top: none;
	margin-top: 0;
	padding-top: 0;
}

.shop-item-container-description h3 {
	color: var(--cw-ink);
}

.shop-item-container-description p,
.shop-item-container-description li {
	color: #343a42;
}

.shop-item-content__specs {
	box-shadow: none;
	background: var(--cw-surface-soft) !important;
}

.shop-item-pdf-docs {
	background: var(--cw-surface) !important;
	border: 1px dashed var(--cw-line-strong) !important;
	border-radius: var(--cw-radius-lg) !important;
}

.shop-item-pdf-docs__link {
	padding: 10px 12px;
	border-radius: var(--cw-radius-sm);
	background: var(--cw-surface-soft);
	width: 100%;
	box-sizing: border-box;
}

/* ---------- Похожие товары ---------- */
.shop-related__head {
	margin-bottom: var(--cw-space-md);
}

.shop-related__title {
	font-family: var(--cw-font-title);
	color: var(--cw-graphite);
}

/* В all.css у .grid-items max-width ~25% — в карусели ломает ширину слайдов */
.shop-related__carousel .product-item--related.grid-items,
.shop-related .product-item--related.grid-items {
	max-width: none !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-top: 0 !important;
	box-sizing: border-box !important;
}

.shop-related__carousel .owl-stage-outer {
	padding: 8px 0 36px;
	overflow: hidden;
}

.shop-related__carousel.owl-carousel .owl-nav {
	pointer-events: none;
}

.shop-related__carousel.owl-carousel .owl-nav .owl-prev,
.shop-related__carousel.owl-carousel .owl-nav .owl-next {
	pointer-events: auto;
	z-index: 5;
}

.shop-related__carousel .product-item__child {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100%;
	border-radius: var(--cw-radius-lg);
	border: 1px solid var(--cw-line);
	box-shadow: var(--cw-shadow-soft);
	padding: 14px 16px 16px !important;
	box-sizing: border-box;
}

.shop-related__carousel .product-item-images {
	flex: 0 0 auto;
	min-height: 160px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 8px 12px !important;
	background: linear-gradient(180deg, #f8f9fc 0%, #eef1f6 100%) !important;
	border-radius: var(--cw-radius-md) !important;
}

.shop-related__carousel .product-item-images__item {
	max-height: min(240px, 52vw) !important;
	min-height: 120px;
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	object-fit: contain;
	margin: 0 auto;
}

.shop-related__carousel .product-item-images a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 140px;
	touch-action: manipulation;
	position: relative;
	z-index: 2;
}

.shop-related__carousel .product-item-title--related,
.shop-related__carousel .product-item-title.product-item-title--related {
	word-break: normal !important;
	overflow-wrap: break-word;
	hyphens: manual;
	display: -webkit-box !important;
	-webkit-box-orient: vertical !important;
	-webkit-line-clamp: 3;
	overflow: hidden;
	font-size: 1.02rem !important;
	line-height: 1.32 !important;
	margin-top: 10px !important;
	min-height: 0;
	touch-action: manipulation;
	position: relative;
	z-index: 2;
}

.shop-related__carousel .shop-price,
.shop-related__carousel .js-price {
	margin-top: auto;
	padding-top: 10px;
	flex-direction: column !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	gap: 4px !important;
	width: 100%;
}

.shop-related__carousel .product-id-price,
.shop-related__carousel .product-item-price {
	white-space: normal !important;
	font-size: 1.22rem !important;
	line-height: 1.2 !important;
}

.shop-related__carousel .product-item-btn-cart-one-click input,
.shop-related__carousel .btn-product-item-no-price {
	min-height: 46px;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	touch-action: manipulation;
	position: relative;
	z-index: 4;
}

/* В related не показываем скрытые параметры / попап — только цена и CTA (разметка buy_form общая) */
.shop-related__carousel .product-item-hidden,
.shop-related__carousel .shop_form_param {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	pointer-events: none !important;
}

.shop-related__carousel .popup-nsv_template_callback {
	position: absolute !important;
	left: -9999px !important;
	top: 0 !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	pointer-events: none !important;
	margin: 0 !important;
	padding: 0 !important;
	clip: rect(0, 0, 0, 0) !important;
}

@media screen and (max-width: 600px) {
	.shop-related__carousel .owl-item {
		padding: 0 8px;
	}

	.shop-related__carousel .product-item-images__item {
		max-height: min(220px, 58vw) !important;
		min-height: 130px;
	}

	.shop-related__carousel .product-item-images a {
		min-height: 150px;
	}
}

/* ---------- Футер ---------- */
.footer-shell {
	border-radius: var(--cw-radius-xl);
	padding: clamp(22px, 3vw, 32px) clamp(20px, 3vw, 32px) !important;
}

.footer .width-content > .flex-between_wrap_no-wrap {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(18px, 3vw, 36px) !important;
	align-items: start;
}

.footer .footer-title {
	font-size: 0.78rem !important;
	margin-bottom: 12px !important;
	letter-spacing: 0.06em;
}

.footer p,
.footer a,
.footer span {
	font-size: 0.93rem !important;
	line-height: 1.55 !important;
}

.footer .text_size_small,
.footer .text_size_small * {
	font-size: 0.84rem !important;
	line-height: 1.45 !important;
}

.footer-nav a {
	padding: 4px 0;
	display: inline-block;
}

@media screen and (max-width: 760px) {
	.footer .width-content > .flex-between_wrap_no-wrap {
		grid-template-columns: 1fr !important;
		gap: 22px !important;
	}
	.footer p,
	.footer a,
	.footer span {
		font-size: 1rem !important;
	}
}

/* ---------- Кнопки и ссылки (глобальное смягчение) ---------- */
.btn-nsv {
	border-radius: var(--cw-radius-sm) !important;
}

/* =============================================================================
   Mobile typography — Яндекс Вебмастер «много мелкого текста»
   Раньше media.css давал html 12px при ≤1050px → rem по всему сайту <12px.
   ============================================================================= */
@media screen and (max-width: 1000px) {
	html {
		font-size: 15px !important;
	}
}

@media screen and (max-width: 600px) {
	html {
		font-size: 16px !important;
	}
}

@media screen and (max-width: 1000px) {
	.breadcrumb-nsv a,
	.breadcrumb-nsv span {
		font-size: max(0.875rem, 12px) !important;
	}

	.header-search-form__item-meta {
		font-size: max(0.875rem, 12px) !important;
	}

	.block-geo,
	.block-geo * {
		font-size: max(0.875rem, 12px) !important;
	}

	.paginator .btn-nsv_color_silver,
	.paginator .btn-nsv_color_red,
	.paginator_more_button {
		font-size: max(0.9375rem, 14px) !important;
	}

	body.cw-body--home .first-container p {
		font-size: clamp(0.9375rem, 2.5vw, 1.08rem);
	}

	.start-catalog__grid .shop-category-item-name {
		font-size: max(1rem, 15px);
	}

	.cw-advantages__text li {
		font-size: max(0.98rem, 14px);
	}

	.shop-item-pdf-docs__link {
		font-size: max(0.9375rem, 14px);
	}

	.shop-item-container-description p,
	.shop-item-container-description li {
		font-size: max(1rem, 15px);
	}

	.footer .footer-title {
		font-size: max(0.8125rem, 12px) !important;
	}

	.footer .text_size_small,
	.footer .text_size_small * {
		font-size: max(0.8125rem, 12px) !important;
	}
}
