/**
 * Sælkerabúðin - Navigation Styles
 * Fixed header, scroll states, dropdowns, mobile slide-out
 */

/* ─── FIXED HEADER ─────────────────────────────── */

.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background-color: var(--wp--preset--color--cream-bg);
	transition: all 0.3s ease;
	border-bottom: none;
	color: #111;
}

.site-header--transparent,
.site-header--transparent.wp-block-group {
	background-color: transparent !important;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	border-bottom-color: transparent;
}


/* White header: invert logo to black */
.site-header .wp-block-site-logo img {
	filter: brightness(0);
}

/* White header: dark text for nav, icons */
.site-header .wp-block-navigation,
.site-header .wp-block-navigation-item__content,
.site-header .wp-block-navigation a {
	color: #111 !important;
}

.site-header .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--caramel) !important;
}

.site-header .wp-block-navigation__submenu-icon path {
	stroke: #111;
}

.site-header .saelk-search-toggle,
.site-header .wp-block-woocommerce-customer-account,
.site-header .wp-block-woocommerce-customer-account a,
.site-header .wc-block-mini-cart__button {
	color: #111 !important;
}

.site-header .saelk-search-toggle:hover,
.site-header .wp-block-woocommerce-customer-account:hover,
.site-header .wc-block-mini-cart__button:hover {
	color: var(--wp--preset--color--caramel) !important;
}

/* Scrolled state — turns dark */
.site-header.nav-scrolled,
.site-header.nav-scrolled.wp-block-group {
	background-color: rgba(26, 26, 26, 0.95) !important;
	backdrop-filter: blur(12px) !important;
	-webkit-backdrop-filter: blur(12px) !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.site-header.nav-scrolled .wp-block-navigation,
.site-header.nav-scrolled .wp-block-navigation-item__content,
.site-header.nav-scrolled .wp-block-navigation a,
.site-header.nav-scrolled .saelk-search-toggle,
.site-header.nav-scrolled .wp-block-woocommerce-customer-account,
.site-header.nav-scrolled .wp-block-woocommerce-customer-account a,
.site-header.nav-scrolled .wc-block-mini-cart__button {
	color: white !important;
}

.site-header.nav-scrolled .wp-block-navigation__submenu-icon path {
	stroke: white;
}

.site-header.nav-scrolled .wp-block-site-logo img {
	filter: none !important;
}

/* ─── DARK PAGES: force transparent header look ── */
/* WooCommerce account, cart, checkout — dark backgrounds */
.woocommerce-account .site-header,
.woocommerce-account .site-header.wp-block-group {
	background-color: transparent !important;
	border-bottom: none !important;
}

.woocommerce-account .site-header .wp-block-navigation,
.woocommerce-account .site-header .wp-block-navigation-item__content,
.woocommerce-account .site-header .wp-block-navigation a,
.woocommerce-account .site-header .saelk-search-toggle,
.woocommerce-account .site-header .wp-block-woocommerce-customer-account,
.woocommerce-account .site-header .wp-block-woocommerce-customer-account a,
.woocommerce-account .site-header .wc-block-mini-cart__button {
	color: white !important;
}

.woocommerce-account .site-header .wp-block-navigation__submenu-icon path {
	stroke: white;
}

.woocommerce-account .site-header .wp-block-site-logo img {
	filter: none !important;
}

/* ─── TRANSPARENT HEADER (homepage/dark hero pages) ── */
/* Overrides the white header for pages that need transparent */
.site-header--transparent,
.site-header--transparent.wp-block-group {
	background-color: transparent !important;
	border-bottom: none !important;
}

.site-header--transparent .wp-block-navigation,
.site-header--transparent .wp-block-navigation-item__content,
.site-header--transparent .wp-block-navigation a,
.site-header--transparent .saelk-search-toggle,
.site-header--transparent .wp-block-woocommerce-customer-account,
.site-header--transparent .wp-block-woocommerce-customer-account a,
.site-header--transparent .wc-block-mini-cart__button {
	color: white !important;
}

.site-header--transparent .wp-block-navigation__submenu-icon path {
	stroke: white;
}

.site-header--transparent .wp-block-site-logo img {
	filter: none !important;
}

/* Transparent header scrolled — dark bg */
.site-header--transparent.nav-scrolled,
.site-header--transparent.nav-scrolled.wp-block-group {
	background-color: rgba(26, 26, 26, 0.92) !important;
	backdrop-filter: blur(12px) !important;
	-webkit-backdrop-filter: blur(12px) !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* ─── NAV TEXT STYLING ──────────────────────────── */

.site-header .wp-block-navigation-item__content {
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.16em !important;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ─── NAVIGATION LINKS ─────────────────────────── */

.site-header .wp-block-navigation {
	gap: 2px;
}

.site-header .wp-block-navigation-item__content {
	padding: 8px 16px;
	position: relative;
	transition: color 0.3s ease;
}

.site-header .wp-block-navigation-item__content::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 2px;
	background-color: var(--wp--preset--color--caramel);
	transition: width 0.3s ease;
}

.site-header .wp-block-navigation-item__content:hover::after,
.site-header .wp-block-navigation-item--current .wp-block-navigation-item__content::after {
	width: 20px;
}

/* ─── DROPDOWN SUBMENUS ────────────────────────── */

.site-header .wp-block-navigation__submenu-container {
	background-color: #222222 !important;
	border: 1px solid rgba(255, 255, 255, 0.08) !important;
	border-radius: var(--wp--custom--border--radius);
	padding: 12px 0;
	min-width: 220px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	animation: saelk-dropdown-in 0.2s ease;
}

.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 10px 24px;
	font-size: 0.8125rem;
	letter-spacing: 0.15em;
	color: white !important;
}

.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--caramel) !important;
	background-color: rgba(198, 134, 66, 0.08);
}

.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after {
	display: none;
}

@keyframes saelk-dropdown-in {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ─── MOBILE NAVIGATION ────────────────────────── */

@media (max-width: 960px) {
	.site-header .wp-block-navigation {
		display: none;
	}

	.saelk-mobile-toggle {
		display: flex;
	}
}

@media (min-width: 961px) {
	.saelk-mobile-toggle {
		display: none;
	}
}

/* ─── MOBILE SLIDE-OUT PANEL ───────────────────── */

.saelk-mobile-nav {
	position: fixed;
	top: 0;
	left: 0;
	width: 85vw;
	max-width: 400px;
	height: 100vh;
	background-color: var(--wp--preset--color--dark-bg);
	z-index: 200;
	transform: translateX(-100%);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	overflow-y: auto;
	padding: 80px 30px 30px;
	border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.saelk-mobile-nav.is-open {
	transform: translateX(0);
}

.saelk-mobile-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	z-index: 199;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.saelk-mobile-backdrop.is-visible {
	opacity: 1;
	pointer-events: auto;
}

/* Mobile nav items */
.saelk-mobile-nav-item {
	display: block;
	padding: 14px 0;
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--oswald);
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	transition: color 0.3s ease;
}

.saelk-mobile-nav-item:hover {
	color: var(--wp--preset--color--caramel);
}

/* Mobile accordion submenu */
.saelk-mobile-submenu {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
	padding-left: 16px;
}

.saelk-mobile-submenu.is-expanded {
	max-height: 500px;
}

.saelk-mobile-submenu a {
	display: block;
	padding: 10px 0;
	color: var(--wp--preset--color--gray-300);
	font-family: var(--wp--preset--font-family--oswald);
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	text-decoration: none;
	transition: color 0.3s ease;
}

.saelk-mobile-submenu a:hover {
	color: var(--wp--preset--color--caramel);
}

/* Mobile close button */
.saelk-mobile-close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: none;
	border: none;
	color: var(--wp--preset--color--gray-400);
	cursor: pointer;
	padding: 8px;
	transition: color 0.3s ease;
}

.saelk-mobile-close:hover {
	color: var(--wp--preset--color--white);
}

/* Mobile contact info at bottom */
.saelk-mobile-contact {
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.saelk-mobile-contact p {
	color: var(--wp--preset--color--gray-400);
	font-size: 0.8125rem;
	line-height: 1.8;
}
