/**
 * Nagłówek — port z 01_kod_statyczny SiteHeader.astro
 */

.dehoust-site-header {
	position: relative;
	z-index: 40;
	background: var(--dehoust-color-bg);
}

.dehoust-site-header button {
	font-family: var(--dehoust-font-body);
}

.dehoust-site-header a:hover,
.dehoust-site-header a:focus-visible {
	opacity: 1;
}

.dehoust-header-desktop {
	display: none;
}

.dehoust-header-mobile {
	display: block;
}

@media (min-width: 1280px) {
	.dehoust-header-desktop {
		display: block;
	}

	.dehoust-header-mobile {
		display: none;
	}
}

/* Topbar */
.dehoust-header-topbar {
	height: 5rem;
	background: var(--dehoust-color-dark, #1a1d1f);
	color: #fff;
}

.dehoust-header-topbar__inner {
	display: flex;
	height: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.dehoust-header-topbar__contacts {
	display: flex;
	min-width: 0;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.5rem;
	font-size: 1rem;
	line-height: 1;
}

.dehoust-header-topbar__contact {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.dehoust-header-topbar__city {
	font-weight: 600;
}

.dehoust-header-topbar__icon {
	flex-shrink: 0;
	width: 1rem;
	height: 1rem;
	object-fit: contain;
}

.dehoust-header-topbar__icon--email {
	width: 1.25rem;
	height: 0.875rem;
}

.dehoust-header-topbar__link {
	color: #fff;
	text-decoration: none;
}

.dehoust-header-topbar__link:hover {
	text-decoration: underline;
}

.dehoust-header-topbar__divider {
	display: none;
	width: 1px;
	height: 2.125rem;
	background: rgb(255 255 255 / 0.85);
}

@media (min-width: 640px) {
	.dehoust-header-topbar__divider {
		display: block;
	}
}

.dehoust-header-topbar__lang {
	position: relative;
	flex-shrink: 0;
}

.dehoust-header-topbar__lang-toggle {
	display: flex;
	cursor: pointer;
	align-items: center;
	gap: 0.5rem;
	border: 0;
	background: transparent;
	padding: 0;
	color: #fff;
	font-size: 1rem;
}

.dehoust-header-topbar__flag {
	height: 1.25rem;
	width: 1.75rem;
	border-radius: 2px;
	object-fit: cover;
}

.dehoust-header-topbar__chevron {
	height: 0.25rem;
	width: 0.5rem;
}

.dehoust-header-topbar__lang-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	z-index: 50;
	min-width: 10rem;
	margin: 0;
	padding: 0.5rem;
	list-style: none;
	border: 1px solid rgb(255 255 255 / 0.15);
	border-radius: 8px;
	background: var(--dehoust-color-dark, #1a1d1f);
	box-shadow: 0 10px 15px rgb(0 0 0 / 0.15);
}

.dehoust-header-topbar__lang-item {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.625rem 1rem;
	border-radius: 2px;
	color: #fff;
	text-decoration: none;
	font-size: 0.9375rem;
}

.dehoust-header-topbar__lang-item:hover,
.dehoust-header-topbar__lang-item.is-active {
	background: rgb(255 255 255 / 0.1);
}

/* Main row — jak Astro: Container > flex inner */
.dehoust-header-main__wrap {
	padding-top: 2.5625rem; /* 41px */
}

.dehoust-header-main__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	height: 3.25rem; /* 52px */
}

.dehoust-header-main__logo {
	display: block;
	height: 2rem; /* h-8 */
	width: 20rem; /* w-80 */
	max-width: 40%;
	flex-shrink: 0;
}

.dehoust-header-main__logo img {
	display: block;
	height: 100%;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	object-position: left center;
}

.dehoust-header-search {
	display: flex;
	height: 3.25rem;
	width: 100%;
	max-width: 34.6875rem;
	flex-shrink: 1;
}

.dehoust-header-search__input {
	min-width: 0;
	flex: 1;
	height: 100%;
	padding: 0 1rem;
	border: 1px solid var(--dehoust-color-primary);
	border-right: 0;
	border-radius: 8px 0 0 8px;
	background: #fff;
	font-size: 0.875rem;
	color: var(--dehoust-color-text);
}

.dehoust-header-search__input:focus {
	outline: none;
}

.dehoust-header-search__submit {
	display: flex;
	width: 4.25rem;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 0 8px 8px 0;
	background: var(--dehoust-color-primary-dark);
	cursor: pointer;
	transition: background-color var(--dehoust-transition);
}

.dehoust-header-search__submit:hover,
.dehoust-header-search__submit:focus-visible {
	background: var(--dehoust-color-primary-hover);
}

.dehoust-header-main__actions {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 1.5rem;
}

.dehoust-header-action {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--dehoust-color-text);
	text-decoration: none;
}

.dehoust-header-action:hover {
	color: var(--dehoust-color-primary);
	opacity: 1;
}

.dehoust-header-action__text {
	display: flex;
	flex-direction: column;
	font-size: 0.875rem;
	line-height: 0.5625rem; /* 9px — Astro */
}

.dehoust-header-action__label {
	margin-bottom: 0.75rem; /* mb-3 */
	font-weight: 600;
}

/* Linki wewnątrz bloku konta (ikona + „Twoje konto" → panel, akcja → logowanie/wylogowanie) */
.dehoust-header-action__account-icon,
.dehoust-header-action__action-link,
a.dehoust-header-action__label {
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.dehoust-header-action__account-icon:hover,
.dehoust-header-action__action-link:hover,
a.dehoust-header-action__label:hover {
	color: var(--dehoust-color-primary);
}

.dehoust-header-action__cart-icon {
	position: relative;
	display: block;
	flex-shrink: 0;
}

.dehoust-header-action__badge {
	position: absolute;
	left: 1.3125rem;
	top: 0;
	display: flex;
	width: 0.875rem;
	height: 0.875rem;
	align-items: center;
	justify-content: center;
	border: 1px solid #fff;
	border-radius: 999px;
	background: var(--dehoust-color-primary-dark);
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1;
	color: #fff;
}

.dehoust-header-main__separator-wrap {
	padding-top: 1rem;
}

.dehoust-header-main__separator {
	margin: 0;
	height: 1px;
	border: 0;
	background: var(--dehoust-color-line);
}

/* Sticky nav */
[data-header-sticky-bar] {
	border-bottom: 1px solid transparent;
	transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

[data-header-sticky-bar].is-stuck {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 50;
	border-color: var(--dehoust-color-line);
	background: #fff;
	box-shadow: 0 4px 12px rgb(26 26 26 / 0.08);
	transition: top 0.26s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

[data-header-sticky-placeholder] {
	pointer-events: none;
}

.dehoust-header-sticky__container {
	position: relative;
}

[data-header-sticky-inner] {
	display: flex;
	align-items: center;
	gap: 3rem;
	padding-block: 1.5rem;
	padding-left: 0;
	transition: padding-left 0.3s ease, padding-block 0.3s ease;
}

[data-header-sticky-bar].is-stuck.is-compact [data-header-sticky-inner] {
	padding-block: 0.75rem;
	padding-left: 12.5rem;
}

.dehoust-header-nav {
	display: flex;
	min-width: 0;
	flex: 1;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.dehoust-header-nav__link,
.dehoust-header-nav__dropdown-toggle {
	flex-shrink: 0;
	border: 0;
	background: transparent;
	font-family: var(--dehoust-font-body);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.125rem;
	color: var(--dehoust-color-text);
	text-decoration: none;
	cursor: pointer;
}

.dehoust-header-nav__link:hover,
.dehoust-header-nav__dropdown-toggle:hover {
	color: var(--dehoust-color-primary);
}

.dehoust-header-nav__dropdown {
	position: relative;
	flex-shrink: 0;
}

.dehoust-header-nav__dropdown-toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.dehoust-header-nav__dropdown-menu {
	position: absolute;
	left: 0;
	top: calc(100% + 12px);
	z-index: 50;
	width: 26.25rem;
	max-height: 26.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-y: auto;
	border: 1px solid var(--dehoust-color-line);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 20px 25px rgb(0 0 0 / 0.1);
}

.dehoust-header-nav__dropdown-link {
	display: block;
	padding: 0.625rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--dehoust-color-text);
	text-decoration: none;
}

.dehoust-header-nav__dropdown-link--all {
	border-bottom: 1px solid var(--dehoust-color-line);
	padding-bottom: 0.75rem;
}

.dehoust-header-nav__dropdown-link:hover {
	background: var(--dehoust-color-surface);
	color: var(--dehoust-color-primary);
}

[data-sticky-logo] {
	position: absolute;
	left: var(--dehoust-gutter-xl);
	top: 50%;
	z-index: 1;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-50%) translateX(-10px);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
	text-decoration: none;
}

[data-header-sticky-bar].is-stuck.is-compact [data-sticky-logo] {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(-50%) translateX(0);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s;
}

[data-sticky-logo] img {
	display: block;
	height: 1.75rem;
	width: auto;
	max-width: 11rem;
	object-fit: contain;
	object-position: left center;
}

.dehoust-header-sticky__cta {
	display: inline-flex;
	height: 3.125rem;
	width: 14rem;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border-radius: 8px;
	background: var(--dehoust-color-accent);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.125rem;
	color: #fff;
	text-decoration: none;
	transition: height 0.3s ease, width 0.3s ease, filter 0.3s ease;
}

.dehoust-header-sticky__cta:hover {
	filter: brightness(0.95);
}

[data-header-sticky-bar].is-stuck.is-compact [data-sticky-cta] {
	height: 2.5rem;
	width: 12.5rem;
}

/* Mobile */
[data-header-mobile-bar] {
	display: flex;
	flex-direction: column;
}

[data-header-mobile-bar].is-stuck .dehoust-header-mobile__panel:not([hidden]) {
	max-height: calc(100dvh - 4.5rem);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.dehoust-header-mobile__bar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem;
	transition: padding 0.35s ease;
}

.dehoust-header-mobile__logo-img {
	height: 2.25rem;
	width: auto;
	max-width: 200px;
	object-fit: contain;
	transition: height 0.3s ease, max-width 0.3s ease;
}

.dehoust-header-mobile__icons {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 0.5rem;
}

.dehoust-header-mobile__cart,
.dehoust-header-mobile__toggle {
	position: relative;
	display: flex;
	width: 2.75rem;
	height: 2.75rem;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--dehoust-color-line);
	border-radius: 8px;
	background: #fff;
	text-decoration: none;
	cursor: pointer;
}

.dehoust-header-mobile__badge {
	position: absolute;
	right: 0.375rem;
	top: 0.375rem;
	display: flex;
	width: 0.875rem;
	height: 0.875rem;
	align-items: center;
	justify-content: center;
	border: 1px solid #fff;
	border-radius: 999px;
	background: var(--dehoust-color-primary-dark);
	font-size: 0.625rem;
	font-weight: 700;
	color: #fff;
}

.dehoust-header-mobile__toggle-bars {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
}

.dehoust-header-mobile__toggle-bars span {
	display: block;
	width: 1.25rem;
	height: 0.125rem;
	flex-shrink: 0;
	background: var(--dehoust-color-text-muted);
}

.dehoust-header-mobile__toggle-close {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--dehoust-color-text-muted);
}

.dehoust-header-mobile__toggle-close svg {
	display: block;
}

/* Przyciski WP/Woo — reset + Figtree jak w Astro (Tailwind font-bold / font-semibold). */
.dehoust-header-mobile button {
	font-family: var(--dehoust-font-body);
	font-size: 1rem;
	line-height: 1.5;
	-webkit-appearance: none;
	appearance: none;
}

.dehoust-header-mobile__panel {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--dehoust-color-line);
	background: #fff;
}

.dehoust-header-mobile__search {
	display: flex;
	padding: 1rem 1rem 0.5rem;
}

.dehoust-header-mobile__search-input {
	min-height: 2.75rem;
	min-width: 0;
	flex: 1;
	padding: 0 1rem;
	border: 1px solid var(--dehoust-color-primary);
	border-right: 0;
	border-radius: 8px 0 0 8px;
	font-size: 0.875rem;
}

.dehoust-header-mobile__search-submit {
	display: flex;
	min-height: 2.75rem;
	width: 3.5rem;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 0 8px 8px 0;
	background: var(--dehoust-color-primary-dark);
	cursor: pointer;
	transition: background-color var(--dehoust-transition);
}

.dehoust-header-mobile__search-submit:hover,
.dehoust-header-mobile__search-submit:focus-visible {
	background: var(--dehoust-color-primary-hover);
}

.dehoust-header-mobile__list {
	margin: 0;
	padding: 0.5rem 1rem 0;
	list-style: none;
}

.dehoust-header-mobile__link,
.dehoust-header-mobile__accordion-toggle {
	display: flex;
	min-height: 2.75rem;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	padding: 0 0.75rem;
	border: 0;
	border-radius: 8px;
	background: transparent;
	font-family: var(--dehoust-font-body);
	font-size: 1rem;
	font-weight: 600;
	color: var(--dehoust-color-text);
	text-decoration: none;
	cursor: pointer;
}

.dehoust-header-mobile__accordion-toggle {
	font-weight: 700;
	text-align: left;
}

.dehoust-header-mobile__link:hover,
.dehoust-header-mobile__accordion-toggle:hover {
	background: var(--dehoust-color-surface);
}

.dehoust-header-mobile__accordion-chevron {
	width: 0.5rem;
	height: 0.25rem;
	flex-shrink: 0;
	object-fit: contain;
	transition: transform 0.2s ease;
}

.dehoust-header-mobile__accordion-chevron.rotate-180,
[data-mobile-accordion-toggle][aria-expanded='true'] .dehoust-header-mobile__accordion-chevron {
	transform: rotate(180deg);
}

.dehoust-header-mobile__submenu {
	margin: 0;
	padding: 0 0 0.25rem 0.75rem;
	list-style: none;
}

.dehoust-header-mobile__sublink {
	display: flex;
	min-height: 2.5rem;
	align-items: center;
	padding: 0 0.75rem;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--dehoust-color-text);
	text-decoration: none;
}

.dehoust-header-mobile__sublink:hover {
	background: var(--dehoust-color-surface);
}

.dehoust-header-mobile__sublink--all {
	font-weight: 600;
}

.dehoust-header-mobile__account,
.dehoust-header-mobile__cta {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0.5rem 1rem 0;
	padding: 0 0.75rem;
	min-height: 2.75rem;
	border-radius: 8px;
	font-weight: 600;
	color: var(--dehoust-color-text);
	text-decoration: none;
}

.dehoust-header-mobile__account:hover {
	background: var(--dehoust-color-surface);
}

.dehoust-header-mobile__cta {
	justify-content: center;
	min-height: 3.125rem;
	background: var(--dehoust-color-accent);
	color: #fff;
	font-weight: 700;
}

.dehoust-header-mobile__lang {
	margin: 0.75rem 1rem 1rem;
}

.dehoust-header-mobile__lang-toggle {
	display: flex;
	min-height: 2.75rem;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 0.625rem;
	padding: 0 0.75rem;
	border: 1px solid var(--dehoust-color-line);
	border-radius: 8px;
	background: #fff;
	font-family: var(--dehoust-font-body);
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}

.dehoust-header-mobile__lang-current {
	display: flex;
	align-items: center;
	gap: 0.625rem;
}

.dehoust-header-mobile__lang-menu {
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
	overflow: hidden;
	border: 1px solid var(--dehoust-color-line);
	border-radius: 8px;
}

.dehoust-header-mobile__lang-item {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.75rem;
	font-weight: 600;
	color: var(--dehoust-color-text);
	text-decoration: none;
}

.dehoust-header-mobile__lang-item.is-active,
.dehoust-header-mobile__lang-item:hover {
	background: var(--dehoust-color-surface);
}

[data-header-sticky-bar].is-stuck.is-compact[data-header-mobile-bar] > .dehoust-header-mobile__bar-inner {
	padding-block: 0.625rem;
}

[data-header-sticky-bar].is-stuck.is-compact [data-header-mobile-logo] {
	height: 2rem;
	max-width: 180px;
}

.dehoust-main {
	padding-block: 0;
}

@media (prefers-reduced-motion: reduce) {
	[data-header-sticky-bar],
	[data-header-sticky-inner],
	[data-sticky-logo],
	[data-sticky-cta],
	[data-header-mobile-bar],
	[data-header-mobile-logo] {
		transition: none;
	}
}
