.nw-category-grid {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px 0;
}

.nw-category-grid-track {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	flex: 1 1 auto;
	gap: 20px;
	min-width: 0;
	overflow: hidden;
}

.nw-category-grid-item {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	width: 110px;
	text-align: center;
	text-decoration: none;
	color: inherit;
}

.nw-category-grid-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 90px;
	height: 90px;
	margin-bottom: 10px;
	border-radius: 50%;
	overflow: hidden;
	background: #f4f4f4;
}

.nw-category-grid-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nw-category-grid-image--placeholder {
	object-fit: contain;
	padding: 18px;
}

.nw-category-grid-label {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

.nw-category-grid-item:hover .nw-category-grid-label {
	text-decoration: underline;
}

.nw-category-grid-nav {
	display: none;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid #ddd;
	border-radius: 50%;
	background: #fff;
	color: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.nw-category-grid-nav:hover {
	background: #f4f4f4;
}

.nw-category-grid-nav[disabled] {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

/*
 * Once the row no longer fits on one line, JS adds this class and the
 * track becomes horizontally scrollable — either as a carousel with
 * prev/next arrows, or as a continuously auto-scrolling marquee, per the
 * shortcode's "style" attribute (reflected in data-style on the wrapper).
 */
.nw-category-grid--active .nw-category-grid-track {
	justify-content: flex-start;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.nw-category-grid--active .nw-category-grid-track::-webkit-scrollbar {
	display: none;
}

.nw-category-grid[data-style="carousel"].nw-category-grid--active .nw-category-grid-track {
	scroll-behavior: smooth;
	scroll-snap-type: x proximity;
}

.nw-category-grid[data-style="carousel"].nw-category-grid--active .nw-category-grid-item {
	scroll-snap-align: start;
}

.nw-category-grid[data-style="carousel"].nw-category-grid--active .nw-category-grid-nav {
	display: flex;
}
