/*------------------------ NEW HEADER ----------------------------------*/

/* ---------- osnova ---------- */

.h-nav {
	position: relative;
	z-index: 100;
	display: flex;
	height: 5vw;
	padding: 0 8vw;
	background-color: #FFFFFF;
}

/* ---------- skrito besedilo za bralnike zaslona ---------- */

.h-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------- skip link ---------- */

.h-skip {
	position: absolute;
	top: 0;
	left: 8vw;
	z-index: 2;
	padding: 1vw 2vw;
	background-color: #235D39;
	color: #FFFFFF;
	text-transform: uppercase;
	transform: translateY(-120%);
}

.h-skip:focus {
	transform: none;
}

/* ---------- elementi samo za mobilno ---------- */

.h-nav-burger,
.h-nav-left .h-nav-login-mobile {
	display: none;
}

/* ---------- trije stolpci ---------- */

.h-nav-left,
.h-nav-right {
	width: 40%;
}

.h-nav-center {
	width: 20%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.h-nav-list {
	display: flex;
	height: 100%;
	gap: 1vw;
}

.h-nav-right .h-nav-list {
	justify-content: flex-end;
	gap: 1.5vw;
}

.h-nav-item {
	position: relative;
	display: flex;
	align-items: center;
}

.h-nav-item > a {
	text-transform: uppercase;
}

/* ---------- logotip ---------- */

.h-nav-home img {
	max-height: 3.5vw;
	object-fit: contain;
}

/* ---------- gumbi Products / Learn ---------- */

.h-nav-toggle,
.h-nav-toggle:hover {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 0;
	border: 0;
	background: none;
	font-family: "hempika-bold";
	font-size: 1vw;
	line-height: 1;
	color: #235D39;
	text-transform: uppercase;
	cursor: pointer;
}

.h-nav-arrow {
	display: block;
	width: 0.7vw;
	height: 0.4vw;
	flex-shrink: 0;
	transition: transform .2s ease;
}

.h-nav-toggle[aria-expanded="true"] .h-nav-arrow {
	transform: rotate(180deg);
}

/* ---------- dropdowni ---------- */

.h-nav-dropdown {
	display: none;
	flex-direction: column;
	gap: 0.8vw;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1;
	min-width: 14vw;
	padding: 2vw;
	background-color: #235D39;
}

.h-nav-toggle[aria-expanded="true"] + .h-nav-dropdown {
	display: flex;
}

.h-nav-dropdown a {
	display: block;
	color: #FFFFFF;
	white-space: nowrap;
	text-transform: uppercase;
	transition: opacity .2s ease;
}

.h-nav-dropdown a:hover {
	opacity: .7;
}

/* hover samo na desktopu (na telefonu bi se meni "zataknil" odprt) */
@media only screen and (min-width: 769px) {

	.h-nav-item:hover > .h-nav-dropdown {
		display: flex;
	}

	.h-nav-item:hover .h-nav-arrow {
		transform: rotate(180deg);
	}

}

/* ---------- košarica ---------- */

.h-nav-cart {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5vw;
	height: 2.5vw;
}

.h-nav-cart::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url("https://hempika.com/wp-content/themes/hemp-master/assets/img/cart.svg") center / contain no-repeat;
	transform: translateY(-0.3vw);
}

.h-nav-cart-count {
	position: relative;
	line-height: 1;
}

/* ---------- fokus s tipkovnico ---------- */

.h-nav a:focus-visible,
.h-nav-toggle:focus-visible,
.h-nav-burger:focus-visible {
	outline: 0.15vw solid #235D39;
	outline-offset: 0.3vw;
}

.h-nav-dropdown a:focus-visible,
.h-skip:focus-visible {
	outline-color: #FFFFFF;
}

/*------------------------ NEW HEADER: MOBILE ----------------------------------*/

@media only screen and (max-width: 768px) {

	/* ---------- osnova: hamburger | logo | košarica ---------- */

	.h-nav {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
		height: 16vw;
		padding: 0 4vw;
	}

	.h-skip {
		left: 4vw;
		padding: 3vw 5vw;
	}

	/* ---------- hamburger ---------- */

	.h-nav-burger,
	.h-nav-burger:hover {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 1.6vw;
		width: 12vw;
		height: 12vw;
		margin-left: -3vw;
		padding: 0 3vw;
		border: 0;
		background: none;
		cursor: pointer;
	}

	.h-nav-burger-line {
		display: block;
		width: 6vw;
		height: 0.6vw;
		background-color: #235D39;
		transition: transform .25s ease, opacity .2s ease;
	}

	/* hamburger → X */
	.h-nav-burger[aria-expanded="true"] .h-nav-burger-line:nth-child(1) {
		transform: translateY(2.2vw) rotate(45deg);
	}

	.h-nav-burger[aria-expanded="true"] .h-nav-burger-line:nth-child(2) {
		opacity: 0;
	}

	.h-nav-burger[aria-expanded="true"] .h-nav-burger-line:nth-child(3) {
		transform: translateY(-2.2vw) rotate(-45deg);
	}

	/* ---------- logotip in košarica ---------- */

	.h-nav-center {
		width: auto;
	}

	.h-nav-home img {
		width: 32vw;
		max-height: none;
	}

	.h-nav-right {
		width: auto;
		justify-self: end;
	}

	.h-nav-login {
		display: none;
	}

	.h-nav-cart {
		width: 9vw;
		height: 9vw;
	}

	.h-nav-cart::before {
		transform: translateY(-1.2vw);
	}

	.h-nav-cart-count {
		font-size: 3.5vw;
	}

	/* ---------- mobilni meni ---------- */

	.h-nav-left {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		width: auto;
		max-height: calc(100vh - 16vw);
		overflow-y: auto;
		padding: 0 6vw 8vw 6vw;
		background-color: #FFFFFF;
		border-top: 1px solid #EEEEEE;
		box-shadow: 0 4vw 8vw rgba(0, 0, 0, .08);
	}

	.h-nav-burger[aria-expanded="true"] ~ .h-nav-left {
		display: block;
	}

	.h-nav-left .h-nav-list {
		flex-direction: column;
		height: auto;
		gap: 0;
	}

	.h-nav-left .h-nav-item {
		display: block;
		border-bottom: 1px solid #EEEEEE;
	}

	.h-nav-left .h-nav-item > a,
	.h-nav-toggle,
	.h-nav-toggle:hover {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		padding: 5vw 0;
		font-size: 5vw;
	}

	.h-nav-arrow {
		width: 3vw;
		height: 1.8vw;
	}

	/* podmeniji kot harmonika */
	.h-nav-dropdown {
		position: static;
		min-width: 0;
		gap: 4vw;
		padding: 0 0 5vw 4vw;
		background: none;
	}

	.h-nav-dropdown a {
		font-family: "hempika-light";
		font-size: 4.5vw;
		color: #000000;
		white-space: normal;
	}

	/* login: bolj diskretno */
	.h-nav-left .h-nav-login-mobile {
		display: block;
		margin-top: 6vw;
		border-bottom: 0;
	}

	.h-nav-left .h-nav-login-mobile > a {
		display: inline-block;
		padding: 0;
		font-family: "hempika-light";
		font-size: 4vw;
		color: #000000;
		text-transform: none;
		text-decoration: underline;
		text-underline-offset: 1vw;
	}

	/* ---------- fokus s tipkovnico ---------- */

	.h-nav a:focus-visible,
	.h-nav-toggle:focus-visible,
	.h-nav-burger:focus-visible {
		outline-width: 0.6vw;
		outline-offset: 1vw;
	}

	.h-nav-dropdown a:focus-visible {
		outline-color: #235D39;
	}

}