/**
 * Страница категории каталога (taxonomy-catalog_category.php).
 * Две секции: обложка категории и модельный ряд с фильтрами.
 */

/* ───────────────  Обложка  ─────────────── */

.cat-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: calc(100vh - 76px);
	overflow: hidden;
	background: var(--t-dark);
	color: #fff;
}

.cat-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.cat-hero__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: .9;
	filter: saturate(.82) contrast(1.05) brightness(.82) sepia(.05);
}

.cat-hero__shade {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(34, 28, 24, .55), rgba(34, 28, 24, .78));
}

.cat-hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	padding: 0 var(--t-pad-x);
	text-align: center;
}

.cat-hero__content {
	max-width: 880px;
	margin: 0 auto;
}

.cat-hero__eyebrow {
	margin-bottom: 22px;
	letter-spacing: .2em;
}

.cat-hero__title {
	margin: 0;
	font-family: var(--t-font-display);
	font-weight: 800;
	font-size: clamp(38px, 5vw, 72px);
	line-height: 1;
	letter-spacing: -.03em;
	color: #fff;
}

.cat-hero__lead {
	max-width: 64ch;
	margin: 26px auto 0;
	font-size: 18px;
	line-height: 1.6;
	color: rgba(255, 255, 255, .86);
}

.cat-hero__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin-top: 34px;
}

/* ───────────────  Модельный ряд  ─────────────── */

.cat-list {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: calc(100vh - 76px);
	padding: clamp(56px, 7vh, 100px) 0;
	background: var(--t-bg);
}

.cat-list__inner {
	width: 100%;
	padding: 0 var(--t-pad-x);
}

.cat-list__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 34px;
}

.cat-list__tag {
	padding: 13px 26px;
	border: none;
	border-radius: 999px;
	background: rgba(34, 31, 28, .06);
	color: var(--t-dark);
	font-family: var(--t-font-display);
	font-weight: 600;
	font-size: 16px;
	cursor: pointer;
	transition: .14s;
}

.cat-list__tag:hover {
	background: rgba(34, 31, 28, .12);
}

.cat-list__tag.is-active {
	background: var(--t-dark);
	color: #fff;
}

.cat-list__count {
	margin: 0 0 18px;
	font-family: var(--t-font-display);
	font-weight: 600;
	font-size: 14px;
	color: var(--t-muted);
}

.cat-list__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 26px;
}

/* ───────────────  Карточка модели  ─────────────── */

/* display:flex перебивает браузерное [hidden]{display:none} — возвращаем скрытие. */
.cat-card[hidden] {
	display: none;
}

.cat-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 6px 18px rgba(34, 31, 28, .07);
	transition: .18s;
}

.cat-card:hover {
	box-shadow: 0 16px 36px rgba(34, 31, 28, .12);
}

.cat-card__media {
	position: relative;
	aspect-ratio: 5 / 4;
	overflow: hidden;
	filter: saturate(.82) contrast(1.08) brightness(.88) sepia(.06);
}

.cat-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cat-card__num {
	position: absolute;
	left: 16px;
	top: 16px;
	padding: 6px 12px;
	border-radius: 6px;
	background: rgba(28, 21, 15, .55);
	font-family: var(--t-font-display);
	font-weight: 800;
	font-size: 13px;
	color: #fff;
}

.cat-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 28px 30px 30px;
}

.cat-card__title {
	margin: 0 0 16px;
	font-family: var(--t-font-display);
	font-weight: 800;
	font-size: 22px;
	line-height: 1.18;
	letter-spacing: -.01em;
}

.cat-card__specs {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin: 0 0 20px;
	padding-top: 14px;
	border-top: 1px solid rgba(34, 31, 28, .12);
	font-size: 13px;
	line-height: 1.4;
	color: #36322E;
}

.cat-card__spec,
.cat-card__price {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.cat-card__spec dt,
.cat-card__price dt {
	color: var(--t-muted);
}

.cat-card__spec dd,
.cat-card__price dd {
	margin: 0;
	text-align: right;
	font-weight: 600;
}

/* Цена прижата к низу карточки, чтобы кнопки стояли в одну линию. */
.cat-card__price {
	margin: auto 0 18px;
	padding-top: 13px;
	border-top: 1px solid rgba(34, 31, 28, .12);
	font-size: 13px;
}

.cat-card__price dd {
	font-family: var(--t-font-display);
	font-weight: 800;
	font-size: 18px;
}

.cat-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.cat-list__empty {
	max-width: 60ch;
	margin: 24px 0 0;
	font-size: 16px;
	line-height: 1.55;
	color: #4C463F;
}

.cat-list__empty a {
	color: var(--t-accent-dark);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ───────────────  Адаптив  ─────────────── */

@media (max-width: 980px) {
	.cat-list {
		min-height: 0;
	}

	.cat-list__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.cat-hero {
		min-height: 0;
		padding: clamp(72px, 12vh, 120px) 0;
	}

	.cat-list__grid {
		grid-template-columns: 1fr;
	}

	.cat-list__tags {
		gap: 8px;
		margin-bottom: 24px;
	}

	.cat-list__tag {
		padding: 11px 18px;
		font-size: 14px;
	}

	.cat-card__body {
		padding: 22px 20px 24px;
	}
}
