/**
 * Pico Duarte — header shell, dropdown dark styling.
 */

.picoduarte-dynamic-header.site-header {
	background-color: #181b1e;
	border-bottom: 1px solid rgb(245 245 242 / 0.08);
	/* Slimmer strip: logo stays full size; we trim theme padding around it. */
	padding-block: clamp(0.35rem, 1vw, 0.55rem);
}

.picoduarte-dynamic-header.site-header .header-inner.picoduarte-header-inner {
	width: min(1160px, 100%);
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 32px);
}

/* Desktop split layout */
.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown) .picoduarte-header-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	column-gap: clamp(16px, 2vw, 28px);
	row-gap: 0;
}

.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown) .picoduarte-branding-centered {
	justify-self: center;
	text-align: center;
}

/* Nav fills each side column; whole menu hugs outer edge ↔ logo stays centered (symmetric bookends). */
.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown) .picoduarte-nav-left.site-navigation {
	width: 100%;
	min-width: 0;
}

.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown) .picoduarte-header-end {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: clamp(8px, 1.2vw, 12px);
	width: 100%;
	min-width: 0;
}

.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown) .picoduarte-header-end .picoduarte-nav-right.site-navigation {
	width: auto;
	flex: 0 1 auto;
	min-width: 0;
}

.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown) .picoduarte-nav-left.site-navigation {
	justify-content: flex-start;
}

.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown) .picoduarte-header-end .picoduarte-nav-right.site-navigation {
	justify-content: flex-end;
}

.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown) .picoduarte-nav-left .menu,
.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown) .picoduarte-nav-right .menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
}

/* Links — match light text + accent hover */
.picoduarte-dynamic-header.site-header .site-navigation ul.menu>li>a {
	color: var(--e-global-color-text);
	transition: color 0.2s ease, opacity 0.2s ease;
}

.picoduarte-dynamic-header.site-header .site-navigation ul.menu>li>a:hover,
.picoduarte-dynamic-header.site-header .site-navigation ul.menu>li>a:focus {
	color: var(--e-global-color-accent);
}

.picoduarte-dynamic-header.site-header .site-navigation ul.menu li.menu-item-has-children::after {
	color: var(--e-global-color-secondary);
}

.picoduarte-dynamic-header.site-header .site-navigation ul.menu li ul {
	background: #181b1e;
	border: 1px solid rgb(245 245 242 / 0.1);
	box-shadow: 0 16px 40px rgb(0 0 0 / 0.35);
}

.picoduarte-dynamic-header.site-header .site-navigation ul.menu li ul li {
	border-block-end-color: rgb(245 245 242 / 0.08);
}

.picoduarte-dynamic-header.site-header .site-navigation ul.menu li ul li:last-child {
	border-block-end: none;
}

.picoduarte-dynamic-header.site-header .site-branding.picoduarte-branding-centered {
	row-gap: 0.125rem;
}

.picoduarte-dynamic-header.site-header .site-branding.picoduarte-branding-centered .site-logo {
	margin-block: 0;
}

.picoduarte-dynamic-header.site-header .site-title a {
	color: var(--e-global-color-text);
}

/* Tighter menu hit area so the row matches the logo without shrinking the graphic */
.picoduarte-dynamic-header.site-header .site-navigation ul.menu>li>a {
	padding-block: clamp(6px, 1.2vw, 9px);
	padding-inline: clamp(10px, 1.8vw, 14px);
}

/* Logo badge — frosted glass over the bar so it reads apart from the nav */
.picoduarte-dynamic-header.site-header .picoduarte-logo-badge {
	display: inline-block;
	max-width: 100%;
	padding: clamp(8px, 1.4vw, 14px) clamp(12px, 2.2vw, 22px);
	border-radius: 16px;
	background: rgb(223, 215, 201);
	border: 1px solid rgb(245 245 242 / 0.28);
	/* box-shadow:
		0 10px 36px rgb(0 0 0 / 0.3),
		inset 0 1px 0 rgb(255 255 255 / 0.42),
		0 0 0 1px rgb(0 0 0 / 0.06); */
	backdrop-filter: blur(14px) saturate(1.2);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
}

@supports not (backdrop-filter: blur(1px)) {
	.picoduarte-dynamic-header.site-header .picoduarte-logo-badge {
		background-color: var(--e-global-color-088b8cc);
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}
}

.picoduarte-dynamic-header.site-header .picoduarte-logo-badge .custom-logo-link {
	display: inline-flex;
	justify-content: center;
}

.picoduarte-dynamic-header.site-header .picoduarte-logo-badge img {
	vertical-align: middle;
	height: auto;
	max-height: clamp(56px, 10vw, 88px);
	width: auto;
}

.site-navigation-dropdown ul.menu li a {
	transition: background-color 0.2s ease, color 0.2s ease;
}

/* Dropdown drawer — dark theme (overrides Hello’s light defaults) */
.picoduarte-dynamic-header.site-header .site-navigation-dropdown ul.menu {
	background-color: #181b1e;
	box-shadow:
		inset 0 1px 0 rgb(245 245 242 / 0.06),
		0 24px 48px rgb(0 0 0 / 0.45);
	border-block-start: 1px solid rgb(245 245 242 / 0.08);
}

.picoduarte-dynamic-header.site-header .site-navigation-dropdown ul.menu li a {
	background-color: transparent;
	box-shadow: inset 0 -1px 0 rgb(245 245 242 / 0.08);
	color: var(--e-global-color-text);
}

.picoduarte-dynamic-header.site-header .site-navigation-dropdown ul.menu li a:hover {
	color: var(--e-global-color-accent);
}

.picoduarte-dynamic-header.site-header .site-navigation-dropdown ul.menu li.current-menu-item>a {
	background-color: rgb(43 78 161 / 0.35);
	color: var(--e-global-color-text);
}

/* Hamburger — align vertical rhythm with tighter nav links */
.picoduarte-dynamic-header.site-header .site-navigation-toggle-holder {
	padding-block: 4px;
	padding-inline: clamp(8px, 1.5vw, 14px);
}

/* Hamburger tint */
.picoduarte-dynamic-header.site-header .site-navigation-toggle-holder .site-navigation-toggle {
	background-color: rgb(245 245 242 / 0.08);
	color: var(--e-global-color-text);
}

.picoduarte-dynamic-header.site-header .site-navigation-toggle-holder .site-navigation-toggle:hover {
	background-color: rgb(245 245 242 / 0.14);
}

/* Mobile toolbar — hamburger (start) | centered logo | cart (end).
   `.picoduarte-header-end` uses `display: contents` so cart + toggle join the
   parent grid while keeping Hello’s toggle/dropdown sibling markup intact. */
@media (max-width: 767px) {
	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-mobile .picoduarte-header-inner {
		display: grid;
		grid-template-columns: minmax(2.75rem, 1fr) auto minmax(2.75rem, 1fr);
		grid-template-rows: auto auto;
		align-items: center;
		column-gap: clamp(8px, 2vw, 12px);
		row-gap: 0;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-mobile .picoduarte-branding-centered {
		grid-column: 2;
		grid-row: 1;
		justify-self: center;
		align-self: center;
		width: max-content;
		max-width: calc(100vw - 7.5rem);
		min-width: 0;
		text-align: center;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-mobile .picoduarte-header-end {
		display: contents;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-mobile .picoduarte-header-end .site-navigation-toggle-holder {
		grid-column: 1;
		grid-row: 1;
		justify-self: start;
		align-self: center;
		margin-inline-start: 0;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-mobile .picoduarte-header-end .picoduarte-header-cart-wrap:not(.picoduarte-header-cart-wrap--empty):not([hidden]) {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
		align-self: center;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-mobile .picoduarte-header-end .site-navigation-dropdown {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-mobile .picoduarte-logo-badge {
		flex-shrink: 0;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-mobile .picoduarte-logo-badge img {
		width: auto;
		height: auto;
		max-width: 100%;
		max-height: clamp(48px, 11vw, 72px);
		object-fit: contain;
	}
}

/* Same row treatment when Hello uses tablet breakpoint for the drawer (≤992px) */
@media (max-width: 992px) {
	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-tablet .picoduarte-header-inner {
		display: grid;
		grid-template-columns: minmax(2.75rem, 1fr) auto minmax(2.75rem, 1fr);
		grid-template-rows: auto auto;
		align-items: center;
		column-gap: clamp(8px, 2vw, 12px);
		row-gap: 0;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-tablet .picoduarte-branding-centered {
		grid-column: 2;
		grid-row: 1;
		justify-self: center;
		align-self: center;
		width: max-content;
		max-width: calc(100vw - 7.5rem);
		min-width: 0;
		text-align: center;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-tablet .picoduarte-header-end {
		display: contents;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-tablet .picoduarte-header-end .site-navigation-toggle-holder {
		grid-column: 1;
		grid-row: 1;
		justify-self: start;
		align-self: center;
		margin-inline-start: 0;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-tablet .picoduarte-header-end .picoduarte-header-cart-wrap:not(.picoduarte-header-cart-wrap--empty):not([hidden]) {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
		align-self: center;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-tablet .picoduarte-header-end .site-navigation-dropdown {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-tablet .picoduarte-logo-badge {
		flex-shrink: 0;
	}

	.picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown).menu-dropdown-tablet .picoduarte-logo-badge img {
		width: auto;
		height: auto;
		max-width: 100%;
		max-height: clamp(48px, 11vw, 72px);
		object-fit: contain;
	}
}

/* RTL — mirror outer edges relative to sidebar columns */
body.rtl .picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown) .picoduarte-nav-left.site-navigation {
	justify-content: flex-end;
}

body.rtl .picoduarte-dynamic-header.site-header:not(.menu-layout-dropdown) .picoduarte-header-end .picoduarte-nav-right.site-navigation {
	justify-content: flex-start;
}

/* Header cart — hidden until WooCommerce reports items in cart */
.picoduarte-header-cart-wrap--empty,
.picoduarte-header-cart-wrap[hidden] {
	display: none !important;
}

.picoduarte-header-cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: clamp(6px, 1.2vw, 8px);
	border: 0;
	border-radius: 3px;
	background-color: rgb(245 245 242 / 0.08);
	color: var(--e-global-color-text);
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.picoduarte-header-cart:hover,
.picoduarte-header-cart:focus-visible {
	background-color: rgb(245 245 242 / 0.14);
	color: var(--e-global-color-accent);
}

.picoduarte-header-cart__icon svg {
	display: block;
	width: 1.25rem;
	height: 1.25rem;
}

.picoduarte-header-cart__count {
	position: absolute;
	top: 0;
	inset-inline-end: 0;
	min-width: 1.125rem;
	height: 1.125rem;
	padding-inline: 4px;
	border-radius: 999px;
	background-color: var(--e-global-color-accent);
	color: #fff;
	font-size: 0.625rem;
	font-weight: 700;
	line-height: 1.125rem;
	text-align: center;
	transform: translate(35%, -35%);
}