/* HamzaBG Mods - catalogue archives (/products, /cars, /tools).
 *
 * The grid, the cards and the filter pills come from the storefront bundle
 * (php-product.css already carries them). This file only adds the archive
 * chrome around them: the hero, the toolbar count, the empty state and the
 * closing note. One page, one accent, no second design language.
 *
 * Every colour is a --hb-* token, so light and dark land without a branch.
 */

.hbg-catalogue {
	display: block;
	padding-bottom: 96px;
	background: var(--hb-bg);
}

/* ------------------------------------------------------------------ hero */

.hbg-cat-head {
	position: relative;
	margin-top: 0;
	padding: calc(var(--sa-nav-h, 82px) + 52px) 0 48px;
	border-bottom: 1px solid var(--hb-line);
	background: var(--hb-bg);
	overflow: hidden;
}

/* Blueprint grid, faded cleanly at the edges: runs all the way behind the
   floating header bar so there is never a blank white strip above the grid. */
.hbg-cat-head::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right, var(--hb-line) 1px, transparent 1px),
		linear-gradient(to bottom, var(--hb-line) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: radial-gradient(85% 85% at 50% 0%, #000 0%, transparent 78%);
	mask-image: radial-gradient(85% 85% at 50% 0%, #000 0%, transparent 78%);
	pointer-events: none;
}

.hbg-cat-head > .hbg-shell {
	position: relative;
}

.hbg-cat-eyebrow {
	margin: 0 0 16px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--hb-faint);
}

.hbg-cat-title {
	margin: 0;
	max-width: 20ch;
	font-size: clamp(36px, 5.4vw, 64px);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.045em;
	color: var(--hb-ink);
}

.hbg-cat-accent {
	color: var(--hb-accent);
}

.hbg-cat-lede {
	margin: 18px 0 0;
	max-width: 62ch;
	font-size: 15.5px;
	line-height: 1.65;
	color: var(--hb-muted);
}

.hbg-cat-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--hb-muted);
}

.hbg-cat-meta li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.hbg-cat-meta li::before {
	content: "";
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--hb-faint);
	opacity: 0.55;
}

.hbg-cat-meta li:first-child {
	color: var(--hb-ink);
}

.hbg-cat-meta li:first-child::before {
	background: var(--hb-accent);
	opacity: 1;
}

/* ------------------------------------------------------------------ body */

.hbg-cat-body {
	padding-top: 34px;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hbg-cat-toolbar {
	display: grid;
	gap: 16px;
	margin-bottom: 22px;
}

.hbg-cat-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.hbg-cat-search {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 260px;
	max-width: 420px;
}

.hbg-cat-search svg {
	position: absolute;
	left: 14px;
	color: var(--hb-faint);
	pointer-events: none;
}

.hbg-cat-search input {
	width: 100%;
	height: 40px;
	padding: 0 14px 0 38px;
	border: 1px solid var(--hb-line);
	border-radius: 11px;
	background: var(--hb-card);
	font-family: inherit;
	font-size: 13.5px;
	color: var(--hb-ink);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.hbg-cat-search input::placeholder {
	color: var(--hb-faint);
}

.hbg-cat-search input:focus {
	outline: none;
	border-color: var(--hb-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--hb-accent) 18%, transparent);
}

.hbg-cat-sort-wrap {
	min-width: 190px;
}

.hbg-card-badge--out {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 4px 10px;
	border-radius: 9999px;
	background: rgba(15, 16, 22, 0.84);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	backdrop-filter: blur(6px);
}

.hbg-cat-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.hbg-cat-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 28px;
}

.hbg-cat-pager[hidden] {
	display: none;
}

.hbg-cat-pager-btn {
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--hb-line);
	border-radius: 10px;
	background: var(--hb-card);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--hb-ink);
	cursor: pointer;
	transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.hbg-cat-pager-btn:hover:not(:disabled) {
	border-color: color-mix(in srgb, var(--hb-ink) 25%, transparent);
}

.hbg-cat-pager-btn.is-active {
	border-color: transparent;
	background: var(--hb-btn-primary, #515df3);
	color: var(--hb-btn-primary-ink, #ffffff);
}

.hbg-cat-pager-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.hbg-cat-bar .hbg-filter {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.hbg-filter-count {
	min-width: 17px;
	padding: 2px 5px;
	border-radius: 9999px;
	background: color-mix(in srgb, var(--hb-ink) 7%, transparent);
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	color: var(--hb-faint);
	transition: background-color 0.18s ease, color 0.18s ease;
}

.hbg-filter[aria-pressed="true"] .hbg-filter-count {
	background: rgba(255, 255, 255, 0.22);
	color: #ffffff;
}

.hbg-card-price--out {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--hb-faint);
}

/* ------------------------------------------------------------- empty state */

.hbg-cat-empty {
	display: grid;
	justify-items: center;
	gap: 6px;
	max-width: 560px;
	margin: 24px auto 0;
	padding: 64px 32px;
	border: 1px dashed var(--hb-line);
	border-radius: var(--hb-radius-lg);
	background: var(--hb-card);
	text-align: center;
}

.hbg-cat-empty-mark {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-bottom: 12px;
	border: 1px solid var(--hb-line);
	border-radius: 15px;
	background: var(--hb-bg);
	color: var(--hb-accent);
}

.hbg-cat-empty h2 {
	margin: 0;
	font-size: 21px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--hb-ink);
}

.hbg-cat-empty p {
	margin: 8px 0 0;
	max-width: 42ch;
	font-size: 14px;
	line-height: 1.65;
	color: var(--hb-muted);
}

.hbg-cat-empty-actions,
.hbg-cat-note {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.hbg-cat-empty-actions {
	margin-top: 22px;
}

/* ------------------------------------------------------------------- note */

.hbg-cat-note {
	justify-content: space-between;
	margin-top: 34px;
	padding: 18px 22px;
	border: 1px solid var(--hb-line);
	border-radius: var(--hb-radius);
	background: var(--hb-card);
	box-shadow: var(--hb-shadow);
}

.hbg-cat-note p {
	margin: 0;
	font-size: 13.5px;
	color: var(--hb-muted);
}

/* ---------------------------------------------------------------- buttons */

.hbg-cat-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 18px;
	border: 1px solid var(--hb-line);
	border-radius: 11px;
	background: var(--hb-card);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: -0.005em;
	color: var(--hb-ink);
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.hbg-cat-btn:hover {
	transform: translateY(-1px);
	border-color: color-mix(in srgb, var(--hb-ink) 22%, transparent);
}

.hbg-cat-btn--primary {
	border-color: transparent;
	background-color: var(--hb-btn-primary, #515df3);
	background-image: linear-gradient(180deg, var(--hb-btn-primary-hi, #7a85ff), var(--hb-btn-primary, #515df3) 55%, var(--hb-btn-primary-lo, #434dd8));
	color: var(--hb-btn-primary-ink, #ffffff);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 18px -10px rgba(101, 113, 255, 0.65);
}

.hbg-cat-btn--primary:hover {
	border-color: transparent;
	filter: saturate(1.06) brightness(1.03);
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 900px) {
	.hbg-cat-head {
		padding: calc(var(--sa-nav-h, 68px) + 38px) 0 36px;
	}

	.hbg-cat-bar {
		flex-direction: column;
		align-items: flex-start;
	}

	.hbg-cat-controls {
		align-items: stretch;
	}

	.hbg-cat-search {
		max-width: none;
	}

	.hbg-cat-sort-wrap {
		width: 100%;
	}

	.hbg-cat-note {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 560px) {
	.hbg-cat-empty {
		padding: 44px 20px;
	}

	.hbg-cat-empty-actions,
	.hbg-cat-note {
		width: 100%;
	}

	.hbg-cat-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hbg-cat-btn {
		transition: none;
	}

	.hbg-cat-btn:hover {
		transform: none;
	}
}
