/**
 * Архив категории каталога (список + сайдбар-фильтр).
 */

.gp-catalog-archive {
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem 1.25rem 3rem;
	font-family: Roboto, system-ui, sans-serif;
	color: #1a1a2e;
}

.gp-catalog-breadcrumbs {
	font-size: 0.875rem;
	margin-bottom: 0.75rem;
	color: #555;
}

.gp-catalog-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.gp-catalog-breadcrumbs a:hover {
	text-decoration: underline;
}

.gp-catalog-breadcrumbs__sep {
	margin: 0 0.35rem;
}

.gp-catalog-archive__header {
	margin: 0;
}

.gp-catalog-archive__title {
	margin: 0 0 1.5rem;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
}

/* Липкая зона: H1 категории + шапка таблицы (только архив с товарами). */
.gp-catalog-archive--has-sticky .gp-catalog-archive__header {
	position: sticky;
	top: var(--gp-catalog-sticky-top, 0);
	z-index: 25;
	margin-bottom: 1.25rem;
	background: #fff;
	padding-bottom: 0.75rem;
	box-shadow: 0 4px 12px rgba(11, 26, 72, 0.06);
}

.gp-catalog-archive--has-sticky .gp-catalog-archive__title {
	margin-bottom: 0;
}

.gp-catalog-archive__layout {
	display: grid;
	grid-template-columns: minmax(200px, 260px) 1fr;
	gap: 2rem;
	align-items: start;
}

.gp-catalog-archive__layout--placeholder {
	grid-template-columns: 1fr;
	max-width: 720px;
}

@media (max-width: 768px) {
	.gp-catalog-archive__layout {
		grid-template-columns: 1fr;
	}
}

/* Контент заглушки из Gutenberg (как на обычной странице) */
.gp-catalog-archive__content.entry-content {
	margin: 0;
	max-width: none;
}

.gp-catalog-archive__content.entry-content > *:first-child {
	margin-top: 0;
}

/* Запасной статический fallback (если страница пустая) */
.gp-catalog-placeholder--static {
	padding: 0;
	background: transparent;
	border: none;
}

.gp-catalog-placeholder__lead {
	margin: 0 0 1.25rem;
	font-size: 1.05rem;
	line-height: 1.65;
	color: #333;
}

.gp-catalog-placeholder__list {
	margin: 0 0 1.25rem;
	padding-left: 1.25rem;
	line-height: 1.6;
	color: #444;
}

.gp-catalog-placeholder__list li + li {
	margin-top: 0.5rem;
}

.gp-catalog-placeholder__footnote {
	margin: 0 0 1.5rem;
	font-size: 0.95rem;
	line-height: 1.6;
	color: #555;
}

.gp-catalog-placeholder__cta {
	margin-top: 0.5rem;
}

/* Sidebar filter */
.gp-catalog-filters-sidebar {
	background: #fff;
}

.gp-catalog-filter-form--sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.gp-catalog-filter-form--sidebar .gp-catalog-filter__label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	font-size: 0.9rem;
}

.gp-catalog-filter-form--sidebar select,
.gp-catalog-filter-power-range__select {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.75rem 0.65rem 0.85rem;
	border: 1px solid #1a1a2e;
	border-left: 4px solid #2e9b4b;
	background: #fff;
	font-size: 0.95rem;
	font-family: inherit;
}

.gp-catalog-filters-sidebar .gp-buton-link,
.gp-catalog-placeholder__cta .gp-buton-link,
.gp-catalog-archive__content .gp-buton-link {
	margin: 0;
}

/* Product table: фиксированная сетка — иначе ширины «прыгают» между страницами пагинации */
.gp-catalog-table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.gp-catalog-table col.gp-catalog-col--model {
	width: 17%;
}

.gp-catalog-table col.gp-catalog-col--engine {
	width: 34%;
}

.gp-catalog-table col.gp-catalog-col--power {
	width: 29%;
}

.gp-catalog-table col.gp-catalog-col--freq {
	width: 11%;
}

.gp-catalog-table col.gp-catalog-col--pdf {
	width: 9%;
}

.gp-catalog-table--with-fuel col.gp-catalog-col--model {
	width: 14%;
}

.gp-catalog-table--with-fuel col.gp-catalog-col--engine {
	width: 26%;
}

.gp-catalog-table--with-fuel col.gp-catalog-col--fuel {
	width: 14%;
}

.gp-catalog-table--with-fuel col.gp-catalog-col--power {
	width: 26%;
}

.gp-catalog-table--with-fuel col.gp-catalog-col--freq {
	width: 10%;
}

.gp-catalog-table--with-fuel col.gp-catalog-col--pdf {
	width: 10%;
}

.gp-catalog-table thead th {
	text-align: left;
	padding: 0.65rem 0.75rem;
	border-bottom: 2px solid #1a1a2e;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	background: #fff;
}

.gp-catalog-archive--has-sticky .gp-catalog-table thead th {
	position: sticky;
	top: calc(var(--gp-catalog-sticky-top, 0px) + var(--gp-catalog-archive-head-h, 0px));
	z-index: 20;
	box-shadow: 0 1px 0 #e0e0e0;
}

.gp-catalog-table__sort-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: inherit;
	text-decoration: none;
}

.gp-catalog-table__sort-link:hover {
	text-decoration: underline;
}

.gp-catalog-table__sort-indicator {
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 0.15rem;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid #999;
	opacity: 0.35;
	vertical-align: middle;
}

.gp-catalog-table__sort-link.is-sorted .gp-catalog-table__sort-indicator {
	opacity: 1;
	border-top-color: #1a1a2e;
}

.gp-catalog-table__sort-link.is-sorted--asc .gp-catalog-table__sort-indicator {
	border-top: none;
	border-bottom: 5px solid #1a1a2e;
}

.gp-catalog-table__sort-link.is-sorted--desc .gp-catalog-table__sort-indicator {
	border-bottom: none;
}

.gp-catalog-table tbody tr.gp-catalog-row {
	cursor: pointer;
	transition: background 0.15s ease;
}

.gp-catalog-table tbody tr.gp-catalog-row:hover,
.gp-catalog-table tbody tr.gp-catalog-row:focus {
	background: #f0f4f8;
	outline: none;
}

.gp-catalog-table tbody td {
	padding: 0.75rem;
	border-bottom: 1px solid #e0e0e0;
	vertical-align: middle;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.gp-catalog-table .gp-catalog-col--engine,
.gp-catalog-table .gp-catalog-col--power {
	white-space: normal;
}

.gp-catalog-table .gp-catalog-col--freq,
.gp-catalog-table .gp-catalog-col--pdf {
	white-space: nowrap;
}

.gp-catalog-row__title {
	font-weight: 600;
}

.gp-catalog-row__pdf-link {
	color: #c41e3a;
	font-weight: 600;
	text-decoration: underline;
}

.gp-catalog-row__pdf-link:hover {
	text-decoration: none;
}

.gp-catalog-row__pdf-empty {
	color: #999;
}

.gp-catalog-archive__empty {
	color: #666;
}

.gp-catalog-archive__pagination {
	margin-top: 2rem;
}

.gp-catalog-archive__pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.gp-catalog-page .gp-php-shell {
	min-height: 100vh;
}
