.upbg {
	--upbg-columns-desktop: 6;
	--upbg-columns-tablet: 3;
	--upbg-columns-mobile: 2;
	--upbg-gap: 20px;
	position: relative;
}

.upbg__filter {
	display: none;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.625rem;
	margin: 0 0 1rem;
}

.upbg--enhanced .upbg__filter {
	display: flex;
}

.upbg__filter-button,
.upbg__nav {
	appearance: none;
	border: 1px solid #d9d9d9;
	background: #fff;
	color: #1e1e1e;
	cursor: pointer;
	font: inherit;
}

.upbg__filter-button {
	padding: 0.625rem 1.125rem;
	border-radius: 999px;
}

.upbg__filter-button:hover,
.upbg__filter-button:focus-visible {
	border-color: currentColor;
}

.upbg__filter-button.is-active {
	border-color: #111;
	background: #111;
	color: #fff;
}

.upbg__items {
	gap: var(--upbg-gap);
}

.upbg__items--grid {
	display: grid;
	grid-template-columns: repeat(var(--upbg-columns-desktop), minmax(0, 1fr));
}

.upbg__card {
	box-sizing: border-box;
	min-width: 0;
	min-height: 100px;
	margin: 0;
	padding: 0.625rem;
	border: 1px solid #eee;
	background: #fff;
	scroll-snap-align: start;
}

.upbg__card[hidden] {
	display: none !important;
}

.upbg__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 78px;
	color: inherit;
	text-align: center;
	text-decoration: none;
}

.upbg__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.upbg__image {
	display: block;
	max-width: 100%;
	max-height: 90px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.upbg__name {
	font-weight: 600;
}

.upbg__carousel-shell {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.5rem;
}

.upbg__carousel-shell--without-navigation {
	grid-template-columns: minmax(0, 1fr);
}

.upbg__items--carousel {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--upbg-columns-desktop) - 1) * var(--upbg-gap)) / var(--upbg-columns-desktop));
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scroll-behavior: smooth;
	scroll-snap-type: inline mandatory;
	scrollbar-width: thin;
}

.upbg__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border-radius: 50%;
	font-size: 1.75rem;
	line-height: 1;
}

.upbg__nav:hover,
.upbg__nav:focus-visible {
	border-color: currentColor;
}

.upbg__nav[hidden] {
	display: none;
}

.upbg-message {
	margin: 0;
}

.upbg .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 1023px) {
	.upbg__items--grid {
		grid-template-columns: repeat(var(--upbg-columns-tablet), minmax(0, 1fr));
	}

	.upbg__items--carousel {
		grid-auto-columns: calc((100% - (var(--upbg-columns-tablet) - 1) * var(--upbg-gap)) / var(--upbg-columns-tablet));
	}
}

@media (max-width: 639px) {
	.upbg__items--grid {
		grid-template-columns: repeat(var(--upbg-columns-mobile), minmax(0, 1fr));
	}

	.upbg__items--carousel {
		grid-auto-columns: calc((100% - (var(--upbg-columns-mobile) - 1) * var(--upbg-gap)) / var(--upbg-columns-mobile));
	}

	.upbg__carousel-shell {
		grid-template-columns: 2rem minmax(0, 1fr) 2rem;
	}

	.upbg__nav {
		width: 2rem;
		height: 2rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.upbg__items--carousel {
		scroll-behavior: auto;
	}
}
