@keyframes headerSlideDown {
	0% {
		transform: translateY(-100%);
	}
	100% {
		transform: translateY(0);
	}
}

.page-header {
	position: relative;
	z-index: 4;
}

.page-header-inner {
	border-bottom: 1px solid transparent;

	&.held {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
	}
}

.header-layout-fixed {
	.page-header-inner {
		position: absolute;
		top: 0;
		left: 0;
		z-index: 9999;
		width: 100%;
	}
}

.header-layout-fixed.headroom--top {
	.page-header-inner {
		pointer-events: none;
	}

	.branding *,
	.page-navigation,
	.header-left *,
	.header-center *,
	.header-right * {
		pointer-events: auto;
	}
}

.header-wrap {
	position: relative;

	.mobile-menu & {
		min-height: 80px;
	}
}

.tm-button.header-sticky-button {
	display: none;
}

.headroom--not-top {
	.header-button {
		display: none;
	}

	.header-sticky-button {
		display: block;
	}

	.custom-logo {
		display: none;
	}

	&.header-sticky-dark-logo {
		.dark-logo {
			display: block;
		}

		.light-logo {
			display: none;
		}
	}

	&.header-sticky-light-logo {
		.dark-logo {
			display: none;
		}

		.light-logo {
			display: block;
		}
	}
}

.header-sticky-both .headroom.headroom--not-top,
.header-sticky-up .headroom.headroom--not-top.headroom--pinned,
.header-sticky-down .headroom.headroom--not-top.headroom--unpinned {
	position: relative;
	z-index: 9999;

	.page-header-inner {
		position: fixed;
		top: 0;
		left: 0;
		z-index: 9999;
		width: 100%;
		box-shadow: 0 8px 20px 0 rgba(0, 0, 0, .1);
		animation: headerSlideDown 0.95s ease forwards;
		will-change: transform;

		.container,
		.container-fluid,
		.row {
			height: 100%;
		}

		.row {
			> div {
				align-self: center;
			}
		}
	}
}

.branding {
	line-height: 0;
}

.branding__logo {
	@extend %clearfix;

	a {
		display: inline-block;
		float: left;
	}
}

.dark-logo,
.light-logo {
	display: none;
}

.light-logo-version {
	.light-logo {
		display: block;
	}
}

.dark-logo-version {
	.dark-logo {
		display: block;
	}
}

.header-right {
	display: flex;
	margin: 0 -12px;
	align-items: center;
	justify-content: flex-end;
	flex-shrink: 0;

	> div {
		padding: 0 12px;
	}
}

.header-right-inner {
	@extend %transit;
	display: flex;
	margin: 0 -12px;
	align-items: center;
	justify-content: flex-end;
	flex-shrink: 0;

	> div {
		padding: 0 12px;
	}
}

.header-wishlist {
	font-size: 18px;
	line-height: 18px;
	@include transit;

	&:hover {
		transform: scale(1.15, 1.15);
	}
}

.header-search-form {
	.search-form {
		position: relative;
	}

	.search-field {
		padding-right: 50px;
		border-color: #f5f5f5;
	}

	.search-submit {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		right: 0;
		font-size: 18px;
		background: none;
		width: 48px;
		height: 48px;
		line-height: 50px;
		padding: 0;
		border: 0;
	}

	.search-btn-text {
		display: none;
	}
}

.popup-search-wrap {
	text-align: center;

	i {
		@extend %transit;
	}
}

.btn-open-popup-search {
	display: block;
	line-height: 0;
	font-size: 18px;
}

.btn-open-popup-search,
.mini-cart__button,
.header-right-more {
	@extend %transit;

	&:hover {
		transform: scale(1.15, 1.15);
	}
}

.header-right-more {
	display: none;
	height: 30px;
	font-size: 20px;
	cursor: pointer;
}

.header-social-networks {

	&.style-icons {
		.inner {
			margin-left: -10px;
			margin-right: -10px;
		}

		a {
			display: inline-block;
			padding: 0 10px;
			font-size: 18px;
		}
	}

	&.style-rounded {
		.inner {
			margin-left: -10px;
			margin-right: -10px;
		}

		a {
			width: 48px;
			height: 48px;
			line-height: 48px;
			text-align: center;
			font-size: 18px;
			color: #fff;
			border: 1px solid rgba(255, 255, 255, .4);
			border-radius: 50%;
			display: inline-block;
			margin-left: 8px;
			margin-right: 8px;
			padding: 0 10px;

			&:hover {
				border-color: transparent;
			}
		}
	}
}

.page-open-main-menu {
	display: none;
	height: 30px;
	align-items: center;

	.desktop-menu & {
		display: flex;
	}

	&:hover {
		i {
			&:before,
			&:after {
				width: 70%;
			}
		}
	}

	div {
		position: relative;
		width: 24px;
		height: 18px;
		cursor: pointer;
	}

	i {
		@extend %transit;
		position: absolute;
		top: 50%;
		left: 0;
		margin-top: -1px;
		width: 100%;
		height: 2px;
		background: currentColor;

		&:before,
		&:after {
			position: absolute;
			left: 50%;
			width: 100%;
			height: 100%;
			background: inherit;
			content: '';
			transition: width .3s cubic-bezier(.645, .045, .355, 1);
			transform: translate(-50%, 0);
		}

		&:before {
			top: -8px;
		}

		&:after {
			top: 8px;
		}
	}
}

.page-open-main-menu-title {
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.3px;
}

.header-buttons {
	line-height: 0;
}

.switcher-language-wrapper {
	.wpml-ls,
	.wpml-ls > ul,
	.wpml-ls > ul > li {
		height: 100%;
	}

	.wpml-ls > ul > li {
		display: flex;
		align-items: center;
		cursor: pointer;
	}

	.wpml-ls-legacy-dropdown {
		.wpml-ls-flag {
			width: 35px;
			height: auto;
			vertical-align: middle;
		}
	}

	.wpml-ls {
		width: auto;

		> ul {
			position: relative;
			padding: 0;
			margin: 0 !important;
			list-style-type: none;
		}

		.wpml-ls-slot-shortcode_actions {
			&:hover {
				.wpml-ls-sub-menu {
					visibility: visible !important;
					opacity: 1;
					transform: translateY(0);
				}
			}
		}

		.wpml-ls-item-toggle {
			position: relative;
			background: none !important;
			border: 0;
			line-height: 1;
			padding: 10px;

			span {
				font-size: 16px;
			}

			&:after {
				@extend %FontAwesomeSolid;
				content: '\f078';
				font-size: 8px;
				border: 0;
				position: absolute;
				top: 50%;
				right: 0;
				transform: translate(0, -50%);
			}
		}

		.wpml-ls-native {
			position: relative;
			top: 1px;
			vertical-align: middle;
			margin-right: 5px;
			text-transform: uppercase;
			font-weight: 600;
			font-size: 14px;
		}

		.wpml-ls-flag {
			+ span {
				margin-left: 15px;
			}
		}

		.wpml-ls-sub-menu {
			@extend %transit;
			min-width: 200px;
			border: 0;
			opacity: 0;
			visibility: hidden;
			position: absolute;
			top: 100%;
			right: 0;
			left: 0;
			padding: 0;
			margin: 0;
			list-style-type: none;
			z-index: 102;
			box-shadow: 0 0 37px rgba(0, 0, 0, .07);
			transform: translateY(20px);

			&.hover-back {
				right: 0;
				left: auto;
			}

			li {
				list-style-type: none;
				padding: 0;
				margin: 0;
			}

			a {
				display: block;
				text-decoration: none;
				padding: 10px;
				border: 0;
				background: #fff;
				color: #222;
				line-height: 1;
				text-transform: uppercase;

				&:hover {
					background: #eee;
					color: #222;
				}

				img {
					width: 24px;
					height: auto;
				}
			}
		}
	}
}

.header-right-clone {
	display: none;
}

.header-more-tools-opened {
	.header-button {
		display: none;
	}

	.header-sticky-button {
		display: block;
	}
}

@include media-breakpoint-down(sm) {
	.header-right-more {
		display: block;
	}

	.header-right-clone {
		display: block;
	}

	.header-right-inner {
		position: absolute;
		top: 100%;
		left: -3px;
		right: -3px;
		padding: 10px !important;
		box-shadow: 0 15px 40px rgba(0, 0, 0, .09);
		visibility: hidden;
		opacity: 0;
		transform: translateY(30px);
		flex-wrap: wrap;

		> div {
			padding: 10px;
		}
	}

	.header-more-tools-opened {
		.header-right-inner {
			visibility: visible;
			opacity: 1;
			transform: none;
		}
	}
}

.handheld.header-more-tools-opened {
	cursor: pointer;
}
