/* ============================================
   SCREEN READER ONLY
   ============================================ */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* ============================================
   TOP BAR
   ============================================ */
.site-topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1001;
	height: var(--wp--custom--sizes--topbar-height);
	background-color: var(--wp--preset--color--chocolate);
	color: var(--wp--preset--color--cream);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--wp--custom--spacing--sm);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	text-align: center;
	line-height: 1;
}

.site-topbar a {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}

.site-topbar a:hover {
	text-decoration: underline;
}

.site-topbar__vipps {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--custom--spacing--xs);
	font-weight: 700;
	padding: var(--wp--custom--spacing--xs) var(--wp--custom--spacing--sm);
	border-radius: var(--wp--custom--border-radius--pill);
	font-size: var(--wp--preset--font-size--x-small);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
	white-space: nowrap;
}

.site-topbar__desktop {
	display: inline;
}

.site-topbar__mobile {
	display: none;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
	position: fixed;
	top: var(--wp--custom--sizes--topbar-height);
	left: 0;
	right: 0;
	z-index: 1000;
	background-color: var(--wp--preset--color--background-header);
	border-bottom: 1px solid var(--wp--preset--color--border);
	height: var(--wp--custom--sizes--header-height);
	display: flex;
	align-items: center;
}

.site-header--no-topbar {
	top: 0;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: var(--wp--custom--sizes--max-width);
	margin: 0 auto;
	padding: 0 var(--wp--custom--spacing--lg);
	gap: var(--wp--custom--spacing--lg);
}

.site-header__logo img {
	height: var(--wp--custom--logo-height--default);
	width: auto;
}

.site-header__logo .site-title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--chocolate);
	text-decoration: none;
}

/* ============================================
   NAV LINKS
   ============================================ */
.site-nav__list {
	display: flex;
	gap: var(--wp--custom--spacing--lg);
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__list a {
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--text);
	font-weight: 500;
	position: relative;
	padding: var(--wp--custom--spacing--xs) 0;
	white-space: nowrap;
	text-decoration: none;
}

.site-nav__list a::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 3px;
	background-color: var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--border-radius--sm);
	transition: width var(--wp--custom--transition);
}

.site-nav__list a:hover::after,
.site-nav__list .current-menu-item a::after {
	width: 100%;
}

.site-nav__list a:hover {
	color: var(--wp--preset--color--primary);
}

/* ============================================
   HEADER SEARCH
   ============================================ */
.header-search {
	position: relative;
	flex: 1;
	max-width: var(--wp--custom--search-max-width);
}

.header-search__input {
	width: 100%;
	padding: var(--wp--custom--spacing--sm) var(--wp--custom--spacing--md);
	padding-right: calc(var(--wp--custom--icon-size--button) + var(--wp--custom--spacing--sm));
	border: 2px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--border-radius--pill);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--text);
	outline: none;
	transition: all var(--wp--custom--transition);
}

.header-search__input:focus {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px rgba(204, 46, 46, 0.35);
}

.header-search__input::placeholder {
	color: var(--wp--preset--color--text-muted);
}

.header-search__btn {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: var(--wp--custom--icon-size--button);
	height: var(--wp--custom--icon-size--button);
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	border: none;
	cursor: pointer;
	transition: all var(--wp--custom--transition);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.header-search__btn:hover {
	background-color: var(--wp--preset--color--primary-dark);
}

.header-search__btn svg {
	width: var(--wp--custom--icon-size--sm);
	height: var(--wp--custom--icon-size--sm);
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ============================================
   HEADER ICONS (cart, etc.)
   ============================================ */
.site-nav__icons {
	display: flex;
	gap: var(--wp--custom--spacing--sm);
	align-items: center;
	margin-left: var(--wp--custom--spacing--sm);
}

.site-nav__icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--icon-size--touch);
	height: var(--wp--custom--icon-size--touch);
	border-radius: 50%;
	color: var(--wp--preset--color--text);
	text-decoration: none;
	transition: all var(--wp--custom--transition);
}

.site-nav__icon:hover {
	background-color: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--primary);
}

.site-nav__icon svg {
	width: var(--wp--custom--icon-size--md);
	height: var(--wp--custom--icon-size--md);
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.site-nav__icon .count {
	position: absolute;
	top: 2px;
	right: 0;
	width: var(--wp--custom--icon-size--badge);
	height: var(--wp--custom--icon-size--badge);
	border-radius: 50%;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--tiny);
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* ============================================
   HAMBURGER (mobile only)
   ============================================ */
.site-header__hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: var(--wp--custom--icon-size--touch);
	height: var(--wp--custom--icon-size--touch);
	padding: var(--wp--custom--spacing--xs);
	background: none;
	border: none;
	cursor: pointer;
}

.site-header__hamburger span {
	display: block;
	height: 2px;
	background-color: var(--wp--preset--color--chocolate);
	border-radius: var(--wp--custom--border-radius--sm);
	transition: all var(--wp--custom--transition);
}

.site-header__hamburger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.site-header__hamburger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.site-header__hamburger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu {
	position: fixed;
	top: calc(var(--wp--custom--sizes--topbar-height) + var(--wp--custom--sizes--header-height));
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999;
	background-color: var(--wp--preset--color--background);
	padding: var(--wp--custom--spacing--lg);
	transform: translateX(100%);
	transition: transform var(--wp--custom--transition);
	overflow-y: auto;
}

.mobile-menu[aria-hidden="false"] {
	transform: translateX(0);
}

.mobile-menu__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-menu__list li {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.mobile-menu__list a {
	display: block;
	padding: var(--wp--custom--spacing--md) 0;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

.mobile-menu__list a:hover {
	color: var(--wp--preset--color--primary);
}

.mobile-menu__search {
	margin-top: var(--wp--custom--spacing--lg);
	max-width: none;
}

.mobile-menu__cart {
	display: block;
	margin-top: var(--wp--custom--spacing--lg);
	padding: var(--wp--custom--spacing--sm) var(--wp--custom--spacing--md);
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
	text-align: center;
	border-radius: var(--wp--custom--border-radius--default);
	font-weight: 500;
	text-decoration: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
/* ============================================
   ADMIN BAR OFFSET
   ============================================ */
body.admin-bar .site-topbar {
	top: var(--wp-admin--admin-bar--height, 32px);
}

body.admin-bar .site-header {
	top: calc(var(--wp-admin--admin-bar--height, 32px) + var(--wp--custom--sizes--topbar-height));
}

body.admin-bar .site-header--no-topbar {
	top: var(--wp-admin--admin-bar--height, 32px);
}

body.admin-bar .mobile-menu {
	top: calc(var(--wp-admin--admin-bar--height, 32px) + var(--wp--custom--sizes--topbar-height) + var(--wp--custom--sizes--header-height));
}

@media (max-width: 640px) {
	.site-topbar {
		font-size: var(--wp--preset--font-size--x-small);
		gap: var(--wp--custom--spacing--xs);
	}

	.site-topbar__desktop {
		display: none;
	}

	.site-topbar__mobile {
		display: inline;
	}
}

@media (max-width: 768px) {
	.site-nav,
	.site-header__inner > .header-search {
		display: none;
	}

	.site-header__hamburger {
		display: flex;
	}

	.site-header__logo img {
		height: var(--wp--custom--logo-height--mobile);
	}

	.site-header__inner {
		padding: 0 var(--wp--custom--spacing--md);
		gap: var(--wp--custom--spacing--sm);
	}

	.site-nav__icons {
		gap: var(--wp--custom--spacing--xs);
		margin-left: auto;
	}
}

/* ============================================
   SEARCHWP LIVE SEARCH OVERLAY
   ============================================ */
.searchwp-live-search-results {
	background: var(--wp--preset--color--background);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--border-radius--lg);
	box-shadow: var(--wp--custom--shadow--lg);
	width: 100%;
	min-width: 280px;
	max-height: 460px;
	overflow-y: auto;
	z-index: 1002;
	font-family: var(--wp--preset--font-family--body);
	padding: var(--wp--custom--spacing--xs);
}

.searchwp-live-search-result {
	border-radius: var(--wp--custom--border-radius--default);
	transition: background-color var(--wp--custom--transition);
}

.searchwp-live-search-result:hover {
	background-color: var(--wp--preset--color--background-alt);
}

.searchwp-live-search-result__link {
	display: flex;
	gap: var(--wp--custom--spacing--md);
	padding: var(--wp--custom--spacing--sm);
	text-decoration: none;
	color: inherit;
}

.searchwp-live-search-result + .searchwp-live-search-result {
	border-top: 1px solid var(--wp--preset--color--border);
}

.searchwp-live-search-result--img {
	flex-shrink: 0;
	width: 72px;
	height: 72px;
	border-radius: var(--wp--custom--border-radius--default);
	overflow: hidden;
}

.searchwp-live-search-result--img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.searchwp-live-search-result--placeholder {
	width: 100%;
	height: 100%;
	background: var(--wp--preset--color--background-alt);
}

.searchwp-live-search-result--info {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	gap: 2px;
}

.searchwp-live-search-result--category {
	font-size: var(--wp--preset--font-size--tiny);
	font-weight: 600;
	color: var(--wp--preset--color--primary);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1;
}

.searchwp-live-search-result--title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--wp--preset--color--text);
	margin: 0;
	line-height: 1.25;
}

.searchwp-live-search-result--desc {
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--text-muted);
	margin: 0;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.searchwp-live-search-result--price {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--accent);
	margin-top: 2px;
}

.searchwp-live-search-no-results {
	padding: var(--wp--custom--spacing--lg) var(--wp--custom--spacing--md);
	text-align: center;
	color: var(--wp--preset--color--text-muted);
	font-size: var(--wp--preset--font-size--small);
	margin: 0;
}
