.kk-categories {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	/* Top gap only — bottom left to next section’s padding-top + theme blockGap */
	padding-top: var(--wp--preset--spacing--50, 1.5rem);
	padding-bottom: 0;
	margin: 0;
}

.kk-categories__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	margin: 0 0 2rem;
}

.kk-categories__heading {
	margin: 0;
	font-family: var(--wp--preset--font-family--hepta-slab, "Hepta Slab", serif);
	font-size: var(--wp--preset--font-size--section-quote, clamp(1.375rem, 4vw, 2.125rem));
	line-height: 1.2;
	font-weight: 500;
	color: var(--wp--preset--color--ink, #1c1c1c);
}

.kk-categories__more {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex-shrink: 0;
	margin-left: auto;
	font-family: var(--wp--preset--font-family--host-grotesk, "Host Grotesk", sans-serif);
	font-size: 1rem; /* 16px */
	line-height: 1.3;
	font-weight: 400;
	color: var(--wp--preset--color--ink, #1c1c1c);
	text-decoration: none;
	transition: color 0.3s ease-in-out;
}

.kk-categories__more:hover,
.kk-categories__more:focus-visible {
	color: var(--wp--preset--color--muted, var(--kk-color-muted, #676767));
	text-decoration: none;
}

.kk-categories__more-arrow {
	display: inline-flex;
	flex-shrink: 0;
	width: 17px;
	height: 15px;
	transition: transform 0.3s ease-in-out;
}

.kk-categories__more-arrow svg {
	display: block;
	width: 100%;
	height: 100%;
}

.kk-categories__more:hover .kk-categories__more-arrow,
.kk-categories__more:focus-visible .kk-categories__more-arrow {
	transform: translateX(3px);
}

.kk-categories__list {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 1.5rem 2.5rem; /* row 24px · column 40px */
	margin: 0;
	padding: 0;
	list-style: none;
}

.kk-categories__item {
	min-width: 0;
}

.kk-categories__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--wp--preset--color--ink, #1c1c1c);
}

.kk-categories__link:hover,
.kk-categories__link:focus-visible {
	text-decoration: none;
}

.kk-categories__link:hover .kk-categories__label,
.kk-categories__link:focus-visible .kk-categories__label {
	color: var(--wp--preset--color--muted, var(--kk-color-muted, #676767)); /* muted gray — matches header nav hover */
	text-decoration: none;
}

.kk-categories__link:focus-visible .kk-categories__media {
	outline: 2px solid var(--wp--preset--color--ink, #1c1c1c);
	outline-offset: 3px;
}

.kk-categories__media {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background: var(--wp--preset--color--white, #ffffff);
	overflow: hidden;
	transition: transform 0.3s ease-in-out;
}

.kk-categories__link:hover .kk-categories__media {
	transform: translateY(-2px);
}

.kk-categories__image {
	width: 72%;
	height: 72%;
	object-fit: contain;
	object-position: center;
}

.kk-categories__label {
	display: block;
	max-width: 100%;
	font-family: var(--wp--preset--font-family--host-grotesk, "Host Grotesk", sans-serif);
	font-size: 1.125rem; /* 18px */
	line-height: 1.3;
	font-weight: 400;
	text-align: center;
	overflow-wrap: anywhere;
	transition: color 0.3s ease-in-out;
}

.kk-categories__empty {
	margin: 0;
	color: var(--wp--preset--color--ink-soft, #3c3c3b);
	font-size: 0.9375rem;
}

/* Editor canvas */
.kk-categories--editor .kk-categories__link,
.kk-categories--editor .kk-categories__more {
	cursor: default;
	pointer-events: none;
}

.kk-categories--editor .kk-categories__picker {
	margin-top: 1.25rem;
	padding: 1rem;
	border: 1px dashed var(--wp--preset--color--hairline, #dddddd);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.55);
}

.kk-categories--editor .kk-categories__picker-title {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
}

.kk-categories__inspector-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.kk-categories__inspector-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.5rem 0.625rem;
	border: 1px solid var(--wp--preset--color--hairline, #dddddd);
	border-radius: 6px;
	background: #fff;
}

.kk-categories__inspector-name {
	flex: 1;
	min-width: 0;
	font-size: 0.8125rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kk-categories__inspector-buttons {
	display: flex;
	flex-shrink: 0;
	gap: 0.15rem;
}

.kk-categories__inspector-hint {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted, var(--kk-color-muted, #676767));
}

.kk-categories__fallback-preview {
	display: block;
	width: 72px;
	height: 72px;
	margin: 0.5rem 0 0.75rem;
	border-radius: 50%;
	object-fit: cover;
	background: #fff;
	border: 1px solid var(--wp--preset--color--hairline, #dddddd);
}

@media (max-width: 900px) {
	.kk-categories__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.75rem 2rem;
	}

	.kk-categories__header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
		margin-bottom: 1.5rem;
	}

	.kk-categories__more {
		margin-left: 0;
	}
}

@media (max-width: 520px) {
	.kk-categories__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.5rem 1.75rem;
	}

	.kk-categories__more {
		font-size: 1rem;
	}
}
