/* KEY ACADEMY: сравнительная таблица XTOOL + компактная ссылка на карточке.
   Геометрию 580/200/76/151 карточки не меняет: слот заголовка остаётся 76px. */

.ka-xtool-compare {
	margin: 0 0 40px;
	color: #4f5358;
}
.ka-xtool-compare__lead,
.ka-xtool-compare__note,
.ka-xtool-compare__foot,
.ka-xtool-compare__copy {
	max-width: 920px;
	margin: 0 0 14px;
	line-height: 1.45;
}
.ka-xtool-compare__note {
	font-size: 14px;
	color: #6b6f74;
}
.ka-xtool-compare__foot,
.ka-xtool-compare__copy {
	font-size: 13px;
	color: #6b6f74;
}
.ka-xtool-compare__scroll {
	overflow: auto;
	max-width: 100%;
	min-height: 280px;
	max-height: calc(100dvh - var(--ka-xtool-head, 0px) - 16px);
	margin: 18px 0 22px;
	border: 1px solid #d2d2d2;
	background: #fff;
	-webkit-overflow-scrolling: touch;
}
.ka-xtool-compare__scroll.is-pinned {
	z-index: 20;
	margin: 0;
	box-shadow: 0 8px 24px rgba(47, 51, 55, .18);
}
.ka-xtool-compare__table {
	border-collapse: separate;
	border-spacing: 0;
	min-width: 1280px;
	width: 100%;
	font-size: 13px;
	line-height: 1.25;
}
.ka-xtool-compare__caption {
	caption-side: top;
	text-align: left;
	padding: 12px 14px;
	font-weight: 700;
	font-size: 16px;
	color: #4f5358;
	background: #fff8f1;
	border-bottom: 1px solid #f3c391;
}
.ka-xtool-compare__table th,
.ka-xtool-compare__table td {
	border-bottom: 1px solid #ececec;
	border-right: 1px solid #f3f3f3;
	padding: 8px 10px;
	vertical-align: middle;
}
.ka-xtool-compare__table thead th {
	position: sticky;
	top: 0;
	z-index: 3;
	background: #4f5358;
	color: #fff;
	font-weight: 700;
	text-align: center;
	white-space: nowrap;
	box-shadow: 0 1px 0 #4f5358;
}
.ka-xtool-compare__table thead th.ka-xtool-compare__feat {
	position: sticky;
	top: 0;
	left: 0;
	z-index: 5;
	text-align: left;
	white-space: normal;
	min-width: 280px;
}
.ka-xtool-compare__feat {
	position: sticky;
	left: 0;
	z-index: 2;
	background: #fff;
	text-align: left;
	font-weight: 600;
	min-width: 260px;
	max-width: 340px;
	box-shadow: 1px 0 0 #ececec;
}
.ka-xtool-compare__model {
	min-width: 88px;
	max-width: 120px;
	white-space: normal;
	font-size: 12px;
}
.ka-xtool-compare__cell {
	text-align: center;
	background: #fff;
}
.ka-xtool-compare__cell.is-yes {
	background: #fff8f1;
}
.ka-xtool-compare__yes {
	display: inline-block;
	color: #f4943e;
	font-weight: 700;
	font-size: 16px;
}
.ka-xtool-compare__group th {
	position: sticky;
	left: 0;
	z-index: 1;
	background: #f4943e;
	color: #fff;
	font-weight: 700;
	letter-spacing: .04em;
	text-align: left;
	padding: 9px 14px;
}

form.b-product-form:has(> .ka-xtool-compare-btn) {
	display: flex !important;
	flex-wrap: wrap;
	align-items: stretch;
}
form.b-product-form:has(> .ka-xtool-compare-btn) > .ka-xtool-compare-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex: 1 1 100%;
	width: 100%;
	max-width: 100%;
	height: 60px !important;
	min-height: 60px !important;
	max-height: 60px !important;
	margin: 10px 0 0 0 !important;
	box-sizing: border-box !important;
	white-space: nowrap !important;
	text-decoration: none;
	overflow: hidden;
}
@media (max-width: 767px) {
	form.b-product-form:has(> .ka-xtool-compare-btn) > .ka-xtool-compare-btn {
		flex: 1 1 100%;
		margin-left: 0 !important;
		margin-top: 10px !important;
	}
}

/* Каталожная сетка: ссылка внутри слота 76px, карточка 580 не растёт. */
.b-product-grid__item > .b-product-item .b-product-item__title-slot:has(> .ka-xtool-card-link) > .b-product-item__title,
.b-product-grid__item > .b-product-item .b-product-item__title-slot:has(> .ka-xtool-card-link) > a.b-product-item__title,
.b-product-slider__item > .b-product-item .b-product-item__title-slot:has(> .ka-xtool-card-link) > .b-product-item__title,
.b-product-slider__item > .b-product-item .b-product-item__title-slot:has(> .ka-xtool-card-link) > a.b-product-item__title {
	height: 60px !important;
	min-height: 60px !important;
	max-height: 60px !important;
	flex: 0 0 60px !important;
}
.ka-xtool-card-link {
	display: block;
	height: 16px;
	max-height: 16px;
	line-height: 16px;
	margin: 0;
	padding: 0;
	font-size: 11px;
	font-weight: 700;
	color: #f4943e !important;
	text-decoration: none !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ka-xtool-card-link:hover {
	color: #d97820 !important;
	text-decoration: underline !important;
}

/* KEY ACADEMY: таблица KEYDIY. Геометрия кнопок/ссылки как у XTOOL. */
.ka-keydiy-compare .ka-xtool-compare__scroll {
	overflow-x: auto;
	overflow-y: visible;
	max-height: none !important;
	min-height: 0;
	position: static !important;
	top: auto !important;
	left: auto !important;
	width: auto !important;
	box-shadow: none;
}
.ka-keydiy-compare .ka-xtool-compare__table {
	table-layout: fixed;
	width: 100%;
	min-width: 1180px;
}
.ka-keydiy-compare .ka-xtool-compare__table thead th {
	position: sticky;
	top: 0;
}
.ka-keydiy-compare .ka-xtool-compare__feat {
	width: 260px;
}
.ka-keydiy-compare .ka-xtool-compare__model,
.ka-keydiy-compare .ka-xtool-compare__cell {
	width: 184px;
	min-width: 184px;
	max-width: 184px;
}
.ka-keydiy-compare .ka-xtool-compare__model {
	white-space: normal;
	font-size: 12px;
}
.ka-keydiy-compare .ka-xtool-compare__cell {
	text-align: left;
	vertical-align: top;
	white-space: normal;
	font-size: 12px;
	line-height: 1.35;
}
.ka-keydiy-col-feat {
	width: 260px;
}
.ka-keydiy-col-model {
	width: 184px;
}
.ka-keydiy-compare .ka-xtool-compare__cell.is-yes {
	background: #f3fbf3;
}
.ka-keydiy-compare .ka-xtool-compare__cell.is-pay {
	background: #fff8e8;
}
.ka-keydiy-compare .ka-xtool-compare__cell.is-acc {
	background: #eef6ff;
}
.ka-keydiy-compare .ka-xtool-compare__cell.is-both {
	background: #fff3e6;
}
.ka-keydiy-compare .ka-xtool-compare__cell.is-partial {
	background: #fffbe6;
}
.ka-keydiy-compare .ka-xtool-compare__cell.is-no {
	background: #f7f7f7;
	color: #8a8e93;
}

.ka-keydiy-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}
.ka-keydiy-legend__item {
	flex: 1 1 180px;
	min-height: 72px;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #ececec;
	background: #fff;
	font-size: 12px;
	line-height: 1.35;
}
.ka-keydiy-legend__item strong,
.ka-keydiy-legend__item span {
	display: block;
}
.ka-keydiy-legend__item.is-yes { background: #f3fbf3; }
.ka-keydiy-legend__item.is-pay { background: #fff8e8; }
.ka-keydiy-legend__item.is-acc { background: #eef6ff; }
.ka-keydiy-legend__item.is-both { background: #fff3e6; }
.ka-keydiy-legend__item.is-no { background: #f7f7f7; color: #8a8e93; }

/* KA 15.10.2026: xtool picker.
   Только .ka-xtool-pick. Классы таблицы и кнопки карточки не переопределяются:
   их использует страница KEYDIY и ссылка «Сравнительная таблица». */

.ka-xtool-pick__panel,
.ka-xtool-pick__result {
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	padding: 16px;
	margin: 0 0 18px;
	max-width: 100%;
	box-sizing: border-box;
}
.ka-xtool-pick__step {
	margin: 0 0 12px;
	font-size: 18px;
	line-height: 1.3;
	font-weight: 700;
	color: #4f5358;
	background: #fff;
}
.ka-xtool-pick__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 8px;
	max-width: 100%;
}
.ka-xtool-pick__device {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid #e6e6e6;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	box-sizing: border-box;
}
.ka-xtool-pick__device:has(.ka-xtool-pick__input:checked) {
	border-color: #5fb878;
	background: #f4faf6;
}
.ka-xtool-pick__input {
	position: absolute;
	left: 12px;
	top: 50%;
	width: 22px;
	height: 22px;
	margin: -11px 0 0;
	opacity: 0;
	z-index: 2;
	cursor: pointer;
}
.ka-xtool-pick__box {
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	box-sizing: border-box;
	border: 2px solid #c5c5c5;
	border-radius: 4px;
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.ka-xtool-pick__input:checked + .ka-xtool-pick__box {
	border-color: #5fb878;
	background: #fff;
}
.ka-xtool-pick__input:checked + .ka-xtool-pick__box::after {
	content: "";
	width: 6px;
	height: 11px;
	margin-top: -2px;
	border: solid #5fb878;
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg);
	box-sizing: border-box;
}
.ka-xtool-pick__input:focus-visible + .ka-xtool-pick__box {
	outline: 2px solid #5fb878;
	outline-offset: 2px;
}
.ka-xtool-pick__name {
	font-size: 15px;
	line-height: 1.25;
	font-weight: 700;
	color: #4f5358;
}
.ka-xtool-pick__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 16px;
}
.ka-xtool-pick__btn {
	flex: 0 0 300px;
	width: 300px;
	max-width: 100%;
	height: 60px !important;
	min-height: 60px !important;
	max-height: 60px !important;
	margin: 0;
	padding: 0 16px !important;
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	white-space: nowrap !important;
	line-height: 1 !important;
	font-size: 15px;
	font-weight: 700;
	font-family: "Roboto", Arial, sans-serif;
	text-transform: uppercase;
	text-decoration: none;
	letter-spacing: 0;
	cursor: pointer;
	border: 2px solid #f4943e;
	border-radius: 0;
}
.ka-xtool-pick__btn.b-btn_orange {
	background: #f4943e;
	border-color: #f4943e;
	color: #fff;
}
.ka-xtool-pick__btn.b-btn_orange-outline {
	background: #fff;
	border-color: #f4943e;
	color: #f4943e;
}
@media (min-width: 900px) {
	.ka-xtool-pick__btn.b-btn_orange:hover,
	.ka-xtool-pick__btn.b-btn_orange-outline:hover {
		background: #f4943e;
		border-color: #f4943e;
		color: #fff;
	}
}
.ka-xtool-pick__hint,
.ka-xtool-pick__summary,
.ka-xtool-pick__legend {
	margin: 12px 0 0;
	font-size: 14px;
	line-height: 1.4;
	color: #6b6f74;
}
.ka-xtool-pick__legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
}
.ka-xtool-pick__result {
	scroll-margin-top: 80px;
}
.ka-xtool-pick__group {
	margin: 16px 0 0;
	padding: 10px 12px;
	background: #fff8f1;
	color: #4f5358;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	border-left: 4px solid #f4943e;
}
.ka-xtool-pick__sheet-wrap {
	margin-top: 14px;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.ka-xtool-pick__sheet {
	--ka-cols: 1;
	display: grid;
	grid-template-columns: minmax(260px, 1.35fr) repeat(var(--ka-cols), minmax(112px, 1fr));
	width: 100%;
	min-width: calc(260px + var(--ka-cols) * 112px);
	align-items: stretch;
	background: #fff;
}
.ka-xtool-pick__corner,
.ka-xtool-pick__colhead {
	position: sticky;
	top: 0;
	z-index: 2;
	box-sizing: border-box;
	min-height: 48px;
	padding: 8px 8px 10px;
	border-bottom: 2px solid #e6e6e6;
	background: #fff;
	color: #4f5358;
	font-size: 14px;
	line-height: 1.25;
	font-weight: 700;
}
.ka-xtool-pick__corner {
	left: 0;
	z-index: 3;
	padding-left: 0;
	color: #6b6f74;
}
.ka-xtool-pick__colhead {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	text-align: center;
	overflow-wrap: break-word;
}
.ka-xtool-pick__sheet .ka-xtool-pick__group {
	grid-column: 1 / -1;
	margin: 0;
}
.ka-xtool-pick__feat-name,
.ka-xtool-pick__cell {
	box-sizing: border-box;
	min-height: 52px;
	border-bottom: 1px solid #ececec;
	background: #fff;
}
.ka-xtool-pick__feat-name {
	position: sticky;
	left: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	min-width: 0;
	padding: 10px 14px 10px 0;
	font-size: 15px;
	line-height: 1.35;
	font-weight: 700;
	color: #4f5358;
	overflow-wrap: break-word;
	box-shadow: 8px 0 8px -8px rgba(79, 83, 88, 0.18);
}
.ka-xtool-pick__cell {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px 6px;
	text-align: center;
}
.ka-xtool-pick__mark-icon {
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 1;
	font-weight: 700;
	box-sizing: border-box;
}
.ka-xtool-pick__mark-icon.is-yes {
	color: #5fb878;
}
.ka-xtool-pick__mark-icon.is-no {
	color: #9aa0a6;
}
.ka-xtool-pick__mark-text {
	font-size: 13px;
	line-height: 1.25;
	font-weight: 700;
	color: #4f5358;
	text-align: center;
}
@media (max-width: 640px) {
	.ka-xtool-pick__panel,
	.ka-xtool-pick__result {
		padding: 12px;
	}
	.ka-xtool-pick__grid {
		grid-template-columns: 1fr;
	}
	.ka-xtool-pick__btn {
		flex: 1 1 100%;
		width: 100%;
	}
	.ka-xtool-pick__sheet {
		grid-template-columns: minmax(132px, 1.15fr) repeat(var(--ka-cols), minmax(68px, 1fr));
		width: 100%;
		min-width: calc(132px + var(--ka-cols) * 68px);
	}
	.ka-xtool-pick__corner,
	.ka-xtool-pick__colhead {
		font-size: 12px;
	}
	.ka-xtool-pick__feat-name {
		font-size: 13px;
		padding-right: 8px;
	}
}
