.wow-cg-grid {
	display: grid;
	grid-template-columns: repeat(
		auto-fit,
		minmax(calc((100% - (var(--wow-cg-columns, 4) - 1) * 24px) / var(--wow-cg-columns, 4)), 1fr)
	);
	gap: 24px;
	margin: 24px 0;
}

.wow-cg-tile {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	text-align: center;
	transition: transform 0.15s ease;
}

.wow-cg-tile:hover {
	transform: translateY(-4px);
}

.wow-cg-thumb {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 12px;
	background: #f3f3f3;
}

.wow-cg-thumb img,
.wow-cg-img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	object-fit: cover;
	display: block;
}

.wow-cg-name {
	margin-top: 10px;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.3;
}

.wow-cg-count {
	font-weight: 400;
	opacity: 0.6;
	font-size: 0.85em;
}

/* Responsive: lower the effective column count as the screen narrows */
@media (max-width: 782px) {
	.wow-cg-grid {
		--wow-cg-columns: 2;
		gap: 16px;
	}
}

@media (max-width: 420px) {
	.wow-cg-grid {
		--wow-cg-columns: 1;
	}
}
