/**
 * Genauto catalog archive layout — category cards + sidebar.
 * Namespaced under .gen- so it never collides with the Kadence theme.
 */

/* ---------- archive shell ---------- */
.gen-archive-view .gen-breadcrumb {
	font-size: 13px;
	opacity: .75;
	margin: 0 0 20px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}
.gen-archive-view .gen-breadcrumb a { text-decoration: none; color: inherit; }
.gen-archive-view .gen-breadcrumb a:hover { text-decoration: underline; }
.gen-archive-view .gen-breadcrumb .sep { opacity: .5; }

.gen-archive-layout {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 36px;
	align-items: start;
}
@media (max-width: 900px) {
	.gen-archive-layout { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- sidebar ---------- */
.gen-archive-sidebar {
	border: 1px solid #e6e8ec;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}
.gen-sidebar-title {
	margin: 0;
	padding: 12px 16px;
	background: #2b2f36;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .01em;
}
.gen-sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.gen-sidebar-item { border-bottom: 1px solid #eef0f3; }
.gen-sidebar-item:last-child { border-bottom: 0; }
.gen-sidebar-item a {
	display: block;
	padding: 10px 16px;
	font-size: 13.5px;
	color: #333;
	text-decoration: none;
	transition: background .12s ease, color .12s ease;
}
.gen-sidebar-item a:hover { background: #f5f7f9; color: #111; }
.gen-sidebar-item.is-active a {
	color: #c2410c;
	font-weight: 600;
	background: #fff8f3;
}
.gen-sidebar-search {
	padding: 12px;
	border-top: 1px solid #eef0f3;
	background: #fafbfc;
}
.gen-sidebar-search input {
	width: 100%;
	padding: 8px 10px;
	font-size: 13px;
	border: 1px solid #d8dce2;
	border-radius: 4px;
	background: #fff;
	box-sizing: border-box;
}
.gen-sidebar-search input:focus {
	outline: 2px solid #c2410c;
	outline-offset: -1px;
	border-color: #c2410c;
}

/* ---------- main ---------- */
.gen-archive-header { margin: 0 0 22px; }
.gen-archive-title {
	font-size: clamp(22px, 2.6vw, 30px);
	margin: 0;
	padding-bottom: 10px;
	border-bottom: 2px solid #2b2f36;
	display: inline-block;
}

/* ---------- category card grid ---------- */
.gen-cat-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}
@media (max-width: 1100px) { .gen-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .gen-cat-grid { grid-template-columns: 1fr; } }

.gen-cat-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e6e8ec;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.gen-cat-card:hover {
	border-color: #c6ccd4;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
	transform: translateY(-2px);
}
.gen-cat-card-media {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f2f5f8;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	padding: 14px;
	box-sizing: border-box;
}
.gen-cat-card-media img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}
.gen-cat-card-noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: #dde3ea;
	color: #7b8592;
	font-size: 26px;
	font-weight: 600;
	text-transform: uppercase;
}
.gen-cat-card-name {
	display: block;
	padding: 14px 16px 4px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
}
.gen-cat-card-count {
	display: block;
	padding: 0 16px 16px;
	font-size: 12.5px;
	color: #8a93a3;
	text-align: center;
}

/* ---------- product grid (leaf categories) ---------- */
.gen-prod-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
}
@media (max-width: 1100px) { .gen-prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .gen-prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.gen-prod-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e6e8ec;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.gen-prod-card:hover {
	border-color: #c6ccd4;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .07);
}
.gen-prod-card-media {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f6f7f9;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	padding: 12px;
	box-sizing: border-box;
}
.gen-prod-card-media img.gen-img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}
.gen-prod-card-name {
	display: block;
	padding: 11px 13px 14px;
	font-size: 13.5px;
	line-height: 1.45;
}

.gen-empty {
	padding: 30px 0;
	font-size: 15px;
	opacity: .7;
}

/* pagination tidy-up inside the new layout */
.gen-archive-main .pagination,
.gen-archive-main .navigation.pagination {
	margin-top: 28px;
}
