.technopack-cat-products {
	--tp-cat-accent: var(--theme-palette-color-1, #1a5f4a);
	--tp-cat-border: rgba(0, 0, 0, 0.08);
	--tp-cat-muted: rgba(0, 0, 0, 0.55);
	--tp-cat-bg: #f7f8f7;
	--tp-cat-active-bg: #fff;

	display: grid;
	grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
	gap: 20px;
	align-items: start;
	width: 100%;
}

.technopack-cat-products__sidebar {
	background: var(--tp-cat-bg);
	border: 1px solid var(--tp-cat-border);
	border-radius: 8px;
	padding: 12px;
	position: sticky;
	top: 100px;
}

.technopack-cat-products__cats {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.technopack-cat-products__cat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 12px 14px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.95rem;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.technopack-cat-products__cat:hover {
	background: rgba(255, 255, 255, 0.7);
}

.technopack-cat-products__cat.is-active {
	background: var(--tp-cat-active-bg);
	color: var(--tp-cat-accent);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	font-weight: 600;
}

.technopack-cat-products__cat-name {
	flex: 1;
	min-width: 0;
}

.technopack-cat-products__cat-count {
	flex-shrink: 0;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--tp-cat-muted);
	background: rgba(0, 0, 0, 0.04);
	border-radius: 999px;
	padding: 2px 8px;
	line-height: 1.4;
}

.technopack-cat-products__cat.is-active .technopack-cat-products__cat-count {
	background: color-mix(in srgb, var(--tp-cat-accent) 12%, transparent);
	color: var(--tp-cat-accent);
}

.technopack-cat-products__main {
	position: relative;
	min-height: 200px;
}

.technopack-cat-products__main.is-loading .technopack-cat-products__grid {
	opacity: 0.35;
	pointer-events: none;
}

.technopack-cat-products__loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
}

.technopack-cat-products__loading[hidden] {
	display: none !important;
}

.technopack-cat-products__spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(0, 0, 0, 0.1);
	border-top-color: var(--tp-cat-accent);
	border-radius: 50%;
	animation: technopack-cat-spin 0.7s linear infinite;
}

@keyframes technopack-cat-spin {
	to {
		transform: rotate(360deg);
	}
}

.technopack-cat-products__grid ul.products {
	margin: 0 !important;
}

.technopack-cat-products-empty {
	margin: 0;
	padding: 24px;
	color: var(--tp-cat-muted);
	text-align: center;
}

@media (max-width: 991px) {
	.technopack-cat-products {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.technopack-cat-products__sidebar {
		position: static;
		padding: 10px;
	}

	.technopack-cat-products__cats {
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 8px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.technopack-cat-products__cat {
		white-space: nowrap;
		flex: 0 0 auto;
	}
}

@media (max-width: 575px) {
	.technopack-cat-products__grid ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}
