/**
 * B&J Verhuur — WooCommerce-driven desktop mega menu.
 *
 * The outer .bj-mega-menu-system open/close state remains controlled by the
 * approved Header B2 Elementor + Custom Code implementation.
 */

.bj-mega-menu-system > .bj-mega-dynamic {
	width: 100%;
	min-width: 0;
}

.bj-mega-dynamic,
.bj-mega-dynamic *,
.bj-mega-dynamic *::before,
.bj-mega-dynamic *::after {
	box-sizing: border-box;
}

.bj-mega-dynamic {
	width: 100%;
	background: #ffffff;
	color: #063649;
}

.bj-mega-dynamic__inner {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(190px, 20%) minmax(0, 1fr);
	gap: 40px;
	padding: 24px 0 28px;
}

.bj-mega-dynamic__categories {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0;
	padding: 0;
}

.bj-mega-menu-system .bj-mega-dynamic__trigger {
	width: 100%;
	min-height: 36px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 8px 12px 8px 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: #063649;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	text-align: left;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

.bj-mega-menu-system .bj-mega-dynamic__trigger:hover,
.bj-mega-menu-system .bj-mega-dynamic__trigger.is-active {
	background: rgba(0, 122, 166, .08);
	color: #007aa6;
	text-decoration: none;
}

.bj-mega-menu-system .bj-mega-dynamic__trigger:focus-visible {
	outline: 2px solid #007aa6;
	outline-offset: 2px;
}

.bj-mega-dynamic__trigger-label {
	min-width: 0;
	flex: 1 1 auto;
}

.bj-mega-dynamic__trigger-chevron {
	width: 7px;
	height: 7px;
	flex: 0 0 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(-45deg);
	margin-right: 3px;
}

.bj-mega-dynamic__content {
	min-width: 0;
	padding-top: 8px;
}

.bj-mega-dynamic .bj-mega-panel {
	display: none;
	width: 100%;
	min-width: 0;
}

.bj-mega-dynamic .bj-mega-panel.is-active {
	display: block;
}

.bj-mega-dynamic__groups {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px 44px;
	align-items: start;
}

.bj-mega-dynamic__group {
	min-width: 0;
}

.bj-mega-menu-system .bj-mega-dynamic__group-title {
	display: inline-block;
	margin: 0 0 10px;
	color: #063649;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
}

.bj-mega-menu-system .bj-mega-dynamic__group-title:hover {
	color: #007aa6;
	text-decoration: none;
}

.bj-mega-dynamic__links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bj-mega-dynamic__links li {
	margin: 0;
	padding: 0;
}

.bj-mega-dynamic__links .bj-mega-dynamic__links {
	margin-top: 2px;
	padding-left: 14px;
}

.bj-mega-menu-system .bj-mega-dynamic__links a {
	display: inline-block;
	padding: 3px 0;
	color: #063649;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.45;
	text-decoration: none;
}

.bj-mega-menu-system .bj-mega-dynamic__links a:hover {
	color: #007aa6;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.bj-mega-menu-system .bj-mega-dynamic__view-all {
	display: inline-block;
	margin-top: 10px;
	color: #063649;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.bj-mega-menu-system .bj-mega-dynamic__view-all:hover {
	color: #007aa6;
}

.bj-mega-menu-system .bj-mega-dynamic__group-title:focus-visible,
.bj-mega-menu-system .bj-mega-dynamic__links a:focus-visible,
.bj-mega-menu-system .bj-mega-dynamic__view-all:focus-visible {
	outline: 2px solid #007aa6;
	outline-offset: 2px;
}

.bj-mega-dynamic__direct {
	width: 100%;
	padding-top: 2px;
}

@media (min-width: 1024px) and (max-width: 1100px) {
	.bj-mega-dynamic__inner {
		grid-template-columns: minmax(230px, 23%) minmax(0, 1fr);
		gap: 32px;
		/* On the 1024px desktop breakpoint the full-width shell has no
		 * side gutters. Match Header B2's 24px inset instead of placing
		 * Meubilair against the edge. Keep the 1280px max-width intact. */
		padding-left: 24px;
		padding-right: 24px;
	}
}

@media (max-width: 1023px) {
	.bj-mega-menu-system .bj-mega-dynamic {
		display: none;
	}
}
