/* Точечные исправления вёрстки поверх style.css / main.css / style-mobile.css (2026-10-10). */

/* --- Карточки «Мы рекомендуем»: inline-block с baseline-выравниванием разъезжались по высоте --- */
#goods .goods-wrapper {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}
#goods .grid-16 {
	display: flex;
	vertical-align: top;
}
#goods .goods-card {
	display: flex;
	flex-direction: column;
	width: 100%;
}
#goods .goods-card .goods-prices {
	margin-top: auto;
	padding-right: 90px;
	min-height: 46px; /* две строки цены: иначе при одной цене кнопка наезжает на «Пусковой ток» */
}
/* в 6 колонок кнопка «Купить» налезала на цену — ставим её под цены */
@media screen and (min-width: 1401px) {
	/* 5 карточек в ряд и отступ между рядами (перенесённые карточки прилипали к верхнему ряду) */
	#goods .goods-wrapper {
		row-gap: 20px;
	}
	#goods .grid-16 {
		width: 20% !important;
	}
	#goods .goods-card .goods-prices {
		padding-right: 0;
	}
	#goods .goods-card .red-book-btn {
		position: static;
		display: block;
		margin-top: 8px;
		text-align: center;
	}
}

/* --- «Наши магазины»: фото разной высоты ломали сетку --- */
.shop-item .wrap img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

/* --- Поиск/архив: глобальное `header {background:#000}` красило заголовок записи в чёрную полосу --- */
.site-content header.entry-header {
	background: transparent;
	width: auto;
}
.site-content .entry-header .entry-title {
	font-size: 20px;
	line-height: 1.3;
	margin: 0 0 6px;
}
.site-content .entry-header .entry-title a {
	font-size: inherit;
	color: #1553af;
}
#primary article + article {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid #e5e5e5;
}

/* --- 404 --- */
.kvk-404-links .btn {
	margin: 12px 8px 0 0;
}

/* --- Мобильная обёртка для page/archive/search/404 (см. header.php) --- */
#kvk-mobile-generic {
	padding: 0 15px 20px;
	overflow-wrap: break-word;
}
#kvk-mobile-generic .container,
#kvk-mobile-generic .content-area {
	width: auto;
	max-width: 100%;
	padding: 0;
	float: none;
}
#kvk-mobile-generic #secondary {
	display: none;
}
#kvk-mobile-generic img {
	max-width: 100%;
	height: auto;
}
#kvk-mobile-generic .page-header {
	padding: 15px 0 5px;
}
#kvk-mobile-generic .page-header .page-title,
#kvk-mobile-generic .page-header .entry-title {
	font-size: 22px;
	line-height: 1.3;
	margin: 0;
}
#kvk-mobile-generic .search-form .search-field {
	width: 100%;
	margin-bottom: 8px;
}
/* галерея сертификатов: owl-карусель в 4 колонки на телефоне даёт картинки ~70px — показываем сеткой 2×N */
#kvk-mobile-generic .wc-gallery .owl-stage {
	transform: none !important;
	width: auto !important;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
#kvk-mobile-generic .wc-gallery .owl-item {
	width: auto !important;
	margin: 0 !important;
}
#kvk-mobile-generic .wc-gallery .owl-item.cloned,
#kvk-mobile-generic .wc-gallery .owl-nav,
#kvk-mobile-generic .wc-gallery .owl-dots {
	display: none;
}
#kvk-mobile-generic .wc-gallery img {
	width: 100%;
}
/* style-mobile.css задаёт #primary/main ширину экрана — внутри отступов wrapper это вылезает за край */
#kvk-mobile-generic #primary,
#kvk-mobile-generic .site-main,
#kvk-mobile-generic article {
	width: auto !important;
	min-width: 0 !important;
	max-width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}
#kvk-mobile-generic .wc-gallery,
#kvk-mobile-generic .wc-gallery .gallery,
#kvk-mobile-generic .wc-gallery .owl-carousel,
#kvk-mobile-generic .wc-gallery .owl-stage-outer {
	clear: both;
	float: none;
	width: 100% !important;
}

/* попап «Движкар»: на узких экранах крестик закрытия налезал на заголовок */
#dvizhcar .modal-header {
	position: relative;
	padding-left: 34px;
	padding-right: 34px;
}
#dvizhcar .modal-header .close {
	position: absolute;
	top: 10px;
	right: 10px;
	margin: 0;
}
#kvk-mobile-generic .wc-gallery .owl-prev,
#kvk-mobile-generic .wc-gallery .owl-next,
#kvk-mobile-generic .wc-gallery [class*="owl-nav"] {
	display: none !important;
}

/* CF7 «телефон + Отправить» в одну строку: спиннер под кнопкой делал её label выше,
   и при baseline-выравнивании поле телефона уезжало вниз */
.wpcf7-form p > label:has(+ label .wpcf7-submit),
.wpcf7-form p > label:has(.wpcf7-submit) {
	vertical-align: top;
}
.wpcf7-form p > label:has(.wpcf7-submit) {
	position: relative;
}
.wpcf7-form p > label:has(.wpcf7-submit) .wpcf7-spinner {
	position: absolute;
	left: 100%;
	top: 50%;
	margin: -12px 0 0 8px;
}

/* CF7: колонки внутри формы плавающие, форма схлопывалась в 0 — сообщение об ошибке всплывало над формой слева */
.wpcf7-form::after {
	content: "";
	display: table;
	clear: both;
}
.wpcf7-form .wpcf7-response-output {
	position: static !important; /* тема ставила absolute — clear не работал */
	clear: both;
	float: none;
	max-width: 760px;
	margin: 10px auto 0 !important;
	text-align: center;
}

/* ---------- SEO: смена тегов заголовков без изменения вида ---------- */
/* десктоп, магазин: бывший H1 (wpcf-title) стал div, бывший H2 «Филиал на…» стал H1 */
#shop-page div.entry-title {
	font-family: Ubuntu, sans-serif;
	font-size: 33px;
	font-weight: 500;
	line-height: 1.3;
	color: #777;
	text-align: center;
	margin: 0 0 40px;
}
#shop-page h1.entry-subtitle {
	font-family: arial, sans-serif;
	font-size: 21px;
	font-weight: 500;
	line-height: 1.2;
	color: #777;
	text-transform: none;
	letter-spacing: normal;
	text-align: center;
	margin: -31px 0 8px;
	padding: 0;
}
/* мобильная шапка: название сайта вне главной — div вместо H1 */
header .contacts .site-name {
	font-family: arial, sans-serif;
	font-size: 1em;
	font-weight: 700;
	line-height: 1.1;
	color: #e4222a;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0 0 6px;
	padding: 0;
}
/* мобильные магазин / записи: бывший H2 стал H1 */
#popular h1.kvk-h2 {
	font-family: pf_din_text_cond_promedium, sans-serif;
	font-size: 1em;
	font-weight: 500;
	line-height: 1.1;
	color: #373a3c;
	text-transform: uppercase;
	letter-spacing: normal;
	text-align: center;
	margin: 0 0 8px;
	padding: 10px 0;
}
/* мобильный прайс: div.dummy стал H1 — размеры из .dummy, остальное как у div */
h1.dummy {
	font-family: inherit;
	font-weight: 400;
	color: inherit;
	text-transform: none;
	letter-spacing: normal;
	margin: 0;
}

/* мобильный магазин: телефон вынесен из H1 в отдельную строку */
#popular p.kvk-shop-tel {
	font-family: pf_din_text_cond_promedium, sans-serif;
	font-size: 1em;
	text-align: center;
	margin: -8px 0 8px;
}

/* страница магазина: блок с часами, наличием, услугами, фото (inc/kvk-shops.php) */
.kvk-shop-info { padding: 30px 0 10px; color: #373a3c; line-height: 1.5; }
.kvk-shop-info--m { padding: 15px 0 5px; font-size: 15px; }
.kvk-shop-info h2 { font-size: 24px; margin: 20px 0 10px; text-transform: none; }
.kvk-shop-info h3 { font-size: 19px; margin: 18px 0 8px; text-transform: none; }
.kvk-shop-info--m h2 { font-size: 19px; }
.kvk-shop-info--m h3 { font-size: 17px; }
.kvk-shop-info ul { margin: 0 0 10px 20px; padding: 0; list-style: disc; }
.kvk-shop-info li { margin: 0 0 4px; }
.kvk-shop-brand { font-weight: 600; color: #e4222a; margin: 0 0 8px; }
.kvk-shop-facts { background: #f3f6f8; border-radius: 6px; padding: 12px 16px; }
.kvk-shop-facts div { margin: 2px 0; }
.kvk-shop-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kvk-shop-info--m .kvk-shop-gallery { grid-template-columns: repeat(2, 1fr); }
.kvk-shop-gallery img { width: 100%; height: 160px; object-fit: cover; border-radius: 4px; display: block; }
.kvk-shop-info--m .kvk-shop-gallery img { height: 120px; }
