/**
 * [static_mega_menu] — two-panel "All Categories" mega menu.
 *
 * Layout mirrors the serverevolution.com storefront: a sidebar of top-level
 * categories on the left, the active category's link columns on the right,
 * both sharing one tinted panel with a divider between them.
 *
 * Prefixed `smm-` / `smm__` so nothing collides with GeneratePress, which owns
 * .menu / .sub-menu / .menu-item-has-children globally.
 */

.smm {
	--smm-accent: #0076be;
	--smm-text: #1a1a1a;
	--smm-muted: #333;
	--smm-panel-bg: #edf5fa;
	--smm-divider: #d3e3ee;
	--smm-sidebar-w: 235px;
	--smm-panel-w: 1400px;
	--smm-panel-min-h: 420px;
	--smm-ease: cubic-bezier(.7, 0, .3, 1);

	position: relative;
	display: inline-block;
	vertical-align: top;
	height: 100%;
	font-family: inherit;
}

/* ---------------------------------------------------------------------------
 * Trigger
 * ------------------------------------------------------------------------ */

.smm__trigger {
	position: relative;
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
	gap: 10px;
	height: 100%;
	margin: 0;
	padding: 12px 0;
	background: none;
	border: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
	letter-spacing: .01em;
	text-transform: uppercase;
	color: var(--smm-text);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.smm__trigger:hover {
	background: none;
	color: var(--smm-text);
}

/* Underline wipes in from the left on hover, out to the right on leave. */
.smm__trigger::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 1px;
	background-color: currentColor;
	transform: scaleX(0);
	transform-origin: 100% 50%;
	transition: transform .75s var(--smm-ease);
}

.smm:hover .smm__trigger::before,
.smm.is-open .smm__trigger::before,
.smm__trigger:focus-visible::before {
	transform: scaleX(1);
	transform-origin: 0 50%;
}

.smm__chevron {
	flex: none;
	width: 16px;
	height: 16px;
	transition: transform .3s ease;
}

.smm:hover .smm__chevron,
.smm.is-open .smm__chevron {
	transform: rotate(180deg);
}

/* ---------------------------------------------------------------------------
 * Panel
 * ------------------------------------------------------------------------ */

.smm__panel {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1000;
	width: var(--smm-panel-w);
	max-width: calc(100vw - 40px);
	background-color: var(--smm-panel-bg);
	visibility: hidden;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
}

.smm:hover .smm__panel,
.smm.is-open .smm__panel,
.smm:focus-within .smm__panel {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
}

/* Flip rightwards-overflowing panels to hang off the right edge instead (JS). */
.smm.smm--flip .smm__panel {
	left: auto;
	right: 0;
}

.smm__inner {
	display: flex;
	flex-flow: row nowrap;
	align-items: stretch;
	min-height: var(--smm-panel-min-h);
}

/* ---------------------------------------------------------------------------
 * Sidebar — top-level categories
 * ------------------------------------------------------------------------ */

.smm__sidebar {
	flex: none;
	width: var(--smm-sidebar-w);
	margin: 0;
	padding: 22px 0;
	list-style: none;
	border-right: 1px solid var(--smm-divider);
}

.smm__cat {
	margin: 0;
	padding: 0;
	list-style: none;
}

.smm__cat>a {
	position: relative;
	display: inline-block;
	padding: 6px 25px;
	font-size: 15px;
	line-height: 1.4;
	color: var(--smm-muted);
	text-decoration: none;
	text-transform: capitalize !important;
	transition: color .25s ease;
}

/* Underline sits under the text only, not the full row — as on the reference. */
.smm__cat>a::after {
	content: "";
	position: absolute;
	left: 25px;
	right: 25px;
	bottom: 2px;
	height: 1px;
	background-color: currentColor;
	transform: scaleX(0);
	transform-origin: 0 50%;
	transition: transform .3s var(--smm-ease);
}

.smm__cat.is-active>a,
.smm__cat:hover>a {
	color: var(--smm-accent);
}

.smm__cat.is-active>a::after,
.smm__cat:hover>a::after {
	transform: scaleX(1);
}

/* ---------------------------------------------------------------------------
 * Content — the active category's columns
 * ------------------------------------------------------------------------ */

.smm__content {
	flex: 1 1 auto;
	position: relative;
	padding: 22px 25px;
	border-right: 1px solid var(--smm-divider);
	overflow: hidden;
}

.smm__group {
	display: none;
	flex-flow: row wrap;
	align-items: flex-start;
	gap: 10px 45px;
}

.smm__group.is-active {
	display: flex;
}

.smm__col {
	flex: 0 0 auto;
	min-width: 200px;
	max-width: 280px;
	padding-bottom: 20px;
}

.smm__col-title {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--smm-text);
	text-transform: capitalize !important;
}

.smm__col-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Second (and later) title stacked inside the same column, e.g. "Switches"
 * then "Modems" sharing one .smm__col — give it breathing room from the
 * previous block's list. */
.smm__col-list+.smm__col-title {
	margin-top: 18px;
}

.smm__col-list li {
	margin: 0;
}

.smm__link {
	display: block;
	padding: 3px 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--smm-muted);
	text-decoration: none;
	text-transform: capitalize !important;
	transition: color .25s ease;
}

.smm__link:hover,
.smm__link:focus-visible {
	color: var(--smm-accent);
}

.smm__link.see-all {
	margin-top: 4px;
	font-weight: 600;
	color: var(--smm-accent);
}

/* ---------------------------------------------------------------------------
 * Mobile — hidden for now (desktop-only, per spec)
 * ------------------------------------------------------------------------ */

@media (max-width: 991.98px) {
	.smm {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {

	.smm *,
	.smm *::before,
	.smm *::after {
		transition-duration: .01ms !important;
	}
}