/**
 * Nagłówek — szkło (Elementor #27: #FFFFFFB0 + blur 5px).
 */

.dk-header {
	position: sticky;
	top: 0;
	z-index: 914;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	background-color: rgba(255, 255, 255, 0.69);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
}

.dk-header__inner {
	display: flex;
	min-height: 70px;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.dk-header__logo .custom-logo {
	width: auto;
	height: auto;
	max-width: 180px;
}

@media (max-width: 1023px) {
	.dk-header__logo .custom-logo {
		max-width: 150px;
	}
}

.dk-header__nav {
	display: none;
	align-items: center;
}

@media (min-width: 1024px) {
	.dk-header__nav {
		display: flex;
	}
}

.dk-header__menu {
	display: flex;
	align-items: center;
	gap: 2.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dk-header__menu > li {
	position: relative;
}

/* Mostek hover — mysz nie traci focusu między linkiem a submenu */
.dk-header__menu > li.group::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 10px;
	z-index: 51;
}

.dk-header__menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: #0a0a0a;
	text-decoration: none;
	transition: color 0.2s ease;
}

.dk-header__menu > li > a:hover,
.dk-header__menu > li.group:focus-within > a {
	color: #525252;
}

/* Otwarte submenu — rodzic bez „wyblaknięcia” */
.dk-header__menu > li.group:hover > a,
.dk-header__menu > li.group:focus-within > a {
	color: #0a0a0a;
}

.dk-header__menu > li.group:hover .dk-header-nav__chevron,
.dk-header__menu > li.group:focus-within .dk-header-nav__chevron {
	transform: rotate(225deg) translateY(-2px);
	transition: transform 0.2s ease;
}

.dk-header-nav__chevron {
	display: inline-block;
	width: 0.45rem;
	height: 0.45rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-1px);
	margin-top: 0.1rem;
	transition: transform 0.2s ease;
}

.dk-header__menu .sub-menu {
	position: absolute;
	left: 0;
	top: calc(100% + 10px);
	z-index: 52;
	display: none;
	min-width: 280px;
	max-width: min(360px, 90vw);
	flex-direction: column;
	gap: 0.125rem;
	margin: 0;
	padding: 0.375rem;
	list-style: none;
	border-radius: 0.75rem;
	border: 1px solid rgba(0, 0, 0, 0.08);
	background-color: #fff;
	box-shadow:
		0 4px 6px -2px rgba(0, 0, 0, 0.04),
		0 16px 40px -12px rgba(0, 0, 0, 0.14);
}

.dk-header__menu > li.group:hover .sub-menu,
.dk-header__menu > li.group:focus-within .sub-menu,
.dk-header__menu > li.group .sub-menu:hover {
	display: flex;
}

.dk-header__menu .sub-menu li {
	margin: 0;
}

.dk-header__menu .sub-menu a {
	display: block;
	padding: 0.625rem 0.75rem;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	color: #262626;
	text-decoration: none;
	border-radius: 0.5rem;
	transition:
		background-color 0.15s ease,
		color 0.15s ease;
}

.dk-header__menu .sub-menu a:hover,
.dk-header__menu .sub-menu a:focus-visible {
	background-color: #f5f5f5;
	color: #0a0a0a;
}

.dk-header__menu .sub-menu a:focus-visible {
	outline: 2px solid #0a0a0a;
	outline-offset: 1px;
}

.dk-header__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-left: auto;
}

@media (min-width: 1024px) {
	.dk-header__actions {
		margin-left: 0;
	}
}

.dk-header__icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: none;
	background: transparent;
	color: #0a0a0a;
	text-decoration: none;
	transition: color 0.2s ease;
}

.dk-header__icon-btn:hover {
	color: #525252;
}

.dk-header__icon-btn svg {
	width: 25px;
	height: 25px;
}

.dk-header-cart__count {
	position: absolute;
	top: 2px;
	right: 0;
	display: flex;
	min-width: 1.125rem;
	height: 1.125rem;
	align-items: center;
	justify-content: center;
	padding: 0 0.25rem;
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1;
	color: #fff;
	background-color: #0a0a0a;
	border-radius: 9999px;
}

.dk-header__toggle {
	display: flex;
	height: 2.5rem;
	width: 2.5rem;
	align-items: center;
	justify-content: center;
	border-radius: 0.5rem;
	border: 1px solid #eee;
	background: transparent;
	color: #0a0a0a;
}

@media (min-width: 1024px) {
	.dk-header__toggle {
		display: none;
	}
}

.dk-header__mobile {
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	background-color: rgba(255, 255, 255, 0.92);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
}

.dk-header__mobile .dk-header__menu {
	flex-direction: column;
	align-items: stretch;
	gap: 0.25rem;
}

/* Mobile — jeden styl tap/hover dla wszystkich poziomów menu */
.dk-header__mobile .dk-header__menu a {
	display: block;
	width: 100%;
	margin-inline: -0.75rem;
	padding: 0.625rem 0.75rem;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	color: #0a0a0a;
	text-decoration: none;
	border-radius: 0.5rem;
	-webkit-tap-highlight-color: transparent;
	transition:
		background-color 0.12s ease,
		color 0.12s ease;
}

.dk-header__mobile .dk-header__menu a:hover,
.dk-header__mobile .dk-header__menu a:focus-visible,
.dk-header__mobile .dk-header__menu a:active {
	background-color: rgba(0, 0, 0, 0.06);
	color: #525252;
}

.dk-header__mobile .dk-header__menu > li > a {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.dk-header__mobile .sub-menu {
	position: static;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.dk-header__mobile .sub-menu a {
	padding-left: 1.5rem;
}

.dk-header__mobile-actions {
	display: flex;
	gap: 1rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}
