/* Исправления вёрстки. Подключается после itera_style.css. */

/* ---------- Баннер на главной ----------
   Слайд растягивается по тексту: кнопка не обрезается, заголовок не уходит под шапку.
   Картинка — фон слайда (обрезается по краям только если текст выше картинки). */
#top-slider .itcss__item {
	display: grid;
}

#top-slider .itcss__item > img {
	grid-area: 1 / 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: right center;
}

#top-slider .itcss__item-content__absolute {
	grid-area: 1 / 1;
	position: relative;
	height: auto;
	display: flex;
	align-items: center;
	padding: 24px 0;
}

#top-slider .itcss__item-content {
	height: auto;
	width: 100%;
}

@media (min-width: 1321px) and (max-width: 1919px) {
	#top-slider .b-banner-title {
		font-size: clamp(28px, 2.35vw, 46px);
		line-height: 1.2;
	}

	#top-slider .itcss__item-headline {
		max-width: 52%;
		margin-bottom: 18px;
	}

	#top-slider .itcss__item-descriptor {
		margin-bottom: 28px;
	}
}

@media (max-width: 767px) {
	#top-slider .b-banner-title,
	#top-slider .b-banner-text {
		text-shadow: 0 1px 4px rgba(9, 60, 103, .55);
	}

	#top-slider .b-banner-title {
		hyphens: auto;
	}
}

/* Заголовок шире: в 65% ширины слово «ПРОМЫШЛЕННЫЕ» на 320–360 px не помещалось и рвалось посередине. */
@media (max-width: 420px) {
	#top-slider .itcss__item-headline {
		max-width: 78%;
	}
}

/* ---------- Меню в десктопной шапке ----------
   Подписи не переносятся на вторую строку (она висела под шапкой поверх страницы):
   шрифт и отступы подстраиваются под ширину экрана. */
#site-header .header-menu-row #mega-menu-wrap-main_menu #mega-menu-main_menu > li.mega-menu-item > a.mega-menu-link {
	white-space: nowrap !important;
	font-size: clamp(14px, 1.1vw, 17px) !important;
	padding: 0 clamp(10px, 1vw, 14px) !important;
}

/* ---------- Сжатая шапка при прокрутке ---------- */
#site-header .header-gradient .container,
#site-header .header-logotype img {
	transition: padding .2s ease, height .2s ease;
}

/* Компьютер: одна строка — логотип, поиск, «Отправить заявку», «Заказать звонок», телефон; ниже меню. */
#site-header.is-compact .header-pc .header-descriptor,
#site-header.is-compact .header-pc .header-address,
#site-header.is-compact .header-pc .header-mail,
#site-header.is-compact .header-pc .header-phone a + a {
	display: none;
}

#site-header.is-compact .header-pc .header-logotype img {
	height: 52px !important;
	width: auto !important;
}

#site-header.is-compact .header-pc .header-gradient .container,
#site-header.is-compact .header-pc .header-logo-search,
#site-header.is-compact .header-pc .header-conteiner {
	align-items: center;
}

#site-header.is-compact .header-pc .header-button {
	display: flex;
	align-items: center;
	gap: 14px;
}

#site-header.is-compact .header-pc .header-button .b-banner__button-popup,
#site-header.is-compact .header-pc .header-phone-address .b-button {
	margin: 0;
}

/* Телефон: строка с логотипом, кнопками и меню; поиск — по кнопке с лупой. */
.header-mobile .header-search-toggle {
	display: none;
}

#site-header.is-compact .header-mobile .sec-row {
	display: none;
}

#site-header.is-compact.search-open .header-mobile .sec-row {
	display: flex;
}

#site-header.is-compact .header-mobile .header-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	margin: 0 8px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #27B1E6;
	cursor: pointer;
}

/* Телефон: логотип, «Отправить заявку», звонок, поиск (в сжатой шапке) и меню — в одну строку
   от 320 px. Кнопка заявки сжимается и при нехватке места переносит текст на вторую строку. */
@media (max-width: 767px) {
	.header-mobile .menu-row {
		gap: 8px;
	}

	.header-mobile .logotype {
		flex: 0 0 auto;
		margin-right: 0;
	}

	.header-mobile .header-button {
		display: flex;
		align-items: center;
		flex: 0 1 auto;
		gap: 8px;
		min-width: 0;
		margin-right: 0;
	}

	/* В теме у кнопки width: min-content — с обычным пробелом она всегда была бы в две строки. */
	.header-mobile .header-button .tender {
		flex: 0 1 auto;
		width: auto;
		min-width: 0;
		white-space: nowrap;
	}

	.header-mobile .header-button .b-banner__button-popup {
		flex: 0 0 auto;
		margin-left: 0;
	}

	.header-mobile .header-search-toggle,
	.header-mobile .menu {
		flex: 0 0 auto;
	}

	#site-header.is-compact .header-mobile .header-search-toggle {
		margin: 0;
	}

	/* Бургер: значок прежний, зона нажатия 40×40. */
	#site-header .header-mobile .menu-triger {
		width: 40px;
		height: 40px;
		background: url(/wp-content/uploads/2022/10/burger-menu.svg) center / 27px 21px no-repeat;
	}
}

@media (max-width: 420px) {
	.header-mobile .logotype img {
		width: 48px !important;
		height: auto !important;
	}

	#site-header .header-mobile .header-button .tender {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 44px !important;
		min-width: min-content;
		padding: 0 12px !important;
		white-space: normal;
		overflow-wrap: normal;
		line-height: 1.25;
		text-align: center;
	}

	#site-header .header-mobile .header-button .b-banner__button.b-banner__button-popup {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px !important;
		padding: 0;
	}
}

@media (max-width: 360px) {
	.header-mobile .menu-row,
	.header-mobile .header-button {
		gap: 6px;
	}

	.header-mobile .logotype img {
		width: 44px !important;
	}
}

/* Звонок на телефоне — ссылка tel: на весь размер кнопки. */
.header-mobile .header-call-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

#site-header [role="button"]:focus-visible,
.header-search-toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* ---------- Страницы брендов ---------- */
.b-manufacturer__href a.b-button.b-button_orange {
	display: block;
	color: #fff;
	text-decoration: none;
}

.b-manufacturer__href a.b-button.b-button_orange:hover {
	color: #FF5F00;
}

a.b-manufacturer__category-link {
	display: block;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

a.b-manufacturer__category-link figure {
	transition: box-shadow .2s ease, transform .2s ease;
}

a.b-manufacturer__category-link:hover figure {
	transform: translateY(-3px);
	box-shadow: 0 14px 24px -10px rgba(14, 97, 150, .35);
}

a.b-manufacturer__category-link:hover figcaption {
	color: #0E6196;
}

/* ---------- Каталог: полное название товара ---------- */
.woocommerce ul.products li.product li.title a,
.woocommerce ul.products li.product li.title h2 {
	white-space: normal;
	overflow-wrap: anywhere;
}

/* ---------- Блок «Продукция» на главной: 10 карточек вместо 12 ---------- */
@media (min-width: 768px) {
	.b-catalog-blocks__container {
		grid-template-areas:
			"datchiki-davleniya-i-urovnya raskhodomery signalizatory-urovnya"
			"izmeriteli-temperatury-vlazhnosti schetchiki-i-pribory-kontrolya trassotecheiskateli"
			"izmeriteli-temperatury-vlazhnosti vspomogatelnoe-oborudovanie trassotecheiskateli"
			"sktpshkafy-upravleniya manometry-i-indikatory moduli-pitaniya";
	}
}

/* ---------- Карточка товара на телефоне: крошки и вкладки не уходят за край ---------- */
@media (max-width: 767px) {
	.site-breadcrumbs {
		white-space: normal;
		overflow: visible;
		height: auto;
		line-height: 1.4;
	}

	.woocommerce div.product .woocommerce-tabs ul.tabs {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		overflow: visible;
	}

	.woocommerce div.product .woocommerce-tabs ul.tabs li {
		margin: 0;
	}
}

/* ---------- Окно «Заказать звонок» ---------- */
.iteraprom-call-modal[hidden] {
	display: none;
}

.iteraprom-call-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.iteraprom-call-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(9, 60, 103, .6);
}

.iteraprom-call-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	padding: 36px 32px 28px;
	border-radius: 16px;
	background: rgb(14, 97, 150);
	color: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

.iteraprom-call-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.iteraprom-call-modal__title {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	color: #fff;
}

.iteraprom-call-modal__lead {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.45;
	color: #fff;
}

.iteraprom-call-modal .wpcf7 input[type="text"],
.iteraprom-call-modal .wpcf7 input[type="tel"] {
	width: 100%;
	margin-bottom: 12px;
}

.iteraprom-call-modal .wpcf7 a {
	color: #fff;
}

.iteraprom-call-modal .wpcf7-submit {
	width: 100%;
}

/* Классы формы (.one-third-name, .one-third.last) тема раскладывает колонками под баннер —
   в окне всё в один столбец: поля, согласие, кнопка. */
.iteraprom-call-modal .wpcf-wrap,
.iteraprom-call-modal .one-third-name,
.iteraprom-call-modal .one-third.last,
.iteraprom-call-modal .confidance,
.iteraprom-call-modal .conf,
.iteraprom-call-modal .b-banner__button {
	display: block !important;
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	box-shadow: none !important;
}

.iteraprom-call-modal .wpcf7 p {
	margin: 0;
}

.iteraprom-call-modal .one-third-name br {
	display: none;
}

.iteraprom-call-modal .wpcf7-form-control-wrap {
	display: block;
	margin: 0 0 12px;
}

.iteraprom-call-modal .wpcf7 input[type="text"] {
	display: block;
	width: 100% !important;
	height: 52px;
	margin: 0;
}

.iteraprom-call-modal .conf {
	margin: 4px 0 18px !important;
}

.iteraprom-call-modal .wpcf7-submit {
	display: block;
	width: 100% !important;
	margin: 0 !important;
}

.iteraprom-call-modal .wpcf7-spinner {
	display: none;
}

.iteraprom-call-modal .wpcf7-response-output {
	margin: 14px 0 0 !important;
	color: #fff;
}

body.iteraprom-modal-open {
	overflow: hidden;
}

/* ---------- Окно «Заказать»: какой товар заказывают ---------- */
#buyoneclick_form_order .iteraprom-boc-product {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 16px;
	padding: 10px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .12);
	text-align: left;
	color: #fff;
}

#buyoneclick_form_order .iteraprom-boc-product__img {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}

#buyoneclick_form_order .iteraprom-boc-product__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	margin: 0;
}

#buyoneclick_form_order .iteraprom-boc-product__info {
	min-width: 0;
	font-size: 14px;
	line-height: 1.35;
}

#buyoneclick_form_order .iteraprom-boc-product__name {
	font-weight: 700;
	overflow-wrap: anywhere;
}

#buyoneclick_form_order .iteraprom-boc-product__sku {
	opacity: .85;
	font-size: 13px;
}

#buyoneclick_form_order .iteraprom-boc-product__price,
#buyoneclick_form_order .iteraprom-boc-product__price * {
	margin-top: 2px;
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	text-transform: none;
}

/* ---------- Подтверждение после «Заказать» ---------- */
.iteraprom-order-thanks__product {
	margin: 0 0 18px;
	font-size: 14px;
	opacity: .9;
}

.iteraprom-order-thanks .iteraprom-order-thanks__ok {
	display: block;
	width: 100%;
	height: auto;
	padding: 16px;
	cursor: pointer;
}

/* ---------- Формы Contact Form 7 ---------- */
/* Выпадающие списки («Тип запроса», «Когда нужно») — как остальные поля формы. */
.wpcf7 select.wpcf7-select {
	width: 100%;
	height: 64px;
	margin: 0 0 5px;
	padding: 0 52px 0 30px;
	border: 1px solid #ddd;
	border-radius: 10px;
	background-color: #ece8e8;
	background-position: right 24px center;
	background-size: 14px;
	box-shadow: inset 0 4px 10px rgba(0, 0, 0, .14);
	color: #575756;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.2;
}

/* Форма внизу главной: до 1024 px тема уменьшает поля, а комментарий забыла. */
@media (max-width: 1024px) {
	.b-white-form .wpcf7 select.wpcf7-select {
		height: 44px;
		padding: 0 44px 0 19px;
		background-position: right 18px center;
		font-size: 14px;
	}

	.b-white-form form textarea {
		padding: 12px 19px;
		font-size: 14px;
		line-height: 18px;
	}
}

/* Там же на телефоне тема ставила кнопку выше согласия — возвращаем порядок: согласие, кнопка. */
@media (max-width: 500px) {
	.b-white-form .one-third.last {
		flex-direction: column;
		gap: 16px;
	}
}

/* Попапы на телефоне: поля не вплотную друг к другу, комментарий пониже — окно короче. */
@media (max-width: 600px) {
	.pum .popmake-content input[type="text"],
	.pum .popmake-content input[type="tel"],
	.pum .popmake-content input[type="email"],
	.pum .popmake-content .wpcf7 select.wpcf7-select {
		margin: 0 0 8px;
	}

	.pum .popmake-content .wpcf7 select.wpcf7-select {
		height: 52px;
		padding: 0 44px 0 20px;
		background-position: right 18px center;
	}

	.pum .popmake-content .wpcf7 textarea {
		height: 140px;
		min-height: 120px;
	}
}

/* ---------- Окно «Заказать» (быстрый заказ) ---------- */
/* У полей margin 5px при ширине 100% — вылезали вправо за блок товара и согласие. */
#formOrderOneClick #buyoneclick_form_order input.buyvalide {
	margin: 5px 0;
}

@media (max-width: 480px) {
	#formOrderOneClick .popup {
		padding: 44px 20px 28px;
	}
}

/* ---------- Карточка товара: блок цены ---------- */
/* «Заказать» в карточке скрыта (functions.php), а плашка «Характеристики» и второй список
   категорий, которые шли под ней, остались и разъезжались рядом с ценой. */
.single-product .summary .characteristics,
.single-product .summary .product_meta ~ .product_meta {
	display: none !important;
}

/* «от 256 900 ₽» в одну строку, под ней кнопка «Получить КП» и пояснение. */
.single-product .summary p.price {
	display: flex;
	flex-flow: row wrap;
	align-items: baseline;
	column-gap: 10px;
	row-gap: 0;
	float: none;
	width: 100%;
}

.woocommerce .summary.entry-summary p.price span {
	margin: 0;
}

.woocommerce .summary.entry-summary p.price .from {
	font-size: 20px;
	font-weight: 500 !important;
}

.woocommerce .summary.entry-summary p.price .iteraprom-single-kp-extra {
	flex: 0 0 100%;
	margin-top: 20px;
}

.woocommerce .summary.entry-summary p.price > .iteraprom-single-kp-note {
	flex: 0 0 100%;
	margin-top: 12px;
}
/* ---------- Сжатая шапка при прокрутке ---------- */
/* Компьютер: одна строка — логотип, поиск, мессенджеры, «Отправить заявку», «Заказать звонок»,
   телефон; ниже меню. Всё по центру по высоте и без переносов, место под строку отдаёт поиск.
   Без анимации: плавное сжатие логотипа тащило за собой поиск и кнопки, а правая часть прыгала сразу. */
#site-header.is-compact .header-pc .header-descriptor,
#site-header.is-compact .header-pc .header-address,
#site-header.is-compact .header-pc .header-mail,
#site-header.is-compact .header-pc .header-phone a + a {
	display: none;
}

#site-header.is-compact .header-pc .header-gradient {
	padding: 10px 0;
}

#site-header.is-compact .header-pc .header-gradient .container {
	align-items: center;
	gap: 24px;
}

#site-header.is-compact .header-pc .header-logo-search {
	flex: 1 1 auto;
	min-width: 0;
}

#site-header.is-compact .header-pc .header-logotype {
	flex: 0 0 auto;
	margin-right: 24px;
}

#site-header.is-compact .header-pc .header-logotype img {
	height: 52px !important;
	width: auto !important;
}

#site-header.is-compact .header-pc .header-search-descriptor {
	flex: 0 1 auto;
	min-width: 0;
}

#site-header.is-compact .header-pc .aws-container {
	max-width: 100%;
}

#site-header.is-compact .header-pc .socials__links {
	flex: 0 0 auto;
	margin: 0;
}

#site-header.is-compact .header-pc .header-conteiner {
	flex: 0 0 auto;
	align-items: center;
	gap: 12px;
}

#site-header.is-compact .header-pc .header-button {
	display: flex;
	align-items: center;
	gap: 24px;
}

#site-header.is-compact .header-pc .header-button .b-banner__button-popup,
#site-header.is-compact .header-pc .header-phone-address .b-button {
	margin: 0;
	white-space: nowrap;
}

#site-header.is-compact .header-pc a.header-phone {
	white-space: nowrap;
}

/* Семантические компоненты: сохраняем оформление при замене тегов. */
.site-description-text { font-size:20px; line-height:1.4; font-weight:600; margin:0 0 20px; }
.other-posts-titile { font-size:20px; line-height:13px; color:#008AD3; font-weight:400; }
.product-features { padding-left:1.4em; }
.iteraprom-recent-carousel { position:relative; }
.woocommerce .rvpscarousel.products { display:flex; flex-wrap:nowrap; gap:24px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:thin; padding:0 0 12px; margin:0; }
.woocommerce .rvpscarousel.products::before, .woocommerce .rvpscarousel.products::after { content:none; }
.woocommerce .rvpscarousel.products > .product { flex:0 0 calc((100% - (var(--recent-count, 3) - 1)*24px)/var(--recent-count, 3)); width:auto; min-width:0; float:none; clear:none; margin:0; scroll-snap-align:start; }
.iteraprom-recent-prev, .iteraprom-recent-next { position:absolute; top:40%; z-index:2; width:44px; height:44px; padding:0; display:flex; align-items:center; justify-content:center; border:0; border-radius:50%; color:#fff; background:#008AD3; font-size:28px; }
.iteraprom-recent-prev { left:0; }
.iteraprom-recent-next { right:0; }
.iteraprom-recent-prev:disabled, .iteraprom-recent-next:disabled { visibility:hidden; }
.iteraprom-recent-pause { margin-top:8px; min-height:44px; }
.iteraprom-recent-carousel button:focus-visible { outline:2px solid #222; outline-offset:3px; }

/* Главная: оформление популярных товаров. */

.iteraprom-popular-equipment {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    max-width: 1040px;
    margin: 0 auto;
}
.iteraprom-equipment-card {
    display: flex;
    flex-direction: column;
    min-height: 430px;
    padding: 22px 20px 24px;
    background: #fff;
    border: 1px solid #e5edf5;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(16, 66, 115, 0.10);
    text-align: left;
    text-decoration: none !important;
    color: #17324d;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.iteraprom-equipment-card__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none !important;
}
.iteraprom-equipment-card:hover {
    transform: translateY(-4px);
    border-color: #1e88e5;
    box-shadow: 0 18px 38px rgba(16, 66, 115, 0.18);
}
.iteraprom-equipment-card__tag {
    align-self: flex-start;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eaf5ff;
    color: #1675c1;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}
.iteraprom-equipment-card img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: contain;
    margin: 18px 0 14px;
}
.iteraprom-equipment-card__name {
    min-height: 46px;
    color: #0b3762;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
}
.iteraprom-equipment-card__desc {
    min-height: 64px;
    margin-top: 8px;
    color: #506476;
    font-size: 14px;
    line-height: 1.45;
}
.iteraprom-equipment-card__price {
    margin-top: auto;
    color: #111;
    font-size: 16px;
    font-weight: 800;
    text-transform: lowercase;
}
.iteraprom-equipment-card__cta {
    width: 100%;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    padding: 11px 14px;
    border-radius: 8px;
    background: #f58220;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
}
@media (max-width: 1024px) {
    .iteraprom-popular-equipment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .iteraprom-popular-equipment { grid-template-columns: 1fr; gap: 18px; }
    .iteraprom-equipment-card { min-height: 0; }
}

/* HTML validation: preserve the existing manufacturers grid and map geometry. */
.b-page-manufacturers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: stretch;
}
.b-page-manufacturers-grid .b-page-manufacturer {
    width: calc(33.333% - 19px);
    margin: 0;
}
@media (max-width: 1024px) {
    .b-page-manufacturers-grid .b-page-manufacturer {
        width: calc(50% - 14px);
    }
}
@media (max-width: 640px) {
    .b-page-manufacturers-grid {
        gap: 18px;
    }
    .b-page-manufacturers-grid .b-page-manufacturer {
        width: 100%;
    }
}

.iteraprom-contact-map {
    width: 100%;
    border: 0;
}
