/* Поиск v2 (бриф, раздел 4): подсказки в шапке и страница результатов. Цвета — переменные темы --im-*. */

/* ---- Подсказки: рисуются внутри .search__menu темы (показ/скрытие — body.search-open, как раньше) ---- */
.search__menu.vtv-sg-on {
	display: block;
	padding: 0;
	max-height: min(70vh, 600px);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	box-shadow: 0 12px 32px rgba(25, 24, 22, .12);
}
.search__menu.vtv-sg-on::before,
.search__menu.vtv-sg-on::after,
.search__menu.vtv-sg-on > .search__left,
.search__menu.vtv-sg-on > .search__right {
	display: none !important;
}
.vtv-sg {
	padding: 6px 0 0;
	color: var(--im-chernyy);
}
/* пока подсказок нет (первая буква, очистка поля) — ни полоски, ни тени под полем */
.search__menu.vtv-sg-on.vtv-sg-empty {
	box-shadow: none;
}
.vtv-sg-empty .vtv-sg {
	padding: 0;
}
.vtv-sg--busy {
	opacity: .6;
	transition: opacity .2s;
}
.vtv-sg__live {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.vtv-sg__head {
	padding: 12px 20px 4px;
	font-size: 12px;
	line-height: 1.3;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--im-seryy);
}
.vtv-sg__note,
.vtv-sg__msg {
	padding: 14px 20px;
	font-size: 14px;
	color: var(--im-seryy);
}
.vtv-sg__note {
	padding-bottom: 4px;
}
.vtv-sg__msg--loading::before {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 10px;
	vertical-align: -2px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: vtv-sg-spin .7s linear infinite;
}
@keyframes vtv-sg-spin {
	to { transform: rotate(360deg); }
}
.vtv-sg__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 20px;
	color: var(--im-chernyy);
	text-decoration: none;
	cursor: pointer;
}
.vtv-sg__item[aria-selected="true"],
.vtv-sg__item:hover,
.vtv-sg__item:focus-visible {
	background: var(--im-fon);
	color: var(--im-chernyy);
	outline: none;
}
.vtv-sg__thumb {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(25, 24, 22, .08);
}
.vtv-sg__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.vtv-sg__thumb--empty {
	background: var(--im-fon);
	color: var(--im-seryy);
	font-weight: 500;
	text-transform: uppercase;
}
.vtv-sg__item--category .vtv-sg__thumb {
	display: none;
}
.vtv-sg__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.vtv-sg__title {
	font-size: 14px;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.vtv-sg__title b {
	font-weight: 600;
}
.vtv-sg__meta {
	margin-top: 2px;
	font-size: 12px;
	line-height: 1.35;
	color: var(--im-seryy);
}
.vtv-sg__price {
	color: var(--im-chernyy);
	font-weight: 600;
	white-space: nowrap;
}
.vtv-sg mark {
	background: none;
	color: inherit;
	font-weight: 600;
	padding: 0;
}
.vtv-sg__badge {
	display: inline-block;
	margin-right: 6px;
	padding: 1px 6px;
	font-size: 11px;
	font-weight: 500;
	vertical-align: 1px;
	color: var(--im-belyy);
	background: var(--im-akcent---dop);
}
.vtv-sg__all {
	display: block;
	margin-top: 6px;
	padding: 12px 20px;
	border-top: 1px solid rgba(128, 126, 125, .2);
	color: var(--im-akcent);
	font-size: 14px;
	font-weight: 500;
}
.vtv-sg__all[aria-selected="true"],
.vtv-sg__all:hover {
	color: var(--im-akcent---hover);
}
@media (max-width: 1024px) {
	/* низ списка — выше кнопки чата Jivo в правом нижнем углу (~100 px) */
	.search__menu.vtv-sg-on {
		max-height: calc(100vh - 250px);
		max-height: calc(100dvh - 250px);
		padding: 0;
	}
	.vtv-sg__head,
	.vtv-sg__item,
	.vtv-sg__note,
	.vtv-sg__msg,
	.vtv-sg__all {
		padding-left: 15px;
		padding-right: 15px;
	}
}
@media (max-width: 480px) {
	.vtv-sg__thumb {
		flex-basis: 40px;
		width: 40px;
		height: 40px;
	}
	.vtv-sg__title {
		font-size: 13px;
	}
}

/* ---- Страница результатов ---- */
.vtv-sr .search-page__meta {
	color: var(--im-seryy);
	font-size: 16px;
}
.vtv-sr__entities {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 20px;
	margin-bottom: 30px;
}
.vtv-sr-entity {
	display: flex;
	align-items: center;
	gap: 20px;
	flex: 1 1 360px;
	max-width: 640px;
	padding: 20px;
	background: var(--im-belyy);
	border: 1px solid rgba(25, 24, 22, .1);
	color: var(--im-chernyy);
	transition: border-color .3s ease;
}
a.vtv-sr-entity:hover {
	border-color: var(--im-akcent);
	color: var(--im-chernyy);
}
.vtv-sr-entity__img {
	flex: 0 0 120px;
	width: 120px;
	height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: #fff;
}
.vtv-sr-entity__img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.vtv-sr-entity__img--empty {
	background: var(--im-fon);
	color: var(--im-akcent);
	font-size: 48px;
	font-weight: 500;
	text-transform: uppercase;
}
.vtv-sr-entity__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.vtv-sr-entity__kind {
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--im-seryy);
}
.vtv-sr-entity__title {
	font-size: 24px;
	font-weight: 500;
	line-height: 1.2;
}
.vtv-sr-entity__meta {
	font-size: 14px;
	color: var(--im-seryy);
}
.vtv-sr-entity__more {
	margin-top: 4px;
	font-size: 14px;
	font-weight: 500;
	color: var(--im-akcent);
}
.vtv-sr-entity__cta {
	align-self: center;
}
.vtv-sr__cats {
	margin-bottom: 30px;
}
.vtv-sr__cats-title {
	margin-bottom: 12px;
	font-size: 18px;
	font-weight: 500;
}
.vtv-sr__cats .tags-section__link {
	padding: 8px 18px;
}
.vtv-sr__cats-count {
	margin-left: 4px;
	color: var(--im-seryy);
	font-weight: 400;
}
.vtv-sr__cats .tags-section__link:hover .vtv-sr__cats-count {
	color: inherit;
}
@media (max-width: 768px) {
	.vtv-sr-entity {
		flex-basis: 100%;
		gap: 15px;
		padding: 15px;
	}
	.vtv-sr-entity__img {
		flex-basis: 80px;
		width: 80px;
		height: 80px;
	}
	.vtv-sr-entity__title {
		font-size: 20px;
	}
	.vtv-sr__entities {
		gap: 12px;
	}
}

/* Этап 8: фильтры v2 на странице результатов (блок каталога .vtv-ff-catalog модуля filters) */
.vtv-sr-ff .search-page__pagination {
	margin-top: 40px;
}
.vtv-sr-ff .vtv-ff-empty {
	padding-top: 0;
}
/* без выбранных фильтров блок чипсов пуст (число найденных — над выдачей) */
.vtv-sr-ff .vtv-ff-chips:empty {
	display: none;
}
@media (min-width: 1025px) {
	/* в строке над товарами только кнопка «Фильтр» мобильной панели — на десктопе строка не нужна */
	.vtv-sr-ff .catalog__top-product {
		display: none;
	}
}
