/* NOTE:
   В файле ранее было 2 версии одних и тех же правил (#brandList / .tabloid / hover и т.д.).
   Оставляем одну финальную, чтобы стили не "перебивались" между собой. */

/* Шапка блока брендов в общем стиле сайта */

.tsk-brand-list-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.tsk-brand-title-stamp {
	font-family: "Montserrat", Arial, sans-serif;
	font-weight: 700;
	font-size: 32px;
	line-height: 1.2;
	color: #1a1a1a;
	border: none;
	padding: 0;
	text-transform: none;
}

/* Однострочный заголовок в стиле blueprint-тайтла, но в h2 */

.tsk-brand-title-stamp .blueprint-title-text {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
}

.tsk-brand-title-stamp .blueprint-title-main {
	font-size: 24px;
	font-weight: 700;
	color: #111827;
	line-height: 1.2;
}

.tsk-brand-title-stamp .blueprint-title-sub {
	color: #ffcc33;
}

.tsk-brand-list-all-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 16px;
	border-radius: 999px;
	color: #1a1a1a;
	font-family: "Montserrat", Arial, sans-serif;
	font-weight: 600;
	font-size: 12px;
	text-decoration: none;
	background: linear-gradient(135deg, #ffcc33, #ffd700 50%, #ffcc33);
	background-size: 200% 200%;
	border: 1px solid rgba(255, 204, 51, 0.3);
	box-shadow:
		0 2px 6px rgba(255, 204, 51, 0.25),
		inset 0 1px 2px rgba(255, 255, 255, 0.5);
	transition:
		background-position 0.3s ease,
		box-shadow 0.2s ease,
		transform 0.15s ease;
}

.tsk-brand-list-all-link:hover {
	background-position: 100% 0;
	transform: translateY(-1px);
	box-shadow:
		0 4px 10px rgba(255, 204, 51, 0.35),
		inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

@media (max-width: 576px) {
	.tsk-brand-list-header {
		flex-direction: column;
		align-items: center;
		gap: 0;
	}
}

/* .tsk-brand-list-wrapper — обёртка, если понадобятся отступы/фон */

/* Убираем подчёркивающую линию под заголовком только в блоке брендов */

#brandList .news-block-title:after {
	display: none;
}

#brandList .ajaxContainer.brand-cont {
	padding: 8px 0;
	border: none;
}

/* Сетка карточек брендов в стиле tsk_react */

#brandList .items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 16px;
	border: none;
}

@media (max-width: 480px) {
	#brandList .items {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 360px) {
	#brandList .items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

#brandList .item {
	box-sizing: border-box;
	background-color: transparent;
	border: none;
	height: auto;
	line-height: normal;
	overflow: visible;
	float: none;
}

#brandList .tabloid {
	position: relative;
	padding: 16px;
	background-color: #f9fafb;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 96px;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.15s ease,
		background-color 0.2s ease;
}

#brandList .tabloid:hover {
	border-color: #ffcc33;
	background-color: #fffdf5;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
	transform: translateY(-2px);
}

#brandList .markerContainer {
	position: absolute;
	z-index: 2;
	left: 10px;
	top: 10px;
}

#brandList .marker {
	font:
		normal normal 11px "Montserrat",
		Arial,
		sans-serif;
	background-color: #424242;
	margin-bottom: 6px;
	color: #fff;
	padding: 2px 8px;
	line-height: 1.4;
	border-radius: 999px;
}

#brandList .picture {
	text-align: center;
	display: block;
}

#brandList .picture img {
	vertical-align: middle;
	max-height: 56px;
	max-width: 100%;
	object-fit: contain;
	filter: grayscale(100%);
	transition:
		filter 0.25s ease,
		transform 0.2s ease;
}

#brandList .tabloid:hover .picture img {
	filter: grayscale(0%);
	transform: scale(1.03);
}

/* Защита от конфликтов со старыми стилями страницы /brands/
   (там тоже есть #brandList и правила для .tabloid). */
#brandList.brandlist-line .items {
	display: grid;
}

#brandList.brandlist-line .items .item {
	float: none;
	width: auto;
	height: auto;
	line-height: normal;
	background: transparent;
	border: 0;
}

#brandList.brandlist-line .items .item .tabloid {
	padding: 16px;
	background-color: #f9fafb;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 96px;
}

#brandList.brandlist-line .items .item .tabloid:hover {
	border-color: #ffcc33;
	background-color: #fffdf5;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
	transform: translateY(-2px);
}
