/* Category Groups — homepage "Browse the Library" section (v9.2.0).
   Uses existing theme tokens; no layout, ad or typography changes elsewhere. */

.tgl-catgroups {
	margin-bottom: var(--tgl-section-gap, 48px);
}

.tgl-catgroups__group + .tgl-catgroups__group {
	margin-top: var(--tgl-stack-gap, 24px);
}

.tgl-catgroups__heading {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: var(--tgl-ink, #2b1a12);
}

.tgl-catgroups__heading::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--tgl-line, rgba(43, 26, 18, 0.12));
}

.tgl-catgroups__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
}

.tgl-catgroups__chip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 14px;
	min-height: 44px;
	border-radius: 12px;
	background: var(--tgl-card, #fff);
	border: 1px solid var(--tgl-line, rgba(43, 26, 18, 0.12));
	text-decoration: none;
	color: var(--tgl-ink, #2b1a12);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tgl-catgroups__chip:hover,
.tgl-catgroups__chip:focus-visible {
	border-color: var(--tgl-accent, #c2410c);
	box-shadow: 0 4px 14px rgba(43, 26, 18, 0.08);
	transform: translateY(-1px);
}

.tgl-catgroups__name {
	font-weight: 600;
	font-size: 0.92rem;
	line-height: 1.3;
}

.tgl-catgroups__count {
	flex: none;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--tgl-accent-soft, rgba(194, 65, 12, 0.1));
	color: var(--tgl-accent, #c2410c);
}

@media (max-width: 640px) {
	.tgl-catgroups__grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 8px;
	}
	.tgl-catgroups__chip {
		padding: 9px 12px;
	}
}
