/* Header dropdowns: sections on the left, picture tiles on the right (inc/mega-menu.php). Desktop only;
   the mobile drawer in header.php is unchanged. */
.stx-mega {
	display: none;
}

@media (min-width: 861px) {
	.site-shell .stx-mega-nav {
		position: relative;
	}

	.site-shell .stx-mega-nav .stx-mega-nav__item {
		position: static;
	}

	.site-shell .stx-mega {
		position: absolute;
		z-index: 80;
		top: 100%;
		left: 0;
		right: 0;
		display: grid;
		grid-template-columns: 230px minmax(0, 1fr);
		min-height: 260px;
		visibility: hidden;
		opacity: 0;
		pointer-events: none;
		transform: translateY(6px);
		background: #fff;
		border-top: 3px solid #f97316;
		box-shadow: 0 24px 48px rgba(0, 0, 0, 0.38);
		color: #17202a;
		transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
	}

	.site-shell .stx-mega--single {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	.site-shell .stx-mega-nav__item:hover > .stx-mega,
	.site-shell .stx-mega-nav__item:focus-within > .stx-mega {
		visibility: visible;
		opacity: 1;
		pointer-events: auto;
		transform: translateY(0);
	}

	.site-shell .stx-mega__sections {
		margin: 0;
		padding: 0;
		list-style: none;
		background: #2b313b;
	}

	.site-shell .stx-retail-nav .stx-mega__section {
		display: block;
		min-height: 0;
		padding: 13px 18px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.12);
		border-left: 4px solid transparent;
		color: #fff;
		font-family: "Bebas Neue", Impact, sans-serif;
		font-size: 1.35rem;
		font-weight: 400;
		letter-spacing: 0.02em;
		line-height: 1.1;
		text-transform: none;
		white-space: normal;
	}

	.site-shell .stx-retail-nav .stx-mega__section.is-active,
	.site-shell .stx-retail-nav .stx-mega__section:focus-visible {
		background: #fff;
		border-left-color: #f97316;
		color: #0d131a;
	}

	.site-shell .stx-mega__body {
		padding: 22px 24px 24px;
		min-width: 0;
	}

	.site-shell .stx-mega__pane {
		display: none;
	}

	.site-shell .stx-mega__pane.is-active {
		display: block;
	}

	.site-shell .stx-mega__tiles {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
		gap: 10px;
		padding-bottom: 20px;
		border-bottom: 1px solid #e2e8f0;
	}

	.site-shell .stx-retail-nav .stx-mega__tile {
		display: flex;
		align-items: center;
		gap: 12px;
		min-height: 100px;
		padding: 12px 18px 12px 12px;
		border: 1px solid #e2e8f0;
		border-radius: 2px;
		background: #fff;
		color: #1e293b;
		font-size: 0.9rem;
		font-weight: 600;
		letter-spacing: 0;
		line-height: 1.3;
		text-transform: none;
		white-space: normal; /* menu links are nowrap; tile names must wrap instead of being cut off */
		transition: border-color 0.12s ease, box-shadow 0.12s ease;
	}

	.site-shell .stx-retail-nav .stx-mega__tile:hover,
	.site-shell .stx-retail-nav .stx-mega__tile:focus-visible {
		border-color: #f97316;
		box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
		color: #9a4d00;
	}

	.site-shell .stx-mega__image {
		flex: 0 0 96px;
		height: 64px;
		display: flex;
		align-items: center;
		justify-content: center;
		background: #f8fafc;
		border-radius: 2px;
	}

	.site-shell .stx-mega__image:has(img) {
		background: transparent;
	}

	.site-shell .stx-mega__image img {
		max-width: 100%;
		max-height: 100%;
		object-fit: contain;
	}

	.site-shell .stx-mega__label {
		flex: 1 1 auto;
		min-width: 0;
		text-align: right;
		overflow-wrap: break-word;
	}

	.site-shell .stx-retail-nav .stx-mega__view-all {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		min-height: 0;
		margin-top: 20px;
		padding: 12px 20px;
		border-radius: 2px;
		background: #f97316;
		color: #111;
		font-family: "Bebas Neue", Impact, sans-serif;
		font-size: 1.1rem;
		font-weight: 400;
		letter-spacing: 0.03em;
		text-transform: uppercase;
	}

	.site-shell .stx-retail-nav .stx-mega__view-all:hover,
	.site-shell .stx-retail-nav .stx-mega__view-all:focus-visible {
		background: #fb923c;
		color: #111;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-shell .stx-mega {
		transition: none;
	}
}
