#sv-navigation.mth-navigation .mof-direct-roots:empty,
#sv-navigation.mth-navigation .mth-theme-menu {
	display: none;
}

#sv-navigation .mth-desktop-themes {
	container: mth-themes / inline-size;
	display: flex;
	align-items: stretch;
	flex: 1 1 auto;
	justify-content: space-evenly;
	gap: 4px;
	min-width: 0;
}

#sv-navigation :is(.mth-desktop-themes > a, .mth-desktop-themes-all) {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 48px;
	padding-inline: 4px;
	font-size: 13px;
	white-space: nowrap;
}

#sv-navigation a.mth-desktop-themes-all {
	padding-inline: 8px;
	color: var(--mof-ink);
	font-size: 14px;
	font-weight: 600;
}

#sv-navigation a.mth-desktop-themes-all:hover {
	color: var(--mof-orange);
}

#sv-navigation :is(.mth-desktop-themes > a, .mth-desktop-themes-all)[aria-current="page"] {
	color: var(--mof-orange);
	box-shadow: inset 0 -2px var(--mof-orange);
}

#sv-navigation .mth-menu-thumbnail {
	display: block;
	flex: none;
	width: 28px;
	height: 28px;
	object-fit: contain;
	mix-blend-mode: multiply;
}

@container mth-themes (max-width: 570px) {
	#sv-navigation .mth-desktop-themes > a:nth-child(n + 3) {
		display: none;
	}
}

@media (max-width: 760px) {
	#sv-navigation.mth-navigation {
		--mth-nav-mobile-size: 13px;
	}

	#sv-navigation :is(.mth-desktop-themes, a.mth-desktop-themes-all) {
		display: none;
	}

	#sv-navigation.mth-navigation .mth-theme-menu {
		display: block;
	}

	body #sv-navigation.mof-navigation.mth-navigation :is(.mof-category-menu > summary, .mth-nav-themes, .mof-nav-sale, .mst-header-rating),
	body.meisteris-store-trust #sv-navigation.mof-navigation.mth-navigation .mof-category-menu > summary {
		display: inline-flex;
		align-items: center;
		min-height: 48px;
		padding-block: 0;
		font-size: var(--mth-nav-mobile-size);
		line-height: 1.4;
	}

	#sv-navigation.mth-navigation > .mst-header-rating strong {
		font-size: inherit;
		font-weight: 600;
	}

	#sv-navigation.mth-navigation > .mof-nav-sale {
		margin-inline-start: 0;
	}

	#sv-navigation .mth-nav-themes {
		gap: 6px;
	}

	#sv-navigation .mth-nav-themes::after {
		content: "";
		width: 6px;
		height: 6px;
		border: solid currentColor;
		border-width: 0 1px 1px 0;
		transform: translateY(-2px) rotate(45deg);
	}

	#sv-navigation .mth-theme-menu[open] .mth-nav-themes::after {
		transform: translateY(1px) rotate(225deg);
	}

	#sv-navigation .mth-theme-menu-panel {
		padding: 8px 12px;
		overscroll-behavior: contain;
	}

	#sv-navigation .mth-theme-menu-links {
		display: grid;
		gap: 1px;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	#sv-navigation .mth-theme-menu-links a {
		gap: 9px;
		padding-block: 4px;
		border-radius: 3px;
	}

	#sv-navigation .mth-theme-menu-links a > span {
		min-width: 0;
		overflow-wrap: break-word;
	}

	#sv-navigation .mth-theme-menu-links a:is(:hover, [aria-current="page"]) {
		background: #f5f7f7;
		color: var(--mof-orange);
	}

	#sv-navigation .mth-theme-menu-links .mth-menu-thumbnail {
		width: 40px;
		height: 40px;
	}

	#sv-navigation .mth-theme-menu-footer {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: center;
		column-gap: 12px;
		margin-block-start: 5px;
		padding-block-start: 4px;
		border-block-start: 1px solid var(--mof-line);
	}

	#sv-navigation .mth-theme-menu-footer .mof-nav-menu-offers {
		gap: 8px;
		font-weight: 600;
	}

	#sv-navigation .mth-theme-menu-footer .mth-theme-menu-all {
		border-block-start: 0;
	}
}

@media (max-width: 390px) {
	body #sv-navigation.mth-navigation.mof-navigation {
		--mth-nav-mobile-size: 12px;
		gap: 5px;
	}

	body #sv-navigation.mth-navigation.mof-navigation :is(.mof-category-menu > summary, .mof-nav-sale, .mth-nav-themes) {
		gap: 5px;
		padding-inline: 0;
	}
}

@media (max-width: 330px) {
	body.meisteris-store-trust:has([data-mst-header-rating]) #sv-navigation.mof-navigation.mth-navigation {
		gap: 3px;
	}

	body.meisteris-store-trust:has([data-mst-header-rating]) #sv-navigation.mof-navigation.mth-navigation .mof-category-menu > summary {
		gap: 4px;
	}
}
