.xmega-item {
	position: relative;
}

.xmega-panel {
	background: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
	display: none;
	gap: 24px;
	left: 0;
	min-width: 520px;
	padding: 20px;
	position: absolute;
	top: 100%;
	z-index: 9999;
}

.xmega-item:hover > .xmega-panel,
.xmega-item:focus-within > .xmega-panel {
	display: flex;
}

.xmega-column {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 10px;
	min-width: 180px;
}

.xmega-text {
	color: #1d2327;
	line-height: 1.4;
}

.xmega-image {
	display: block;
	height: auto;
	max-width: 100%;
}

.xmega-button {
	background: #111;
	color: #fff;
	display: inline-block;
	padding: 8px 12px;
	text-decoration: none;
}

.xmega-button:hover,
.xmega-button:focus {
	color: #fff;
}

.xmega-link {
	color: #135e96;
	display: inline-block;
	text-decoration: none;
}

.xmega-link:hover,
.xmega-link:focus {
	text-decoration: underline;
}

.menu-item.xmega-item,
.menu-item.xmega-mega-enabled {
	overflow: visible !important;
	position: relative;
}

.xmega-mega-panel {
	background: var(--xmega-panel-bg, #fff);
	box-shadow: var(--xmega-panel-shadow, 0 18px 48px rgba(0, 0, 0, 0.16));
	box-sizing: border-box;
	color: var(--xmega-panel-color, #1f2933);
	display: none;
	font-family: var(--xmega-menu-font-family, inherit);
	font-size: var(--xmega-menu-font-size, inherit);
	font-weight: var(--xmega-menu-font-weight, inherit);
	left: 0;
	margin-top: 0;
	max-width: calc(100vw - 32px);
	padding: var(--xmega-panel-padding, 28px);
	pointer-events: auto;
	position: absolute;
	top: 100%;
	width: max-content;
	z-index: 999999;
}

.xmega-mega-enabled:hover,
.xmega-mega-enabled:focus-within {
	overflow: visible;
}

.xmega-mega-enabled:hover > .xmega-mega-panel,
.xmega-mega-enabled:focus-within > .xmega-mega-panel {
	display: block;
}

.xmega-width-content {
	left: var(--xmega-menu-left, 0);
	max-width: calc(100vw - 32px);
	min-width: 0;
	width: var(--xmega-menu-width, min(100vw - 32px, 1200px));
}

.xmega-width-full {
	left: 50%;
	max-width: 100vw;
	transform: translateX(-50%);
	width: 100vw;
}

.xmega-width-custom {
	left: var(--xmega-menu-center, 50%);
	min-width: 0;
	transform: translateX(-50%);
	width: min(100vw - 32px, 1200px);
}

.xmega-mega-grid {
	/* !important guards against themes whose .sub-menu / nav rules would
	 * otherwise override display and force the columns to stack vertically. */
	display: grid !important;
	gap: var(--xmega-column-spacing, 28px);
	min-width: 0;
	width: 100% !important;
	float: none !important;
}

/* Belt-and-braces: also force grid on the panel's direct grid child even if
 * a theme targets it via a higher-specificity selector. */
.xmega-mega-panel > .xmega-mega-grid {
	display: grid !important;
}

/* Equal-width tracks per column count, driven through a CSS variable so the
 * walker's inline custom ratio (which sets --xmega-grid-cols) can override the
 * default while the !important still beats theme grid rules. */
.xmega-columns-1 .xmega-mega-grid { --xmega-grid-cols: repeat(1, minmax(0, 1fr)); }
.xmega-columns-2 .xmega-mega-grid { --xmega-grid-cols: repeat(2, minmax(0, 1fr)); }
.xmega-columns-3 .xmega-mega-grid { --xmega-grid-cols: repeat(3, minmax(0, 1fr)); }
.xmega-columns-4 .xmega-mega-grid { --xmega-grid-cols: repeat(4, minmax(0, 1fr)); }
.xmega-columns-5 .xmega-mega-grid { --xmega-grid-cols: repeat(5, minmax(0, 1fr)); }
.xmega-columns-6 .xmega-mega-grid { --xmega-grid-cols: repeat(6, minmax(0, 1fr)); }

/* The actual template, forced with !important, reads from the variable.
 * Default to 1fr if somehow unset so it never collapses to a single column. */
.xmega-mega-panel .xmega-mega-grid {
	grid-template-columns: var(--xmega-grid-cols, repeat(2, minmax(0, 1fr))) !important;
}

/*
 * CRITICAL: each module column occupies exactly ONE grid track. The legacy
 * layout presets (wide-left/right/middle) set grid-column: span 2/3 on some
 * entries, which — combined with the column-width ratio — made an entry span
 * the whole row and force the columns to stack. The width is now controlled
 * entirely by grid-template-columns (the ratio sliders), so every entry must
 * stay in its own single column. !important beats the preset span rules.
 */
.xmega-mega-panel .xmega-mega-grid > .xmega-mega-entry.xmega-module-column {
	grid-column: auto !important;
}

/* A genuine full-row heading entry must still span every column. */
.xmega-mega-panel .xmega-mega-grid > .xmega-fullrow-entry {
	grid-column: 1 / -1 !important;
}

.xmega-columns-1 .xmega-mega-grid {
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* When a 2-column panel has a Promo side-rail (and no custom width ratio is
 * set), make the promo column a narrow fixed rail automatically. A custom
 * ratio via inline style still wins over this. */
.xmega-columns-2 .xmega-mega-grid:has(.xmega-promo-column:first-child) {
	grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1fr);
}

.xmega-columns-2 .xmega-mega-grid:has(.xmega-promo-column:last-child) {
	grid-template-columns: minmax(0, 1fr) minmax(220px, 0.62fr);
}

.xmega-layout-wide-left .xmega-mega-entry:first-child {
	grid-column: span 2;
}

.xmega-layout-wide-right .xmega-mega-entry:last-child {
	grid-column: span 2;
}

.xmega-layout-middle-wide .xmega-mega-entry:nth-child(2) {
	grid-column: span 2;
}

/* Auto-mode columns (driven by L1 menu items) ----------------------------- */
.xmega-column-span-2 {
	grid-column: span 2;
}

.xmega-column-span-3 {
	grid-column: span 3;
}

.xmega-column.xmega-column-align-center {
	justify-content: center;
}

.xmega-column.xmega-column-align-bottom {
	justify-content: flex-end;
}

.xmega-column-title {
	color: var(--xmega-heading-color, #1d2327);
	display: block;
	font-size: var(--xmega-heading-font-size, 14px);
	font-weight: var(--xmega-heading-font-weight, 700);
	letter-spacing: 0.01em;
	margin-bottom: 4px;
	text-decoration: none;
	text-transform: none;
	overflow: visible !important;
}

a.xmega-column-title:hover,
a.xmega-column-title:focus {
	color: var(--xmega-link-color, inherit);
}

.xmega-link-list {
	display: flex;
	flex-direction: column;
	gap: 7px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Link sub-columns: split a column's links into a grid -------------------- */
.xmega-link-list.xmega-link-cols-2,
.xmega-link-list.xmega-link-cols-3 {
	display: grid;
	gap: 7px 28px;
}

.xmega-link-list.xmega-link-cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.xmega-link-list.xmega-link-cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.xmega-link-list a {
	color: var(--xmega-link-color, inherit);
	font-size: var(--xmega-link-font-size, inherit);
	font-weight: var(--xmega-link-font-weight, inherit);
	overflow: visible !important;
	text-decoration: none;
}

.xmega-column,
.xmega-column-title,
.xmega-link-list,
.xmega-link-list li {
	overflow: visible !important;
}

.xmega-link-list a:hover,
.xmega-link-list a:focus {
	text-decoration: underline;
}

/* Link arrows ------------------------------------------------------------- */
.xmega-link-list.xmega-link-arrows a {
	align-items: baseline;
	display: inline-flex;
	gap: 8px;
}

.xmega-link-list.xmega-link-arrows a::before {
	color: var(--xmega-link-color, #94a3b8);
	content: "\203A"; /* › */
	flex: 0 0 auto;
	font-size: 1.05em;
	line-height: 1;
	opacity: 0.7;
}

/* Card-style column ------------------------------------------------------- */
.xmega-column.xmega-column-style-card {
	background: var(--xmega-card-bg, #f5f6f7);
	border-radius: 8px;
	gap: 14px;
	padding: 28px;
}

.xmega-mega-entry {
	min-width: 0;
	margin: 0;
}

/*
 * HIGH-SPECIFICITY defensive reset. Some themes (Kadence/Blocksy) and page
 * builders style .menu-item descendants with width:100% / float using a
 * selector specific enough to beat a single-class !important. We raise the
 * specificity (panel > grid > entry = 0,3,0) AND use !important so the grid
 * columns can never be forced to 100% width (which would stack them).
 */
.xmega-mega-panel .xmega-mega-grid > .xmega-mega-entry,
.xmega-mega-panel .xmega-mega-grid > .xmega-mega-entry.xmega-module-column,
.xmega-mega-panel .xmega-mega-grid > .xmega-mega-entry.xmega-promo-column {
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	float: none !important;
	clear: none !important;
	flex: initial !important;
	position: relative !important;
	left: auto !important;
	right: auto !important;
}

.xmega-child-link,
.xmega-content-block a {
	color: var(--xmega-link-color, inherit);
}

.xmega-heading {
	color: var(--xmega-heading-color, inherit);
	font-weight: 700;
	margin-bottom: 8px;
}

.xmega-custom-text,
.xmega-content-block {
	line-height: 1.5;
}

.xmega-module-column {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.xmega-module {
	box-sizing: border-box;
	min-width: 0;
}

.xmega-module-heading,
.xmega-link-list-title,
.xmega-featured-card-title,
.xmega-cta-title {
	color: var(--xmega-heading-color, inherit);
	font-size: var(--xmega-heading-font-size, 15px);
	font-weight: var(--xmega-heading-font-weight, 700);
	line-height: 1.35;
	margin-bottom: 8px;
}

.xmega-module-text,
.xmega-featured-card-description,
.xmega-cta-description {
	color: var(--xmega-text-color, inherit);
	font-size: var(--xmega-menu-font-size, 14px);
	font-weight: var(--xmega-menu-font-weight, inherit);
	line-height: 1.55;
}

.xmega-module-text p,
.xmega-featured-card-description p,
.xmega-cta-description p {
	margin: 0 0 8px;
}

.xmega-module-button {
	background: var(--xmega-button-bg, #1f5f8b);
	border-radius: 4px;
	color: #fff;
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	padding: 9px 12px;
	text-decoration: none;
}

.xmega-module-button:hover,
.xmega-module-button:focus {
	color: #fff;
	text-decoration: none;
}

.xmega-module-image img,
.xmega-featured-card img {
	border-radius: calc(var(--xmega-card-radius, 6px) - 2px);
	display: block;
	height: auto;
	max-width: 100%;
}

.xmega-link-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.xmega-link-list li + li {
	margin-top: 7px;
}

.xmega-link-list a {
	align-items: center;
	color: var(--xmega-link-color, inherit);
	display: inline-flex;
	font-size: var(--xmega-link-font-size, inherit);
	font-weight: var(--xmega-link-font-weight, inherit);
	gap: 6px;
	line-height: 1.35;
	padding: 2px 0;
	text-decoration: none;
	transition: color 140ms ease, transform 140ms ease;
}

.xmega-link-list a:hover,
.xmega-link-list a:focus {
	color: var(--xmega-link-hover-color, var(--xmega-link-color, inherit));
	transform: translateX(2px);
	text-decoration: underline;
}

.xmega-link-icon {
	flex: 0 0 auto;
}

/* Auto-mode link styles: bordered / radio --------------------------------- */
.xmega-link-style-bordered li a {
	border: 1px solid var(--xmega-card-border, rgba(0, 0, 0, 0.1));
	border-radius: var(--xmega-card-radius, 6px);
	padding: 12px 14px;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.xmega-link-style-bordered li a:hover,
.xmega-link-style-bordered li a:focus {
	background: var(--xmega-card-bg, rgba(0, 0, 0, 0.03));
	border-color: var(--xmega-link-color, #1f5f8b);
	text-decoration: none;
}

.xmega-link-style-radio li a {
	align-items: center;
	display: inline-flex;
	gap: 10px;
}

.xmega-link-style-radio li a::before {
	border: 1.5px solid var(--xmega-card-border, rgba(0, 0, 0, 0.25));
	border-radius: 50%;
	box-sizing: border-box;
	content: "";
	flex: 0 0 auto;
	height: 15px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	width: 15px;
}

.xmega-link-style-radio li a:hover::before,
.xmega-link-style-radio li a:focus::before {
	border-color: var(--xmega-link-color, #1f5f8b);
	box-shadow: inset 0 0 0 3px var(--xmega-link-color, #1f5f8b);
}

.xmega-link-style-radio li a:hover,
.xmega-link-style-radio li a:focus {
	text-decoration: none;
}

/* Active / highlighted item ----------------------------------------------- */
.xmega-link-list li.is-highlight > a {
	color: var(--xmega-link-color, #1f5f8b);
	font-weight: 600;
}

.xmega-link-style-radio li.is-highlight a::before {
	border-color: var(--xmega-link-color, #1f5f8b);
	box-shadow: inset 0 0 0 3px var(--xmega-link-color, #1f5f8b);
}

.xmega-link-style-bordered li.is-highlight > a,
.xmega-link-style-icon-card li.is-highlight > a {
	border-color: var(--xmega-link-color, #1f5f8b);
	box-shadow: 0 0 0 1px var(--xmega-link-color, #1f5f8b);
}

.xmega-link-style-arrows.is-highlight,
.xmega-link-list.xmega-link-arrows li.is-highlight a::before {
	opacity: 1;
}

/* Icon Card link style (fig.3): icon + label inside a bordered cell -------- */
.xmega-link-style-icon-card {
	gap: 12px;
}

.xmega-link-style-icon-card li a {
	align-items: center;
	border: 1px solid var(--xmega-card-border, rgba(0, 0, 0, 0.1));
	border-radius: var(--xmega-card-radius, 8px);
	display: flex;
	gap: 12px;
	padding: 12px 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.xmega-link-style-icon-card li a:hover,
.xmega-link-style-icon-card li a:focus {
	border-color: var(--xmega-link-color, #1f5f8b);
	text-decoration: none;
}

.xmega-link-style-icon-card .xmega-link-icon {
	align-items: center;
	background: var(--xmega-card-bg, rgba(0, 0, 0, 0.05));
	border-radius: 6px;
	display: inline-flex;
	flex: 0 0 auto;
	height: 34px;
	justify-content: center;
	width: 34px;
}

.xmega-link-style-icon-card .xmega-link-icon i {
	font-size: 18px;
}

.xmega-link-style-icon-card li.is-highlight .xmega-link-icon {
	background: var(--xmega-link-color, #1f5f8b);
	color: #fff;
}

/* Bullet link style (fig.4): small square marker -------------------------- */
.xmega-link-style-bullet li a {
	align-items: center;
	display: inline-flex;
	gap: 10px;
}

.xmega-link-style-bullet li a::before {
	background: var(--xmega-card-border, rgba(0, 0, 0, 0.35));
	content: "";
	flex: 0 0 auto;
	height: 7px;
	width: 7px;
}

.xmega-link-style-bullet li.is-highlight a::before {
	background: var(--xmega-link-color, #1f5f8b);
}

/* Manual Link List with icon cells (icon cards, fig.3) --------------------- */
.xmega-link-list .xmega-link-icon {
	align-items: center;
	background: var(--xmega-link-icon-bg, var(--xmega-card-bg, rgba(0, 0, 0, 0.05)));
	border-radius: 6px;
	color: var(--xmega-link-icon-color, var(--xmega-link-color, inherit));
	display: inline-flex;
	font-size: 16px;
	height: 30px;
	justify-content: center;
	width: 30px;
}

.xmega-link-list .xmega-link-icon .xmega-icon-img {
	height: 18px;
	width: 18px;
}

.xmega-link-card-grid ul {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.xmega-link-card-grid.xmega-link-card-cols-2 ul {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.xmega-link-card-grid.xmega-link-card-cols-4 ul {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.xmega-link-card-grid li + li {
	margin-top: 0;
}

.xmega-link-card-grid a {
	align-items: center;
	background: #fff;
	border: 1px solid var(--xmega-card-border, #dfe6ee);
	border-radius: 6px;
	box-sizing: border-box;
	color: var(--xmega-link-color, #0f2742);
	display: flex;
	gap: 10px;
	min-height: 48px;
	padding: 12px 14px;
	width: 100%;
}

.xmega-link-card-grid a:hover,
.xmega-link-card-grid a:focus {
	border-color: var(--xmega-link-color, #1f5f8b);
	box-shadow: 0 6px 18px rgba(15, 39, 66, 0.08);
	text-decoration: none;
	transform: translateY(-1px);
}

.xmega-link-card-grid .xmega-link-icon {
	border-radius: 6px;
	height: 24px;
	width: 24px;
}

.xmega-link-card-grid .xmega-link-text {
	color: inherit;
	font-weight: var(--xmega-link-font-weight, 600);
}

@media (max-width: 900px) {
	.xmega-link-card-grid ul,
	.xmega-link-card-grid.xmega-link-card-cols-4 ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.xmega-link-card-grid ul,
	.xmega-link-card-grid.xmega-link-card-cols-2 ul,
	.xmega-link-card-grid.xmega-link-card-cols-4 ul {
		grid-template-columns: 1fr;
	}
}

.xmega-featured-card,
.xmega-cta-box {
	background: var(--xmega-card-bg, rgba(0, 0, 0, 0.035));
	border: 1px solid var(--xmega-card-border, rgba(0, 0, 0, 0.08));
	border-radius: var(--xmega-card-radius, 6px);
	padding: 16px;
}

/* Featured card with a left accent (fig.5) -------------------------------- */
.xmega-featured-card {
	border-left: 3px solid var(--xmega-link-color, #1f5f8b);
}

.xmega-featured-card img {
	margin-bottom: 10px;
}

/* Premium horizontal card: icon + title/description + arrow -------------- */
.xmega-premium-card {
	align-items: center;
	background: #fff;
	border: 1px solid var(--xmega-card-border, #dfe6ee);
	border-left: 3px solid var(--xmega-premium-accent, #8bc34a);
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
	box-sizing: border-box;
	color: var(--xmega-text-color, inherit);
	display: flex;
	gap: 14px;
	min-width: 0;
	padding: 18px 16px 18px 24px;
	text-decoration: none;
	transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
	width: 100%;
}

.xmega-premium-card:hover,
.xmega-premium-card:focus {
	border-color: var(--xmega-premium-accent, #8bc34a);
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
	color: var(--xmega-text-color, inherit);
	text-decoration: none;
	transform: translateY(-1px);
}

.xmega-premium-icon {
	align-items: center;
	background: #eef8e9;
	border-radius: 999px;
	color: var(--xmega-link-color, #1f5f8b);
	display: inline-flex;
	flex: 0 0 auto;
	height: 32px;
	justify-content: center;
	width: 32px;
}

.xmega-premium-icon .dashicons,
.xmega-premium-icon i {
	font-size: 18px;
	height: 18px;
	line-height: 18px;
	width: 18px;
}

.xmega-premium-icon .xmega-icon-img {
	height: 18px;
	object-fit: contain;
	width: 18px;
}

.xmega-premium-copy {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.xmega-premium-title {
	color: var(--xmega-heading-color, inherit);
	font-size: var(--xmega-link-font-size, 14px);
	font-weight: var(--xmega-heading-font-weight, 700);
	line-height: 1.25;
}

.xmega-premium-description {
	color: var(--xmega-text-color, inherit);
	font-size: calc(var(--xmega-menu-font-size, 14px) * 0.82);
	font-weight: var(--xmega-menu-font-weight, 400);
	line-height: 1.35;
	opacity: 0.72;
}

.xmega-premium-arrow {
	color: var(--xmega-link-color, #64748b);
	flex: 0 0 auto;
	font-size: 22px;
	line-height: 1;
	opacity: 0.72;
}

.xmega-module-image {
	background: var(--xmega-card-bg, rgba(0, 0, 0, 0.035));
	border: 1px solid var(--xmega-card-border, rgba(0, 0, 0, 0.08));
	border-radius: var(--xmega-card-radius, 6px);
	overflow: hidden;
}

.xmega-style-clean-industrial {
	--xmega-panel-bg: #ffffff;
	--xmega-panel-color: #1f2933;
	--xmega-heading-color: #1f2933;
	--xmega-link-color: #1f5f8b;
	--xmega-link-hover-color: #153f5f;
	--xmega-button-bg: #1f5f8b;
	--xmega-card-bg: #f5f7f8;
	--xmega-card-border: #d9e0e5;
	--xmega-card-radius: 8px;
	--xmega-panel-padding: 28px;
	--xmega-panel-shadow: 0 18px 48px rgba(31, 41, 51, 0.16);
}

.xmega-style-dark-engineering {
	--xmega-panel-bg: #121820;
	--xmega-panel-color: #dbe5ee;
	--xmega-heading-color: #f8fafc;
	--xmega-link-color: #8fc7ff;
	--xmega-link-hover-color: #c7e4ff;
	--xmega-button-bg: #2f80ed;
	--xmega-card-bg: rgba(255, 255, 255, 0.06);
	--xmega-card-border: rgba(255, 255, 255, 0.14);
	--xmega-card-radius: 8px;
	--xmega-panel-padding: 30px;
	--xmega-panel-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.xmega-style-light-b2b {
	--xmega-panel-bg: #f8fafc;
	--xmega-panel-color: #243447;
	--xmega-heading-color: #243447;
	--xmega-link-color: #2463a6;
	--xmega-link-hover-color: #163f6c;
	--xmega-button-bg: #243447;
	--xmega-card-bg: #ffffff;
	--xmega-card-border: #e3e8ef;
	--xmega-card-radius: 6px;
	--xmega-panel-padding: 26px;
	--xmega-panel-shadow: 0 10px 24px rgba(36, 52, 71, 0.12);
}

.xmega-style-blue-technical {
	--xmega-panel-bg: #f3f8fc;
	--xmega-panel-color: #103c5f;
	--xmega-heading-color: #103c5f;
	--xmega-link-color: #1261a6;
	--xmega-link-hover-color: #083a66;
	--xmega-button-bg: #1261a6;
	--xmega-card-bg: #ffffff;
	--xmega-card-border: #c9dceb;
	--xmega-card-radius: 10px;
	--xmega-panel-padding: 30px;
	--xmega-panel-shadow: 0 18px 48px rgba(18, 97, 166, 0.18);
}

.xmega-shadow-none {
	box-shadow: none;
}

.xmega-shadow-soft {
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

.xmega-shadow-medium {
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

.xmega-shadow-strong {
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

@media (max-width: 900px) {
	.xmega-mega-panel,
	.xmega-width-full,
	.xmega-width-custom {
		left: 0;
		min-width: 0;
		max-width: 100%;
		position: static;
		transform: none;
		width: 100%;
	}

	.xmega-mega-enabled > .xmega-mega-panel {
		display: none;
		box-shadow: none;
		margin-top: 8px;
		padding: 18px;
	}

	.xmega-mega-enabled:hover > .xmega-mega-panel {
		display: none;
	}

	.xmega-mega-enabled:focus-within > .xmega-mega-panel,
	.xmega-mega-enabled.xmega-open > .xmega-mega-panel {
		display: block;
	}

	.xmega-mega-grid {
		grid-template-columns: 1fr !important;
	}

	.xmega-module-column {
		gap: 10px;
	}

	.xmega-module-button {
		box-sizing: border-box;
		text-align: center;
		width: 100%;
	}
}

/* Menu item badge (Sale / Hot / New) -------------------------------------- */

/*
 * FIX v0.18 — Badge is a top-right FLOATING tag again.
 *
 * Strategy: the badge is absolutely positioned relative to its label
 * wrapper, anchored to the top-right corner, with a smaller font than
 * the menu text. To survive theme overflow:hidden, every ancestor that
 * wraps an .xmega-menu-label is forced to overflow:visible.
 *
 * Works at every depth and in BOTH render paths:
 *   - Auto submenu  -> .xmega-menu-label (built by render_menu_label)
 *   - Manual modules -> .xmega-module-heading / .xmega-link-list <a>
 *     (badge injected by the walker with the same .xmega-badge class)
 */
.xmega-menu-label {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	overflow: visible !important;
	position: relative;
	vertical-align: middle;
	white-space: nowrap;
}

/* The floating badge itself ------------------------------------------------ */
.xmega-badge {
	/*
	 * FIX v0.19 — anchor the badge to the END of the text (left:100%) instead
	 * of the label's right edge, then nudge it up. This puts the tag at the
	 * top-right OUTSIDE corner of the last character, matching the desired
	 * "floating just past the text" look.
	 */
	position: absolute !important;
	left: 100%;
	top: -0.5em;
	right: auto;
	margin-left: 2px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	font-size: 8px;            /* smaller than the menu font */
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1;
	padding: 2px 4px;
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;      /* never block the link/Inspector click */
	z-index: 6;
	/* hard visibility guarantees */
	visibility: visible !important;
	opacity: 1 !important;
	clip: auto !important;
	clip-path: none !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/*
 * Manual-module badge anchors.
 * A heading or a link <a> that carries a badge becomes the positioning
 * context. We tag those elements with .xmega-has-badge so we only pay the
 * position:relative cost where a badge is actually present.
 */
/*
 * .xmega-badge-wrap is an inline-block that shrink-wraps the text, so a
 * badge positioned left:100% lands exactly at the text's top-right corner
 * regardless of how wide the parent <a>/<div> is.
 */
.xmega-badge-wrap {
	position: relative;
	display: inline-block;
	overflow: visible !important;
}

.xmega-module-heading.xmega-has-badge,
.xmega-link-list a.xmega-has-badge,
.xmega-link-list-title.xmega-has-badge {
	overflow: visible !important;
}

/*
 * Force overflow visible on every ancestor that wraps a badge so the theme
 * can never clip the floating tag. Covers all depths / both render paths.
 */
.xmega-menu-label,
.xmega-menu-label *,
.menu-item .xmega-menu-label,
.menu-item > a,
.nav-link .xmega-menu-label,
.sub-menu .xmega-menu-label,
.xmega-mega-panel,
.xmega-mega-panel .xmega-menu-label,
.xmega-mega-grid,
.xmega-mega-entry,
.xmega-module,
.xmega-module-heading,
.xmega-link-list,
.xmega-link-list li,
.xmega-link-list a,
.xmega-badge-wrap,
.xmega-link-list .xmega-menu-label,
.xmega-link-list a .xmega-menu-label,
.xmega-column-title,
.xmega-column-title .xmega-menu-label {
	overflow: visible !important;
}

/* =========================================================================
 * v0.22 — Promo layout + heading decorations + link markers + featured card
 * ========================================================================= */

/* ---- Heading style presets --------------------------------------------- */
/* Eyebrow: small uppercase label with letter-spacing and accent colour. */
.xmega-module-heading.xmega-heading-eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--xmega-accent, #2f5bc4);
}

/* Underlined heading: title with an accent underline rule.
 * Colour and weight come from CSS custom properties set inline by the walker
 * (--xmega-rule-color / --xmega-rule-weight), with sensible fallbacks. */
.xmega-module-heading.xmega-heading-underline {
	padding-bottom: 8px;
	border-bottom: var(--xmega-rule-weight, 2px) solid var(--xmega-rule-color, var(--xmega-accent, #2f5bc4));
	display: inline-block;
}

/* Divider line below a heading (independent of the style preset). */
.xmega-module-heading.xmega-heading-divider {
	padding-bottom: 12px;
	border-bottom: var(--xmega-rule-weight, 1px) solid var(--xmega-rule-color, var(--xmega-border, #e5e7eb));
	margin-bottom: 8px;
	display: block;
}

/* Rule length presets ----------------------------------------------------- */
/* Full width: stretch the underline across the whole block. */
.xmega-module-heading.xmega-rule-full {
	display: block;
}

/* Short: a fixed 40px accent rule. Implemented via ::after so it works even
 * on a normal (non-underline) heading. */
.xmega-module-heading.xmega-rule-short {
	border-bottom: 0 !important;
	padding-bottom: 10px;
	position: relative;
	display: block;
}

.xmega-module-heading.xmega-rule-short::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 40px;
	height: var(--xmega-rule-weight, 2px);
	background: var(--xmega-rule-color, var(--xmega-accent, #2f5bc4));
}

/* Full-row heading: spans every column of the grid as a shared header. */
.xmega-fullrow-entry {
	grid-column: 1 / -1;
}

.xmega-fullrow-entry .xmega-module-heading {
	margin-bottom: 4px;
}

/* ---- Link List marker presets ------------------------------------------ */
/* The marker sits before each link label. Implemented with ::before so it
 * never interferes with AIPI selection of the link text itself. */
.xmega-link-list[class*="xmega-marker-"] ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.xmega-link-list[class*="xmega-marker-"] li {
	margin: 0;
}

.xmega-link-list[class*="xmega-marker-"] a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
}

/* Circle check (screenshot 1) */
.xmega-marker-circle a::before {
	content: "";
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1.5px solid currentColor;
	opacity: 0.55;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23999' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M4.5 8.2l2.2 2.2 4.8-4.8'/%3E%3C/svg%3E");
	background-position: center;
	background-repeat: no-repeat;
}

/* Arrow chevron (screenshot 2) */
.xmega-marker-arrow a::before {
	content: "";
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: rotate(45deg);
	opacity: 0.5;
}

/* Square bullet (screenshot 4) */
.xmega-marker-square a::before {
	content: "";
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	border-radius: 2px;
	background: currentColor;
	opacity: 0.45;
}

/* Card box (screenshot 3) — each link becomes a bordered tile */
.xmega-marker-card ul {
	display: grid;
	gap: 8px;
}

.xmega-marker-card a {
	padding: 12px 14px;
	border: 1px solid var(--xmega-border, #e5e7eb);
	border-radius: 8px;
	background: var(--xmega-bg-alt, #f8f9fa);
	transition: border-color 0.15s ease, background 0.15s ease;
}

.xmega-marker-card a:hover {
	border-color: var(--xmega-accent, #2f5bc4);
	background: #fff;
	text-decoration: none;
}

.xmega-marker-card a::before {
	content: "";
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: rotate(45deg);
	opacity: 0.4;
	margin-left: auto;
	order: 2;
}

.xmega-marker-card a > * {
	order: 1;
}

/* ---- Featured Card highlight variant (screenshot 4 Corning box) -------- */
.xmega-featured-card-highlight {
	border: 1px solid var(--xmega-accent, #2f5bc4);
	border-left: 4px solid var(--xmega-accent, #2f5bc4);
	border-radius: 8px;
	padding: 16px 18px;
	background: var(--xmega-bg-alt, #f6f8fc);
}

/* ---- Promo panel + split layout ---------------------------------------- */
/* A column containing a promo module becomes a dark sidebar tile. We avoid
 * negative margins (they collapse grid layouts and get clipped by the panel's
 * overflow:hidden). Instead the promo column is a self-contained rounded dark
 * card that fills its grid track. */
.xmega-promo-column {
	display: flex;
	align-self: stretch;
	border-radius: 8px;
	overflow: hidden;
}

.xmega-promo {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 14px;
	width: 100%;
	padding: var(--xmega-panel-padding, 32px);
}

/*
 * Force every text element inside the promo column to inherit the column's
 * colour (set inline from promo_color). Themes often colour .menu-item text
 * with their own dark colour at a specificity that beats plain inheritance,
 * which made the promo title/eyebrow/description invisible on a dark rail.
 */
.xmega-promo-column,
.xmega-promo-column .xmega-promo,
.xmega-promo-column .xmega-promo-eyebrow,
.xmega-promo-column .xmega-promo-title,
.xmega-promo-column .xmega-promo-description,
.xmega-promo-column .xmega-promo-description p {
	/* Use the promo colour variable when set, else inherit the column colour.
	 * !important beats theme .menu-item text-colour rules. */
	color: var(--xmega-promo-color, inherit) !important;
}

.xmega-promo-eyebrow {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.7;
}

.xmega-promo-title {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.15;
}

.xmega-promo-description {
	font-size: 14px;
	line-height: 1.6;
	opacity: 0.8;
}

.xmega-promo-description p {
	margin: 0;
}

.xmega-promo-button {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 8px;
	margin-top: 6px;
	padding: 11px 20px;
	border-radius: 6px;
	background: var(--xmega-accent, #2f5bc4);
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

.xmega-promo-button:hover {
	opacity: 0.9;
	text-decoration: none;
	color: #fff;
}

/* Mobile: promo column stops being a side rail, stacks on top. */
@media (max-width: 782px) {
	.xmega-promo {
		padding: 24px;
	}
	.xmega-promo-title {
		font-size: 22px;
	}
}

/* ---- Section module (shared header + sub-column grid) ------------------- */
.xmega-section {
	width: 100%;
}

.xmega-section-grid {
	display: grid;
	gap: var(--xmega-column-spacing, 28px);
	grid-template-columns: repeat(var(--xmega-section-cols, 3), minmax(0, 1fr));
}

.xmega-section-cols-1 .xmega-section-grid { --xmega-section-cols: 1; }
.xmega-section-cols-2 .xmega-section-grid { --xmega-section-cols: 2; }
.xmega-section-cols-3 .xmega-section-grid { --xmega-section-cols: 3; }
.xmega-section-cols-4 .xmega-section-grid { --xmega-section-cols: 4; }
.xmega-section-cols-5 .xmega-section-grid { --xmega-section-cols: 5; }
.xmega-section-cols-6 .xmega-section-grid { --xmega-section-cols: 6; }

/* The header sits above the grid with a little breathing room. */
.xmega-section > .xmega-module-heading {
	margin-bottom: 16px;
}

.xmega-section-col {
	min-width: 0;
}

@media (max-width: 782px) {
	.xmega-section-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

/* ---- Per-column background (Column Backgrounds setting) ----------------- */
.xmega-mega-panel.xmega-has-column-bg {
	padding: 0;
	overflow: hidden;
}

.xmega-mega-panel.xmega-has-column-bg > .xmega-mega-grid {
	display: grid !important;
	gap: var(--xmega-column-spacing, 28px);
	align-items: stretch;
}

.xmega-mega-panel.xmega-has-column-bg.xmega-columns-1 > .xmega-mega-grid { --xmega-grid-cols: repeat(1, minmax(0, 1fr)); }
.xmega-mega-panel.xmega-has-column-bg.xmega-columns-2 > .xmega-mega-grid { --xmega-grid-cols: repeat(2, minmax(0, 1fr)); }
.xmega-mega-panel.xmega-has-column-bg.xmega-columns-3 > .xmega-mega-grid { --xmega-grid-cols: repeat(3, minmax(0, 1fr)); }
.xmega-mega-panel.xmega-has-column-bg.xmega-columns-4 > .xmega-mega-grid { --xmega-grid-cols: repeat(4, minmax(0, 1fr)); }
.xmega-mega-panel.xmega-has-column-bg.xmega-columns-5 > .xmega-mega-grid { --xmega-grid-cols: repeat(5, minmax(0, 1fr)); }
.xmega-mega-panel.xmega-has-column-bg.xmega-columns-6 > .xmega-mega-grid { --xmega-grid-cols: repeat(6, minmax(0, 1fr)); }

.xmega-mega-panel.xmega-has-column-bg > .xmega-mega-grid > .xmega-mega-entry.xmega-module-column,
.xmega-mega-panel.xmega-has-column-bg > .xmega-mega-grid > .xmega-mega-entry.xmega-promo-column,
.xmega-mega-panel.xmega-has-column-bg > .xmega-mega-grid > .xmega-mega-entry.xmega-col-has-bg {
	grid-column: auto !important;
	min-width: 0 !important;
	width: auto !important;
}

.xmega-mega-entry.xmega-col-has-bg {
	border-radius: 0;
	padding: var(--xmega-panel-padding, 28px);
}

.xmega-mega-panel.xmega-has-column-bg .xmega-promo-column {
	border-radius: 0;
}

/* Keep manual module columns side by side on tablet/desktop even after the
 * responsive menu rules above. Phone widths still stack via the 782px rules. */
@media (min-width: 783px) {
	.xmega-mega-panel.xmega-columns-1 > .xmega-mega-grid { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
	.xmega-mega-panel.xmega-columns-2 > .xmega-mega-grid { grid-template-columns: var(--xmega-grid-cols, repeat(2, minmax(0, 1fr))) !important; }
	.xmega-mega-panel.xmega-columns-3 > .xmega-mega-grid { grid-template-columns: var(--xmega-grid-cols, repeat(3, minmax(0, 1fr))) !important; }
	.xmega-mega-panel.xmega-columns-4 > .xmega-mega-grid { grid-template-columns: var(--xmega-grid-cols, repeat(4, minmax(0, 1fr))) !important; }
	.xmega-mega-panel.xmega-columns-5 > .xmega-mega-grid { grid-template-columns: var(--xmega-grid-cols, repeat(5, minmax(0, 1fr))) !important; }
	.xmega-mega-panel.xmega-columns-6 > .xmega-mega-grid { grid-template-columns: var(--xmega-grid-cols, repeat(6, minmax(0, 1fr))) !important; }

	.xmega-mega-panel > .xmega-mega-grid > .xmega-mega-entry.xmega-module-column,
	.xmega-mega-panel > .xmega-mega-grid > .xmega-mega-entry.xmega-promo-column,
	.xmega-mega-panel > .xmega-mega-grid > .xmega-mega-entry.xmega-col-has-bg {
		grid-column: auto !important;
		min-width: 0 !important;
		width: auto !important;
	}
}

/* Final Card Grid override lives after legacy marker presets so this display
 * mode keeps its card layout regardless of marker defaults. */
.xmega-link-list.xmega-link-card-grid ul {
	display: grid !important;
	gap: 12px !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.xmega-link-list.xmega-link-card-grid.xmega-link-card-cols-2 ul {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.xmega-link-list.xmega-link-card-grid.xmega-link-card-cols-4 ul {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.xmega-link-list.xmega-link-card-grid a {
	background: #fff !important;
	border: 1px solid var(--xmega-card-border, #dfe6ee) !important;
	border-radius: 6px !important;
	box-shadow: none;
	color: var(--xmega-link-color, #0f2742) !important;
	display: flex !important;
	min-height: 48px;
	padding: 12px 14px !important;
	text-decoration: none !important;
	width: 100%;
}

.xmega-link-list.xmega-link-card-grid a::before {
	display: none !important;
}

.xmega-link-list.xmega-link-card-grid a:hover,
.xmega-link-list.xmega-link-card-grid a:focus {
	border-color: var(--xmega-link-color, #1f5f8b) !important;
	box-shadow: 0 6px 18px rgba(15, 39, 66, 0.08);
	transform: translateY(-1px);
}

@media (max-width: 900px) {
	.xmega-link-list.xmega-link-card-grid ul,
	.xmega-link-list.xmega-link-card-grid.xmega-link-card-cols-4 ul {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 560px) {
	.xmega-link-list.xmega-link-card-grid ul,
	.xmega-link-list.xmega-link-card-grid.xmega-link-card-cols-2 ul,
	.xmega-link-list.xmega-link-card-grid.xmega-link-card-cols-4 ul {
		grid-template-columns: 1fr !important;
	}
}


/* =====================================================================
 * Linked Tabs module (v3-alpha-0_46)
 * Three regions: tab rail + switching panels + optional fixed sidebar.
 * Container chrome (bg/padding/radius) driven by CSS custom properties.
 * High-specificity + !important so Kadence/Blocksy cannot override.
 * ===================================================================== */
.xmega-mega-panel .xmega-tab-group {
	display: grid !important;
	gap: var(--xmega-tab-content-gap, clamp(20px, 3vw, 48px));
	align-items: start;
	width: 100%;
	box-sizing: border-box;
	background: var(--xmega-tab-container-bg, transparent);
	padding: var(--xmega-tab-container-pad, 0);
	border-radius: var(--xmega-tab-container-radius, 0);
}

/* ---- Column templates ---- */
/* left rail + content (no sidebar) */
.xmega-mega-panel .xmega-tab-group.xmega-tab-layout-left {
	grid-template-columns: var(--xmega-tab-rail, 24%) minmax(0, 1fr) !important;
}
/* left rail + content + fixed sidebar */
.xmega-mega-panel .xmega-tab-group.xmega-tab-layout-left.xmega-tab-has-sidebar {
	grid-template-columns: var(--xmega-tab-rail, 24%) minmax(0, 1fr) var(--xmega-tab-sidebar, 24%) !important;
}
/* top tabs (rail spans full width above) */
.xmega-mega-panel .xmega-tab-group.xmega-tab-layout-top {
	grid-template-columns: minmax(0, 1fr) !important;
}
.xmega-mega-panel .xmega-tab-group.xmega-tab-layout-top.xmega-tab-has-sidebar {
	grid-template-columns: minmax(0, 1fr) var(--xmega-tab-sidebar, 24%) !important;
}
.xmega-mega-panel .xmega-tab-group.xmega-tab-layout-top .xmega-tab-rail {
	grid-column: 1 / -1;
}

/* ---- Tab rail ---- */
.xmega-mega-panel .xmega-tab-rail {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.xmega-mega-panel .xmega-tab-group.xmega-tab-layout-top .xmega-tab-rail {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 6px;
	border-bottom: 1px solid var(--xmega-border, #e5e7eb);
	padding-bottom: 8px;
	margin-bottom: 4px;
}

.xmega-mega-panel .xmega-tab {
	display: block;
	width: 100%;
	text-align: left;
	font: inherit;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
	color: var(--xmega-link-color, #1f2937);
	background: transparent;
	border: 0;
	border-radius: 8px;
	padding: 11px 14px;
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease;
	-webkit-appearance: none;
	appearance: none;
}
.xmega-mega-panel .xmega-tab-group.xmega-tab-layout-top .xmega-tab {
	width: auto;
}
.xmega-mega-panel .xmega-tab:hover {
	background: var(--xmega-tab-hover-bg, #f1f5fb);
}
.xmega-mega-panel .xmega-tab:focus-visible {
	outline: 2px solid var(--xmega-accent, #2f5bc4);
	outline-offset: 1px;
}
.xmega-mega-panel .xmega-tab[aria-selected="true"] {
	background: var(--xmega-tab-active-bg, #e8f1fd) !important;
	color: var(--xmega-tab-active-color, #1c5cc4) !important;
}

/* ---- Switching panels ---- */
.xmega-mega-panel .xmega-tab-panels {
	min-width: 0;
}
.xmega-mega-panel .xmega-tab-panel[hidden] {
	display: none !important;
}

/* Free-form panel body: child modules stack vertically by default. */
.xmega-mega-panel .xmega-tab-body-free {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}
.xmega-mega-panel .xmega-tab-body-free > .xmega-module {
	margin: 0;
}

/* ---- Fixed sidebar ---- */
.xmega-mega-panel .xmega-tab-sidebar {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* ---- Eyebrow on headings (small green label above title) ---- */
.xmega-mega-panel .xmega-heading-eyebrow {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--xmega-accent, #6aa84f);
	margin-bottom: 8px;
}

/* ---- Link list description sub-text (used by Popular Links sidebar) ---- */
.xmega-mega-panel .xmega-link-desc {
	display: block;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.45;
	color: var(--xmega-text-muted, #6b7280);
	margin-top: 2px;
}

/* ===== Legacy structured panel body (backward compatibility) ===== */
.xmega-mega-panel .xmega-tab-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(18px, 2.5vw, 40px);
	align-items: start;
}
.xmega-mega-panel .xmega-tab-body.xmega-tab-has-media {
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}
.xmega-mega-panel .xmega-tab-eyebrow {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--xmega-accent, #6aa84f);
	margin: 0 0 10px;
}
.xmega-mega-panel .xmega-tab-title {
	font-size: clamp(20px, 2vw, 26px);
	font-weight: 800;
	line-height: 1.2;
	color: var(--xmega-heading-color, #16233f);
	margin: 0 0 14px;
}
.xmega-mega-panel .xmega-tab-bullets {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	display: grid;
	gap: 9px;
}
.xmega-mega-panel .xmega-tab-bullets li {
	position: relative;
	padding-left: 26px;
	font-size: 14.5px;
	line-height: 1.45;
	color: var(--xmega-text, #374151);
}
.xmega-mega-panel .xmega-tab-bullets li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 700;
	color: var(--xmega-accent, #6aa84f);
}
.xmega-mega-panel .xmega-tab-desc {
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--xmega-text, #374151);
	margin: 0 0 18px;
}
.xmega-mega-panel .xmega-tab-media {
	background: var(--xmega-tab-media-bg, #f4f6f9);
	border-radius: 10px;
	padding: 18px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 100%;
}
.xmega-mega-panel .xmega-tab-media img {
	max-width: 100%;
	height: auto;
	display: block;
}
.xmega-mega-panel .xmega-tab-caption {
	font-size: 12px;
	color: var(--xmega-text-muted, #6b7280);
	text-align: center;
}

/* ---- Responsive: stack regions, scroll the rail ---- */
@media (max-width: 1100px) {
	.xmega-mega-panel .xmega-tab-group.xmega-tab-has-sidebar.xmega-tab-layout-left {
		grid-template-columns: var(--xmega-tab-rail, 24%) minmax(0, 1fr) !important;
	}
	.xmega-mega-panel .xmega-tab-group.xmega-tab-has-sidebar .xmega-tab-sidebar {
		grid-column: 1 / -1;
		border-top: 1px solid var(--xmega-border, #e5e7eb);
		padding-top: 16px;
		margin-top: 4px;
	}
}

@media (max-width: 900px) {
	.xmega-mega-panel .xmega-tab-group.xmega-tab-layout-left,
	.xmega-mega-panel .xmega-tab-group.xmega-tab-layout-top,
	.xmega-mega-panel .xmega-tab-group.xmega-tab-has-sidebar.xmega-tab-layout-left {
		grid-template-columns: minmax(0, 1fr) !important;
	}
	.xmega-mega-panel .xmega-tab-rail {
		flex-direction: row !important;
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 6px;
		padding-bottom: 8px;
		border-bottom: 1px solid var(--xmega-border, #e5e7eb);
		-webkit-overflow-scrolling: touch;
	}
	.xmega-mega-panel .xmega-tab {
		width: auto !important;
		white-space: nowrap;
		flex: 0 0 auto;
	}
	.xmega-mega-panel .xmega-tab-body.xmega-tab-has-media {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.xmega-mega-panel .xmega-tab {
		transition: none !important;
	}
}

/* =====================================================================
 * Advanced Layout Mode — Layout Composer (v3-alpha-0_50-dev)
 * Layout → Slots → Widgets. High-specificity + !important to beat themes.
 * ===================================================================== */
.xmega-mega-enabled .xmega-layout-menu,
.xmega-layout-menu {
	box-sizing: border-box;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 18px 50px rgba(15, 35, 63, 0.16);
	z-index: 9999;
	position: relative;
}

.xmega-layout-menu .xmega-layout-grid {
	display: flex;
	flex-wrap: nowrap;
	gap: 28px;
	padding: 28px 32px;
	align-items: stretch;
	width: 100%;
	box-sizing: border-box;
}

.xmega-layout-menu .xmega-layout-slot {
	flex: 0 0 var(--xmega-slot-width, 25%);
	max-width: var(--xmega-slot-width, 25%);
	min-width: 0;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Widgets ----------------------------------------------------------- */
.xmega-layout-menu .xmega-widget {
	min-width: 0;
}
.xmega-layout-menu .xmega-widget-eyebrow {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #6b7280;
	margin-bottom: 14px;
}
.xmega-layout-menu .xmega-widget-eyebrow--green { color: #6aa84f; }
.xmega-layout-menu .xmega-widget-eyebrow--muted { color: #8a93a0; }

.xmega-layout-menu .xmega-widget-list,
.xmega-layout-menu .xmega-widget-popular,
.xmega-layout-menu .xmega-widget-features {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* category_list */
.xmega-layout-menu .xmega-widget-category-list .xmega-widget-list li a {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 15px;
	color: #16233f;
	text-decoration: none;
	overflow-wrap: anywhere;
}
.xmega-layout-menu .xmega-widget-category-list .xmega-widget-list li.is-active a,
.xmega-layout-menu .xmega-widget-category-list .xmega-widget-list li a:hover {
	background: #e8f1fd;
	color: #1c5cc4;
}

/* featured_product */
.xmega-layout-menu .xmega-widget-title {
	font-size: clamp(20px, 1.6vw, 24px);
	font-weight: 800;
	line-height: 1.2;
	color: #16233f;
	margin: 0 0 16px;
	overflow-wrap: anywhere;
}
.xmega-layout-menu .xmega-widget-features li {
	position: relative;
	padding-left: 26px;
	margin-bottom: 10px;
	font-size: 14.5px;
	line-height: 1.45;
	color: #374151;
}
.xmega-layout-menu .xmega-widget-features li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 700;
	color: #6aa84f;
}
.xmega-layout-menu .xmega-widget-btn {
	display: inline-block;
	margin-top: 8px;
	padding: 12px 22px;
	background: #1c5cc4;
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	border-radius: 8px;
	text-decoration: none;
}
.xmega-layout-menu .xmega-widget-btn:hover { background: #154a9e; }

/* product_image — never cropped, always contained */
.xmega-layout-menu .xmega-widget-product-image {
	height: 100%;
}
.xmega-layout-menu .xmega-widget-image-figure {
	margin: 0;
	background: #f4f6f9;
	border-radius: 10px;
	padding: 18px;
	height: 100%;
	min-height: 200px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}
.xmega-layout-menu .xmega-widget-image-img {
	display: block;
	max-width: 100%;
	max-height: 320px;
	width: auto;
	height: auto;
	object-fit: contain !important;
}

/* popular_links */
.xmega-layout-menu .xmega-widget-popular li { margin-bottom: 18px; }
.xmega-layout-menu .xmega-widget-popular li a { text-decoration: none; display: block; }
.xmega-layout-menu .xmega-widget-popular-label {
	display: block;
	font-weight: 700;
	font-size: 15px;
	color: #16233f;
	margin-bottom: 3px;
	overflow-wrap: anywhere;
}
.xmega-layout-menu .xmega-widget-popular-desc {
	display: block;
	font-size: 13px;
	color: #6b7280;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

/* cta */
.xmega-layout-menu .xmega-widget-cta-btn {
	display: inline-block;
	margin-top: 6px;
	padding: 10px 18px;
	border: 1px solid #1c5cc4;
	color: #1c5cc4;
	font-weight: 700;
	font-size: 14px;
	border-radius: 8px;
	text-decoration: none;
}
.xmega-layout-menu .xmega-widget-cta-btn:hover {
	background: #1c5cc4;
	color: #fff;
}

/* Mobile: single column, slot-by-slot accordion-style stacking ------- */
@media (max-width: 782px) {
	.xmega-layout-menu {
		max-width: 100%;
		border-radius: 0;
		box-shadow: none;
	}
	.xmega-layout-menu .xmega-layout-grid {
		flex-direction: column;
		flex-wrap: wrap;
		gap: 18px;
		padding: 18px 16px;
	}
	.xmega-layout-menu .xmega-layout-slot {
		flex: 1 1 100% !important;
		max-width: 100% !important;
		border-bottom: 1px solid #e5e7eb;
		padding-bottom: 16px;
	}
	.xmega-layout-menu .xmega-layout-slot:last-child {
		border-bottom: 0;
		padding-bottom: 0;
	}
	.xmega-layout-menu .xmega-widget-image-figure {
		min-height: 160px;
	}
}
