/* Figma 8868:30706. Absolute placement keeps taxonomy content out of header capacity measurements. */
.furpsy-products-mega {
	position: absolute;
	top: calc(100% - 24px);
	inset-inline: calc(-1 * var(--furpsy-navigation-desktop-padding));
	z-index: -1;
	box-sizing: border-box;
	min-height: 301px;
	padding: 52px 32px 17px;
	border-radius: 12px;
	background: linear-gradient(180deg, var(--furpsy-color-grey-5) 4.688%, var(--furpsy-color-opacity-white-100) 18.75%);
	box-shadow: 0 10px 50px rgba(22, 22, 22, 0.16);
}

.furpsy-products-mega[hidden] {
	display: none;
}

/* Cover the overlapping 24px with the navigation's own rounded white surface.
 * The panel stays in DOM tab order directly after its button, behind header content. */
.header:has([data-products-mega-panel]:not([hidden]))::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: var(--furpsy-color-opacity-white-100);
	pointer-events: none;
}

.furpsy-products-mega ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.furpsy-products-mega .furpsy-products-mega__columns {
	display: grid;
	/* At 1240px: four 214px columns and one 192px column; shrink proportionally. */
	grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 0.8971962617fr);
	gap: 32px;
}

.furpsy-products-mega__column {
	min-width: 0;
}

.header-menu .furpsy-products-mega a {
	font-family: var(--furpsy-font-body);
	font-weight: var(--furpsy-type-body-medium-m-weight);
	letter-spacing: var(--furpsy-letter-spacing);
	text-decoration: none;
	overflow-wrap: anywhere;
	transition: none;
}

.header-menu .furpsy-products-mega__heading {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	width: fit-content;
	max-width: 100%;
	color: var(--furpsy-color-grey-90);
	font-size: var(--furpsy-type-body-medium-l-size);
	line-height: var(--furpsy-type-body-medium-l-line-height);
}

.furpsy-products-mega__heading img {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	transform: scaleY(-1);
}

.furpsy-products-mega .furpsy-products-mega__children {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 12px;
}

.header-menu .furpsy-products-mega__children a {
	display: block;
	padding-block: 8px;
	color: var(--furpsy-color-grey-60);
	font-size: var(--furpsy-type-body-medium-m-size);
	line-height: var(--furpsy-type-body-medium-m-line-height);
}

.furpsy-products-mega__children .furpsy-products-mega__children {
	margin: 4px 0 0 12px;
}

.header-menu .furpsy-products-mega a:hover {
	color: var(--furpsy-color-primary-50);
	text-decoration: underline;
}

.furpsy-products-mega a:focus-visible {
	outline: 2px solid var(--furpsy-color-primary-50);
	outline-offset: 2px;
	border-radius: 2px;
}
