/* Header */
header {
	opacity: 1;
	width: 100%;
	position: relative;
	top: 0;
	left: 0;
	z-index: 100;
	transition: opacity .5s;
}

header.fade {
	opacity: 0;
	pointer-events: none;
}

header.light {
	--bgr-c: #fff;
	--text-c: #303030;
	--text-h-c: var(--primary);
}

header.dark {
	--bgr-c: var(--c-bgr);
	--text-c: var(--title-color);
	--text-h-c: var(--primary);
}

header.floating {
	position: absolute;
}

header.sticky #h-content,
header.open #h-content {
	position: fixed;
}

#h-content {
	width: 100%;
	padding: 3rem 3rem;
	position: relative;
	top: 0;
	left: 0;
}

#h-bars {
	display: grid;
	width: 100%;
	grid-template-columns: 0 auto 0;
	align-items: center;
}

.h-bar {
	display: grid;
	position: relative;
}

.h-bar:nth-child(1) {
	grid-template-columns: max-content;
	justify-content: left;
}

.h-bar:nth-child(2) {
	grid-template-columns: 1fr max-content 1fr;
	justify-content: center;
	align-items: center;
	gap: min(7rem, 6vw);
}

.h-bar:nth-child(3) {
	height: 100%;
	grid-auto-flow: column;
	align-items: center;
	justify-content: right;
	gap: 2rem;
}

/* Backgrounds */
#h-content > .background,
#h-mob-menu .background {
	transition: opacity .4s, background .4s;
}

header.light #h-content > .background {background-color: var(--bgr-c);}
header.light #h-mob-menu .background {background-color: var(--bgr-c);}
header.dark #h-content > .background {background-color: var(--bgr-c);}
header.dark #h-mob-menu .background {background-color: var(--bgr-c);}
header.floating:not(.open) #h-content > .background {background-color: transparent;}

header.floating #h-content > .background {opacity: 0;}
header.open #h-content > .background {opacity: 1;}

/* Drop down menus */
header .hanging-menu {
	position: absolute;
	top: 100%;
}

/* Logo */
.h-logo {
	display: block;
	height: 4rem;
	aspect-ratio: .35;
	justify-self: right;
}

.h-logo.desk1024 {
	width: 9.3rem;	
}

.h-logo svg {
	fill: var(--text-c);
}

/* TO FIX - Name and searchbar */
.h-name {
	font-size: 1.4rem;
	letter-spacing: .1em;
	transition: color .4s;
	text-transform: uppercase;
}

.h-name .caps {font-size: 1.15em;}

#h-srch {
	margin-left: -1rem;
	font-size: 0;
	white-space: nowrap;
	overflow: hidden;
}

#h-srch .h-name-box {
	max-width: 100%;
	overflow: hidden;
	transition: max-width .1s .3s;
}

#h-srch-ico-box {
	display: inline-block;
	border-width: 1px;
	border-style: solid;
	border-color: #ddd;
	width: 50px;
	height: 50px;
	transition: border .2s;
	cursor: pointer;
}

#h-srch-ico {
	background-size: 20px;
	background-position: center;
	width: 100%;
	height: 100%;
}

#h-srch-ico-box .bgr {
	opacity: 0;
	width: calc(100% + 2px);
	height: calc(100% + 2px);
	top: -1px;
	left: -1px;
	transition: opacity .4s;
}

#h-srch-inp-box {
	display: inline-block;
	width: 0;
	overflow: hidden;
	transition: width .4s;
	vertical-align: middle;
}

#h-srch-inp {
	background-color: #F2F3F5;
	border: 1px solid #E6E7EB;
	border-width: 1px 1px 1px 0;
	width: 100%;
	height: 50px;
	padding: 0 15px;
	font-family: var(--font-text);
}

#h-srch-cbx:not(:checked) ~ #h-srch-ico-box {border-color: transparent !important;}
#h-srch-cbx:checked ~ #h-srch-ico-box .bgr {opacity: 1;}
#h-srch-cbx:checked ~ #h-srch-inp-box {width: 300px;}
#h-srch-cbx:checked ~ .h-name-box {max-width: 0; transition: max-width .1s;}

/* Desktop menu: links */
#h-links {
	display: flex;
	gap: 3rem;
}

#h-links .link {
	transition: background-color .3s;
}

#h-links .title {
	vertical-align: middle;
	color: var(--text-c);
	font-size: 1rem;
	letter-spacing: .4em;
	line-height: initial;
	transition: color .3s, border .3s;
}

#h-links .title:hover,
#h-links .title.active {
	color: var(--text-h-c);
}

#h-links .ddown-icon {
	font-size: .8em;
	vertical-align: top;
}

/* Language bar */
.h-languages {
	position: relative;
	display: grid;
	height: 100%;
	align-items: center;
}

.h-language-icon {
	border-radius: 50%;
	width: 1.4rem;
	height: auto;
	aspect-ratio: 1;
	cursor: pointer;
}

.h-language-icon_active {
	width: 1.5rem;
}

.h-languages-ddown {
	position: absolute;
	top: 100%;
	right: 0;
	transform: translateY(2rem);
	overflow: hidden;
	visibility: hidden;
	opacity: 0;
	background-color: var(--bgr-c);
	border-radius: .5rem;
	box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .1);
	transition: opacity .4s, transform .4s;
}

.h-languages-ddown.open {
	transform: none;
	visibility: visible;
	opacity: 1;
}

.h-language {
	display: grid;
	min-width: 150px;
	padding-inline: 1rem;
	grid-template-columns: 2.5rem auto;
	align-items: center;
	cursor: pointer;
	transition: background-color .3s;
}

.h-language:hover,
.h-language.active {
	background-color: var(--primary);
}

.h-language-name {
	letter-spacing: .02em;
	line-height: 3.5;
	transition: color .3s;
}

.h-language:hover .h-language-name,
.h-language.active .h-language-name {
	color: #fff;
}

/* TO FIX - Desktop menu: dropdown */
.h-drop {
	background-color: var(--primary);
	width: 230px;
	max-height: 0;
	position: absolute;
	top: 100%;
	left: calc(50% - 115px);
	overflow: hidden;
	transition: max-height .2s ease-out;
	z-index: 1;
}

.h-link:hover .h-drop, #nav_prof:hover .h-drop {max-height: 300px; transition: max-height .4s ease-in;}

.h-drop-link {
	display: block;
	line-height: 1.5;
	text-align: left;
	transition: background .2s, color .2s;
}

.h-drop-link a {display: block; padding: 1em 1em;}

/* Contacts */
.h-contacts {
	display: flex;
	justify-content: left;
	gap: 1.5rem;
}

.h-contacts_mob {
	justify-content: center;
	gap: 2.5rem;
}

.h-contacts svg {
	fill: var(--text-c);
}

.h-contacts .contact {
	width: 1.2rem;
	aspect-ratio: 1 / 1;
}

.h-contacts_mob .contact {
	opacity: 0;
	transform: translateY(.5rem);
	transition: opacity .2s, transform .2s;
}

.open .h-contacts .contact {
	opacity: 1;
	transform: none;
	transition: opacity .5s .5s, transform .5s .5s;
}

.h-contacts .contact:hover svg {
	fill: var(--text-h-c);
}

/* TO FIX - Wishlist & Cart */
#h-cart {
	background-position: center;
	background-size: contain;
	width: 20px;
	height: 20px;
	padding: 0;
	margin: 0 1rem;
}

#h-cart-num {
	background: #E00003;
	border-radius: 100%;
	width: 14px;
	position: absolute;
	bottom: .9rem;
	left: .9rem;
	color: #FFF;
	font-size: .8rem;
	line-height: 14px;
	text-align: center;
}

#h-wish {
	background-position: center;
	background-size: contain;
	width: 20px;
	height: 20px;
	padding: 0;
	margin: 0 1rem;
}

/* TO FIX - Login & profile */
#h-user-ico {
	display: block;
	background-color: #DDD;
	background-position: center;
	background-size: cover;
	border: 2px solid #8b8b8b;
	width: 40px;
	height: 40px;
	transition: border .1s;
}

.h-log-txt {
	margin-left: 2rem;
	display: inline-block;
	transition: color .4s, background .4s, border .4s;
}

.h-log-txt.main {
	padding: 0 1.7rem;
	border-width: 1px;
	border-style: solid;
	letter-spacing: .2em;
	line-height: calc(3rem - 2px);
}

/* Mobile: icon */
#h-mob-icon {
	--icon-height: 2rem;
	display: grid;
	width: 1.7rem;
	height: var(--icon-height);
	align-items: center;
	cursor: pointer;
}

#h-mob-icon .line-box:nth-child(1),
#h-mob-icon .line-box:nth-child(3) {
	transition: transform .2s .2s;
}

#h-mob-icon .line-box:nth-child(2) {
	display: none;
	transition: opacity .1s .2s, transform .2s .2s;
}

#h-mob-icon .line-box:nth-child(3) {
	transform: scale(.6, 1);
	transform-origin: right;
}

#h-mob-icon .line {
	background-color: var(--text-c);
	height: 2px;
	transition: transform .2s;
}

input:checked + #h-mob-icon .line-box:nth-child(1) {
	transform: translateY(calc(var(--icon-height) / 4));
	transition: transform .2s;
}

input:checked + #h-mob-icon .line-box:nth-child(3) {
	transform: translateY(calc(var(--icon-height) / -4));
	transition: transform .2s;
}

input:checked + #h-mob-icon .line-box:nth-child(2) {
	opacity: 0;
	transform: translateX(-4rem);
	transition: opacity .1s .1s, transform .2s;
}

input:checked + #h-mob-icon .line-box:nth-child(1) .line {
	transform: rotate(45deg);
	transition: transform .2s .2s;
}

input:checked + #h-mob-icon .line-box:nth-child(3) .line {
	transform: rotate(-45deg);
	transition: transform .2s .2s;
}

/* Mobile: menu */
#h-mob-menu {
	width: 100vw;
	overflow-x: hidden;
	overflow-y: auto;
	left: 0;
	transform: translateX(-100%);
	z-index: 1;
	transition: transform .4s;
}

header.open #h-mob-menu {
	transform: none;
}

#h-mob-links {
	display: grid;
	height: 100%;
	position: relative;
	text-align: center;
}

#h-mob-links .link {
	opacity: 0;
	padding-top: 5vh;
	transform: translateY(1rem);
	transition: opacity .1s, transform .1s .4s;
}

header.open #h-mob-links .link {
	opacity: 1;
	transform: none;
	transition: opacity .6s .3s, transform .6s .3s;
}

#h-mob-links .link .title {
	display: inline-block;
	color: var(--text-c);
	font-size: 1.5rem;
	letter-spacing: .1em;
	cursor: pointer;
	transition: opacity .5s, color .5s;
}

#h-mob-links .link.focus {
	color: #000;
}

#h-mob-links .link.blur {
	opacity: .3;
}

/*TO FIX - Cookies*/
#h-cook {
	background-color: #161616;
	width: 100%;
	padding: 10px 1rem;
	position: fixed;
	bottom: 0;
	left: 0;
	z-index: 10;
	text-align: center;
}

#h-cook-txt {
	display: inline-block;
	color: #DDD;
	
	vertical-align: middle;
}

#h-cook-btn {
	background-color: transparent;
	border: 1px solid #DDD;
	padding: 3px .6rem;
	margin: 10px 10px;
	color: #DDD;
	font-size: 11px;
	vertical-align: middle;
	cursor: pointer;
}

/* Responsive */
@media (max-width: 1440px) {

	#h-pan {
		padding-left: 3rem;
		padding-right: 3rem;
	}

}

@media (max-width: 1024px) {

	#h-bars {
		display: grid;
		grid-template-columns: initial;
		grid-auto-flow: column;
	}

	#h-logo {
		height: 2.3rem;
	}

	.h-languages-ddown {
		right: auto;
		left: 50%;
		transform: translate(-50%, 2rem);
	}

	.h-languages:hover .h-languages-ddown {
		transform: translate(-50%, 0);
	}

}

@media (max-width: 480px) {
	
	#h-content {
		padding: 1rem 2rem;
	}

	header .name-box .name {
		font-size: 1.2rem;
	}

	#h-mob-links .link .title {
		font-size: 1.2rem
	}

}