/* Product Categories typography / Figma 46:4944. */
@font-face {
	font-family: "GP B2B Product Navigation Roboto";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../assets/fonts/Roboto-Regular.ttf") format("truetype");
}

@font-face {
	font-family: "GP B2B Product Navigation Roboto";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../assets/fonts/Roboto-Bold.ttf") format("truetype");
}

.gp-b2b-product-categories {
	--gp-b2b-product-nav-accent: #004ea2;
	/* Scope both aliases so global !important font rules also resolve to these faces. */
	--gp-b2b-font-regular: "GP B2B Product Navigation Roboto", Arial, sans-serif;
	--gp-b2b-font-black: "GP B2B Product Navigation Roboto", Arial, sans-serif;
	box-sizing: border-box;
	position: relative;
	width: 100%;
	min-width: 0;
	background: #fff;
	color: #383838;
	font-family: var(--gp-b2b-font-regular);
	font-synthesis: none;
}

.gp-b2b-product-categories::before {
	position: absolute;
	inset: 0;
	border: 1px solid #dbe6f2;
	content: "";
	pointer-events: none;
}

.gp-b2b-product-categories *,
.gp-b2b-product-categories *::before,
.gp-b2b-product-categories *::after {
	box-sizing: border-box;
}

.gp-b2b-product-categories__title {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 80px;
	margin: 0;
	padding: 20px 16px;
	background: var(--gp-b2b-product-nav-accent);
	color: #fff;
	font-family: var(--gp-b2b-font-black);
	font-size: 20px;
	font-weight: 700;
	line-height: 30px;
	text-align: center;
}

.gp-b2b-product-categories__groups {
	display: grid;
	gap: 20px;
	padding: 21px 25px 25px;
}

.gp-b2b-product-categories__group {
	min-width: 0;
	margin: 0;
}

.gp-b2b-product-categories__summary,
.gp-b2b-product-categories__leaf {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	min-height: 30px;
	margin: 0;
	padding: 0 9px 0 19px;
	border: 1px solid #dbe6f2;
	background: #fff;
	color: #383838;
	font-size: 16px;
	font-weight: 700;
	line-height: 28px;
	list-style: none;
	text-decoration: none;
	cursor: pointer;
}

.gp-b2b-product-categories__summary::-webkit-details-marker {
	display: none;
}

.gp-b2b-product-categories__summary::marker {
	content: "";
}

.gp-b2b-product-categories__summary > a {
	min-width: 0;
	color: inherit;
	font-weight: inherit;
	line-height: inherit;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.gp-b2b-product-categories__group[open] > summary {
	background: #f8fafc;
	color: var(--gp-b2b-product-nav-accent);
}

.gp-b2b-product-categories__state {
	display: grid;
	align-items: center;
	justify-items: center;
	flex: 0 0 12px;
	width: 12px;
	height: 12px;
}

.gp-b2b-product-categories__state img {
	grid-area: 1 / 1;
	display: block;
	max-width: none;
}

.gp-b2b-product-categories__expanded,
.gp-b2b-product-categories__group[open] .gp-b2b-product-categories__collapsed {
	visibility: hidden;
}

.gp-b2b-product-categories__group[open] .gp-b2b-product-categories__expanded {
	visibility: visible;
}

.gp-b2b-product-categories__families {
	display: grid;
	gap: 11px;
	margin: 0;
	padding: 28px 24px;
	list-style: none;
}

.gp-b2b-product-categories__families li {
	min-width: 0;
	margin: 0;
	padding: 0;
}

.gp-b2b-product-categories__group:not([open]) > .gp-b2b-product-categories__families {
	display: none;
}

.gp-b2b-product-categories__families a {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
	min-height: 24px;
	color: #383838;
	font-size: 14px;
	font-weight: 400;
	line-height: 24px;
	text-decoration: none;
}

.gp-b2b-product-categories__families a > span:last-child {
	min-width: 0;
	overflow-wrap: anywhere;
}

.gp-b2b-product-categories__arrow {
	display: grid;
	align-items: center;
	justify-items: center;
	flex: 0 0 6px;
	width: 6px;
	height: 24px;
}

.gp-b2b-product-categories__arrow img {
	display: block;
	max-width: none;
	transform: rotate(-90deg);
}

/* Match the family link rule's specificity so current-page blue stays visible. */
.gp-b2b-product-categories a:is(:hover, [aria-current="page"]) {
	color: var(--gp-b2b-product-nav-accent);
}

.gp-b2b-product-categories :where(a, summary):focus-visible {
	outline: 2px solid var(--gp-b2b-product-nav-accent);
	outline-offset: 3px;
}

@media (min-width: 992px) {
	.gp-b2b-product-navigation-sidebar {
		--gp-b2b-product-nav-top: calc(clamp(75px, 5.208333vw, 100px) + 20px);
		top: var(--gp-b2b-product-nav-top);
		max-height: calc(100dvh - var(--gp-b2b-product-nav-top) - 20px);
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
	}

	.gp-b2b-product-categories {
		min-height: 800px;
	}

	.admin-bar .gp-b2b-product-navigation-sidebar {
		--gp-b2b-product-nav-top: calc(clamp(75px, 5.208333vw, 100px) + 52px);
	}
}

@media (max-width: 1180px) {
	.gp-b2b-product-categories__groups {
		padding-inline: 17px;
	}

	.gp-b2b-product-categories__summary,
	.gp-b2b-product-categories__leaf {
		min-height: 44px;
		padding-block: 5px;
		padding-left: 12px;
	}

	.gp-b2b-product-categories__families {
		gap: 4px;
		padding: 20px 12px;
	}

	.gp-b2b-product-categories__families a {
		align-items: center;
		min-height: 44px;
	}
}

@media (min-width: 992px) and (max-width: 1180px) {
	.gp-b2b-product-categories__title {
		font-size: 18px;
	}
}
