/**
 * T-Rent mobile front-page alignment.
 *
 * The body/page selectors deliberately keep these adjustments away from
 * product, cart, checkout and account pages.
 */
@media screen and (max-width: 767px) {
	body.home.page-id-51 {
		--trent-mobile-logo-size: 245px;
		--trent-mobile-logo-top-space: 16px;
		--trent-mobile-content-top-space: 28px;
	}

	/* Lower the branding slightly without moving the language/menu controls. */
	body.home.page-id-51 #masthead .site-branding {
		box-sizing: border-box;
		padding-top: var(--trent-mobile-logo-top-space) !important;
	}

	body.home.page-id-51 #masthead .custom-logo-link {
		display: block;
		line-height: 0;
		text-align: center;
	}

	/* The theme currently outputs 273px; this makes it modestly smaller. */
	body.home.page-id-51 #masthead .custom-logo-link img.custom-logo {
		display: block;
		width: var(--trent-mobile-logo-size) !important;
		max-width: 68vw !important;
		height: auto !important;
		margin: 0 auto !important;
	}

	/*
	 * The theme stacks these two header columns below the branding on mobile.
	 * Their visible controls are already positioned independently, so the
	 * columns otherwise create 94px of empty space above “Kategorier”.
	 */
	body.home.page-id-51 #masthead .nav-menu-header-center,
	body.home.page-id-51 #masthead .nav-menu-header-center .main-navigation {
		height: 0 !important;
		min-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: visible !important;
	}

	body.home.page-id-51 #masthead .nav-menu-header-right {
		display: none !important;
	}

	/* Add back a deliberate, compact gap before “Kategorier”. */
	body.home.page-id-51 .site-wrapper {
		margin-top: var(--trent-mobile-content-top-space) !important;
	}

	body.home.page-id-51 .site-wrapper > main#primary.lay-width {
		margin-top: 0 !important;
	}
}
