/**
 * [labz_all_categories] — full-page category grid.
 * White cards with category image, name and product count.
 */
.labz-allcats {
	--labz-allcats-accent: #013851;
	--labz-allcats-cols: 4;
	max-width: 1200px;
	margin: 0 auto;
	padding: clamp(16px, 3vw, 40px) clamp(14px, 3vw, 24px);
	box-sizing: border-box;
}
.labz-allcats * { box-sizing: border-box; }

.labz-allcats__title {
	text-align: center;
	margin: 0 0 clamp(20px, 3vw, 36px);
	color: #0c2238;
	font-weight: 800;
	font-size: clamp(24px, 3.4vw, 38px);
	line-height: 1.15;
}

.labz-allcats__grid {
	display: grid;
	grid-template-columns: repeat(var(--labz-allcats-cols), 1fr);
	gap: clamp(14px, 1.6vw, 24px);
}

.labz-allcats__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 4px;
	padding: clamp(18px, 2vw, 26px) 16px 20px;
	background: #ffffff;
	border: 1px solid #e9eef3;
	border-radius: 16px;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.labz-allcats__card:hover {
	transform: translateY(-4px);
	border-color: #cfdbe6;
	box-shadow: 0 16px 34px rgba(10, 30, 55, 0.12);
}

.labz-allcats__thumb {
	flex: none;
	display: grid;
	place-items: center;
	width: 100%;
	height: 150px;
	margin-bottom: 12px;
}
.labz-allcats__thumb img {
	max-width: 100%;
	max-height: 150px;   /* absolute cap — percentage fails on a flex item */
	width: auto;
	object-fit: contain;
	transition: transform 0.25s ease;
}
.labz-allcats__card:hover .labz-allcats__thumb img { transform: scale(1.05); }

.labz-allcats__name {
	color: #0c2238;
	font-weight: 700;
	font-size: clamp(15px, 1.4vw, 18px);
	line-height: 1.25;
}
.labz-allcats__count {
	color: #6a7c8d;
	font-size: 13px;
	font-weight: 500;
}

/* Responsive column counts */
@media (max-width: 1024px) {
	.labz-allcats__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
	.labz-allcats__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.labz-allcats__card { border-radius: 14px; padding: 18px 10px 16px; }
	.labz-allcats__thumb { height: 120px; }
	.labz-allcats__thumb img { max-height: 120px; }
	/* Odd count: the lone last card spans the full row */
	.labz-allcats__card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
