/* Каталог запчастей — карточки (дилер РСМ #D0043C) */
:root {
	--yp-cat-red: #d0043c;
	--yp-cat-ink: #1a1a1a;
	--yp-cat-muted: #5c5c5c;
	--yp-cat-line: #e8e8e8;
	--yp-cat-light: #f7f7f7;
}

/* —— Герой: поиск по каталогу (светлая карточка, красная полоса слева) —— */
.yp-hero {
	position: relative;
	margin: 0 0 2rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	flex-wrap: wrap;
	background: #fff;
	border-radius: 6px;
	border-left: 4px solid var(--yp-cat-red);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
	padding: 1.75rem 1.5rem;
	box-sizing: border-box;
}
@media (min-width: 768px) {
	.yp-hero {
		padding: 2rem 2.25rem;
	}
}
.yp-hero__main {
	flex: 1 1 340px;
	min-width: 0;
}
.yp-hero__eyebrow {
	display: inline-block;
	margin: 0 0 0.6rem;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--yp-cat-red);
}
@media (min-width: 768px) {
	.yp-hero__eyebrow {
		font-size: 1.25rem;
	}
}
.yp-hero__lead {
	margin: 0 0 1.25rem;
	font-size: 0.95rem;
	line-height: 1.45;
	color: var(--yp-cat-muted);
}
.yp-hero__search {
	display: flex;
	align-items: center;
	position: relative;
	max-width: 640px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
}
.yp-hero__search-icon {
	display: flex;
	align-items: center;
	padding-left: 0.85rem;
	color: #8a8a8a;
	flex: 0 0 auto;
}
.yp-hero__search-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	border: none !important;
	outline: none;
	padding: 0.7rem 0.75rem !important;
	font-size: 0.95rem;
	color: var(--yp-cat-ink);
	background: transparent;
	text-overflow: ellipsis;
	box-sizing: border-box;
}
.yp-hero__search-input::placeholder {
	color: #9a9a9a;
}
.yp-hero__search-btn {
	flex: 0 0 auto;
	background: var(--yp-cat-red);
	border: none;
	color: #fff;
	padding: 0.7rem 1.6rem;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: filter 0.15s ease;
}
.yp-hero__search-btn:hover {
	filter: brightness(0.95);
}
.yp-hero__benefits {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	list-style: none;
	margin: 0.9rem 0 0;
	padding: 0;
}
.yp-hero__benefits li {
	position: relative;
	padding-left: 0.95rem;
	font-size: 0.82rem;
	color: var(--yp-cat-muted);
}
.yp-hero__benefits li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--yp-cat-red);
}
.yp-hero__orders {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	text-decoration: none;
	text-align: center;
	color: var(--yp-cat-ink);
}
.yp-hero__orders-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--yp-cat-light);
	margin-bottom: 0.15rem;
}
.yp-hero__orders-title {
	font-size: 0.9rem;
	font-weight: 600;
}
.yp-hero__orders-sub {
	font-size: 0.78rem;
	color: var(--yp-cat-muted);
}
@media (max-width: 640px) {
	.yp-hero__orders {
		flex-direction: row;
		gap: 0.6rem;
		align-items: center;
	}
	.yp-hero__orders-icon {
		width: 48px;
		height: 48px;
	}
}

/* —— Сетка карточек —— */
.yp-cat-sections {
	margin-top: 0.5rem;
}
.yp-cat-sections__group-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--yp-cat-ink);
	margin: 0 0 1.25rem;
	padding-bottom: 0.5rem;
	border-bottom: 3px solid var(--yp-cat-red);
}
.yp-cat-sections__group-title a {
	color: inherit;
	text-decoration: none;
}
.yp-cat-sections__group-title a:hover {
	color: var(--yp-cat-red);
}
.yp-cat-sections__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	align-items: stretch;
}
@media (min-width: 640px) {
	.yp-cat-sections__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (min-width: 1100px) {
	.yp-cat-sections__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.35rem;
	}
}

.yp-cat-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	background: #fff;
	border: 1px solid var(--yp-cat-line);
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.yp-cat-card:hover {
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}
.yp-cat-card__media {
	position: relative;
	display: block;
	/* единый кадр 16:9 — все обложки подгоняются под него */
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	flex: 0 0 auto;
	overflow: hidden;
	background: #f0f0f0;
}
.yp-cat-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
	transition: transform 0.35s ease;
}
.yp-cat-card:hover .yp-cat-card__img {
	transform: scale(1.04);
}
.yp-cat-card__media-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 55%);
	pointer-events: none;
}
.yp-cat-card__media::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: var(--yp-cat-red);
}
.yp-cat-card__icon {
	position: absolute;
	left: 10px;
	bottom: 12px;
	z-index: 1;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.yp-cat-card__icon img {
	width: 100%;
	height: 100%;
	display: block;
}
.yp-cat-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	padding: 0.85rem 0.9rem 0.75rem;
	background: #fff;
}
.yp-cat-card__title {
	margin: 0 0 0.65rem;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
}
.yp-cat-card__title a {
	color: var(--yp-cat-ink);
	text-decoration: none;
}
.yp-cat-card__title a:hover {
	color: var(--yp-cat-red);
}

/* Скролл списка — равная высота карточек */
.yp-cat-card__list-wrap {
	flex: 1 1 auto;
	min-height: 180px;
	max-height: 240px;
	overflow-y: auto;
	overflow-x: hidden;
	margin: 0 0 0.65rem;
	padding-right: 4px;
	scrollbar-width: thin;
	scrollbar-color: var(--yp-cat-red) var(--yp-cat-light);
}
.yp-cat-card__list-wrap::-webkit-scrollbar {
	width: 6px;
}
.yp-cat-card__list-wrap::-webkit-scrollbar-thumb {
	background: var(--yp-cat-red);
	border-radius: 3px;
}
.yp-cat-card__list-wrap::-webkit-scrollbar-track {
	background: var(--yp-cat-light);
}
.yp-cat-card__list-wrap--empty {
	display: flex;
	align-items: center;
	overflow: hidden;
	background: var(--yp-cat-light);
	border-radius: 3px;
	padding: 0.75rem;
}
.yp-cat-card__empty-note {
	margin: 0;
	font-size: 0.85rem;
	line-height: 1.4;
	color: var(--yp-cat-muted);
}
.yp-cat-card__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.yp-cat-card__list li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #f0f0f0;
}
.yp-cat-card__list li:last-child {
	border-bottom: none;
}
.yp-cat-card__list a {
	display: block;
	padding: 0.4rem 0.15rem;
	font-size: 0.84rem;
	line-height: 1.35;
	color: var(--yp-cat-ink);
	text-decoration: none;
}
.yp-cat-card__list a:hover {
	color: var(--yp-cat-red);
}
.yp-cat-card__more {
	flex: 0 0 auto;
	display: inline-block;
	margin-top: auto;
	padding-top: 0.35rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--yp-cat-red);
	text-decoration: none;
	border-top: 1px solid var(--yp-cat-line);
}
.yp-cat-card__more:hover {
	text-decoration: underline;
}
.yp-cat-sections__empty {
	color: var(--yp-cat-muted);
}

/* Контейнер страницы каталога */
.yp-cat-page {
	padding-bottom: 3rem;
}
