/**
 * Header CSS — log-core
 * Covers: site header, mobile search bar, mobile nav panel.
 */

/* Marquee plugin JS sets body padding-top:50px; correct to exact marquee height.
   overflow-x:clip instead of hidden — hidden breaks position:sticky by making body the scroll container */
body {
	padding-top: 34px !important;
	overflow-x: clip !important;
}

/* The sales-popup plugin's .wc-ssp-close sits at right:-8px relative to the
   viewport, so body's clip can't contain it and the page scrolls 8px sideways.
   clip on the root keeps position:sticky working (unlike overflow:hidden). */
html {
	overflow-x: clip;
}

/* ── Scroll progress bar ─────────────────────────────────────
   Width updated via JS (assets/js/log-interactions.js) as page-scroll %. */
#scroll-bar {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0;
	z-index: 9999;
	background: linear-gradient(90deg, var(--sage-500), var(--plum-500));
	pointer-events: none;
	transition: width .1s linear;
}

/* ── Site Header ──────────────────────────────────────────── */
header.log-site-header {
	background: var(--paper-50);
	position: sticky;
	top: 34px;
	/* marquee bar height */
	z-index: 200;
	border-bottom: 1px solid var(--line);
	transition: box-shadow .35s var(--ease);
	/* iOS Safari defers repainting position:sticky/fixed elements during
	   active scroll, so this (and the marquee bar above it, same fix in
	   public-marquee.css) can visibly lag/clip until scroll settles.
	   Forcing a GPU compositor layer keeps both painted correctly mid-scroll. */
	-webkit-transform: translate3d(0, 0, 0);
	transform: translateZ(0);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

header.log-site-header.scrolled {
	box-shadow: var(--shadow-md);
}

.log-nav-row {
	display: flex;
	align-items: center;
	height: 84px;
	padding: 0 48px;
	transition: height .35s var(--ease);
}

header.log-site-header.scrolled .log-nav-row {
	height: 64px;
}

/* Logo */
.log-site-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--display);
	font-size: 25px;
	font-weight: 700;
	color: var(--ink-900);
	transition: font-size .35s var(--ease);
	flex-shrink: 0;
	min-width: 200px;
	text-decoration: none;
}

header.log-site-header.scrolled .log-site-logo {
	font-size: 21px;
}

.log-logo-mark {
	width: 44px;
	height: 44px;
	border-radius: 13px;
	background: linear-gradient(150deg, var(--sage-600), var(--plum-800));
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--sage-400);
	box-shadow: var(--shadow-sm);
	flex-shrink: 0;
	transition: width .35s, height .35s;
}

header.log-site-header.scrolled .log-logo-mark {
	width: 36px;
	height: 36px;
}

.log-logo-mark svg {
	width: 21px;
	height: 21px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.log-site-logo b {
	color: var(--plum-700);
}

.log-site-logo.has-image {
	min-width: 0;
}

.log-site-logo.has-image .custom-logo-link {
	display: flex;
	align-items: center;
}

.log-site-logo.has-image img {
	height: 52px;
	width: auto;
	max-width: 100%;
	transition: height .35s var(--ease);
}

header.log-site-header.scrolled .log-site-logo.has-image img {
	height: 44px;
}

/* Desktop Nav */
nav.log-main-links {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
	flex: 1;
	padding: 0 24px;
}

nav.log-main-links ul {
	display: flex;
	align-items: center;
	gap: 15px;
	list-style: none;
	margin: 0;
	padding: 0;
}

nav.log-main-links ul li {
	margin: 0;
	padding: 0;
}

nav.log-main-links a {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .03em;
	white-space: nowrap;
	color: var(--ink-700);
	text-transform: uppercase;
	position: relative;
	padding: 6px 0;
	transition: color .25s var(--ease);
	text-decoration: none;
}

nav.log-main-links a::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	height: 2px;
	width: 0;
	background: var(--sage-600);
	transition: width .3s var(--ease);
}

nav.log-main-links a:hover,
nav.log-main-links li.current-menu-item>a {
	color: var(--plum-700);
}

nav.log-main-links a:hover::after,
nav.log-main-links li.current-menu-item>a::after {
	width: 100%;
}

/* Head Actions */
.log-head-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 200px;
	justify-content: flex-end;
}

/* Desktop search */
.log-header-search-wrap {
	display: flex;
	align-items: center;
	background: var(--paper);
	border: 2px solid var(--plum-500);
	border-radius: var(--r-pill);
	overflow: visible;
	transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
	box-shadow: 0 2px 8px rgba(58, 8, 16, .05);
}

.log-header-search-wrap:focus-within {
	border-color: var(--plum-700);
	box-shadow: 0 0 0 3px rgba(110, 18, 32, .12), 0 2px 12px rgba(110, 18, 32, .1);
}

.log-hs-icon-pill {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	color: var(--plum-700);
}

.log-hs-icon-pill svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.log-header-search-wrap input {
	border: none;
	background: none;
	font-family: var(--body);
	font-size: 13px;
	font-weight: 500;
	color: var(--ink-900);
	padding: 9px 14px 9px 0;
	width: 200px;
	outline: none;
}

.log-header-search-wrap input::placeholder {
	color: var(--gray-400);
}

/* Cart button */
.log-cart-btn {
	position: relative;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ink-700);
	background: var(--paper);
	transition: background .25s, transform .25s;
	text-decoration: none;
}

.log-cart-btn:hover {
	background: var(--blush-100);
	transform: translateY(-1px);
}

.log-cart-btn svg {
	width: 19px;
	height: 19px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.log-cart-badge {
	position: absolute;
	top: -5px;
	right: -5px;
	background: var(--plum-700);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
	transition: transform .25s var(--ease);
	line-height: 1;
}

.log-cart-badge[data-count="0"] {
	display: none;
}

/* Burger */
.log-burger {
	display: none;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	align-items: center;
	justify-content: center;
	background: var(--paper);
	border: none;
	cursor: pointer;
	color: var(--ink-700);
}

.log-burger svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Mobile search bar */
.log-mobile-search-bar {
	display: none;
	padding: 10px 16px 12px;
	background: var(--white);
	border-bottom: 1px solid var(--line);
}

.log-mobile-search-inner {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--paper);
	border: 2px solid var(--plum-500);
	border-radius: var(--r-pill);
	padding: 0 16px;
	transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.log-mobile-search-inner:focus-within {
	border-color: var(--plum-700);
	box-shadow: 0 0 0 3px rgba(110, 18, 32, .1);
}

.log-mobile-search-inner .ms-icon {
	width: 16px;
	height: 16px;
	color: var(--plum-700);
	flex-shrink: 0;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.log-mobile-search-inner input {
	flex: 1;
	border: none;
	background: none;
	font-family: var(--body);
	font-size: 14px;
	font-weight: 500;
	color: var(--ink-900);
	padding: 12px 0;
	outline: none;
}

.log-mobile-search-inner input::placeholder {
	color: var(--gray-400);
}

/* Mobile nav panel */
.log-mobile-panel {
	display: none;
	flex-direction: column;
	gap: 4px;
	background: var(--white);
	border-top: 1px solid var(--line);
	padding: 14px 24px 20px;
}

/* wp_nav_menu() always wraps each link in <li> even with no container/ul —
   the reference mockup hardcodes plain <a> tags with no <li>, so it never
   needed this reset. Without it, browsers show a bullet marker on <li>
   regardless of list-style on an ancestor. */
.log-mobile-panel li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.log-mobile-panel a {
	display: block;
	padding: 12px 4px;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--ink-700);
	border-bottom: 1px solid var(--line);
	text-decoration: none;
}

/* WP applies .current-menu-item to the <li>, not the <a> — the old
   ".log-mobile-panel a.current-menu-item" selector could never match. */
.log-mobile-panel li.current-menu-item>a,
.log-mobile-panel a:hover {
	color: var(--plum-700);
}

.log-mobile-panel.open {
	display: flex;
}

/* Responsive
   1300px (not 900px) — 7 nav items + logo + search + cart don't fit in one
   row below ~1200-1280px; the <ul> wraps to a 2nd line and overlaps the
   search box (e.g. on 13" MacBook-class viewports). Raised so laptop/small-
   desktop widths get the working mobile nav instead of a broken squeezed one. */
@media (max-width: 1300px) {
	nav.log-main-links {
		display: none;
	}

	.log-burger {
		display: flex;
	}

	.log-mobile-search-bar {
		display: block;
	}

	.log-header-search-wrap {
		display: none !important;
	}

	.log-head-actions {
		margin-left: auto;
	}

	.log-nav-row {
		padding-left: 20px;
		padding-right: 20px;
	}

	/* Marquee height varies on mobile (text wraps, or plugin's own close
	   button removes it) — track the real height via JS instead of the
	   hardcoded 36px used on desktop. See log-header.js ResizeObserver. */
	body {
		padding-top: var(--marquee-h, 34px) !important;
	}

	header.log-site-header {
		top: var(--marquee-h, 34px);
	}
}


/* Narrow phones: the logo gives way so the cart and menu buttons always fit
   (its 200px min-width + 224px image pushed them off-screen below ~380px). */
@media (max-width: 480px) {
	.log-nav-row {
		padding-left: 12px;
		padding-right: 12px;
	}

	.log-site-logo {
		flex: 1 1 0;
		min-width: 0;
	}

	header.log-site-header .log-site-logo.has-image img {
		height: auto;
		max-height: 52px;
		width: auto;
		max-width: 100%;
		object-fit: contain;
	}

	.log-head-actions {
		flex-shrink: 0;
		gap: 8px;
		min-width: 0;
	}
}

@media (max-width: 400px) {
	#main-container {
		display: flex;
		flex-direction: column;
		position: relative;
		height: calc(100vh - 188px);
		overflow-y: auto;
		/* overflow: clip; */
	}
}

/* WP admin bar (32px) + marquee (34px) = 66px when logged in */
.admin-bar header.log-site-header {
	top: 66px;
}

/* Ticker (sales-popup marquee) — Website_10: plum-900 bar, 34px, 13px/600 text.
   The plugin reads these custom properties, so no selector fights its own CSS. */
#wc-ssp-marquee-bar {
	--wc-ssp-bar-bg: var(--plum-900);
	--wc-ssp-bar-height: 34px;
	--wc-ssp-font-size: 13px;
	--wc-ssp-text: #f3dcdd;
	--wc-ssp-strong: #f3dcdd;
	--wc-ssp-sep: var(--sage-400);
	border-bottom: 1px solid rgba(88, 133, 174, .18);
	font-weight: 600;
}

/* ── Reference header additions (home_page_7) ─────────────────
   Helpline pill (number from the Contact Number plugin), desktop search
   toggle + drop-down, mobile helpline strip, mobile panel buttons. */
/* Helpline colours come from one place. Source: the admin 'Primary' family (--lc-primary*). */
.log-call-pill,
.log-msb-help,
.log-mobile-panel {
	--hl-brand: var(--lc-primary, var(--plum-700));
	--hl-brand-hover: var(--lc-primary-hover, var(--plum-800));
	--hl-brand-pale: var(--lc-primary-pale, var(--blush-100));
	--hl-brand-subtle: var(--lc-primary-subtle, var(--plum-500));
}

.log-call-pill {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 4px 16px 4px 4px;
	border-radius: var(--r-pill);
	background: var(--white);
	border: 1px solid var(--line);
	flex-shrink: 0;
	white-space: nowrap;
	text-decoration: none;
	box-shadow: 0 6px 18px -12px color-mix(in srgb, var(--hl-brand) 30%, transparent);
	transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}

.log-call-pill:hover {
	border-color: var(--hl-brand);
	box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--hl-brand) 55%, transparent);
	transform: translateY(-1px);
}

.log-call-ic,
.log-msb-ic {
	position: relative;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	background: var(--hl-brand-pale);
	color: var(--hl-brand-hover);
	box-shadow: inset 0 0 0 1.5px var(--hl-brand-subtle);
}

.log-call-ic svg,
.log-msb-ic svg {
	width: 17px;
	height: 17px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.log-call-ic::after,
.log-msb-ic::after {
	content: '';
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid var(--hl-brand);
	opacity: 0;
	animation: logCallRing 2.6s ease-out infinite;
	pointer-events: none;
}

@keyframes logCallRing {
	0% {
		transform: scale(.8);
		opacity: .75;
	}

	70%,
	100% {
		transform: scale(1.32);
		opacity: 0;
	}
}

.log-call-pill:hover .log-call-ic svg,
.log-msb-help:hover .log-msb-ic svg {
	animation: logCallWiggle .55s var(--ease);
}

@keyframes logCallWiggle {
	20% {
		transform: rotate(-14deg);
	}

	40% {
		transform: rotate(12deg);
	}

	60% {
		transform: rotate(-8deg);
	}

	80% {
		transform: rotate(4deg);
	}
}

@media (prefers-reduced-motion: reduce) {

	.log-call-ic::after,
	.log-msb-ic::after {
		animation: none;
	}

	.log-call-pill:hover .log-call-ic svg,
	.log-msb-help:hover .log-msb-ic svg {
		animation: none;
	}
}

.log-call-text,
.log-msb-tx {
	display: flex;
	flex-direction: column;
	gap: 4px;
	line-height: 1;
}

.log-call-text small {
	font-family: var(--body);
	font-size: 9.5px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .15em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--hl-brand-hover) 80%, #000);
}

.log-call-text b {
	font-family: var(--body);
	font-size: 14.5px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .01em;
	color: var(--ink-900);
}

/* Search toggle — same square button as cart/burger */
.log-search-toggle {
	position: relative;
	display: flex;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: var(--paper);
	border: 1px solid transparent;
	color: var(--ink-700);
	cursor: pointer;
	transition: background .25s, transform .25s, border-color .25s;
}

.log-search-toggle:hover,
.log-search-toggle[aria-expanded="true"] {
	background: var(--blush-100);
	border-color: var(--line);
}

.log-search-toggle:active {
	transform: scale(.92);
}

.log-search-toggle svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Search drop-down (holds the existing search field) */
.log-search-drop {
	display: none;
	padding: 0 48px 14px;
}

.log-search-drop.open {
	display: block;
}

header.log-site-header .log-search-drop .log-header-search-wrap {
	width: 100%;
}

header.log-site-header .log-search-drop .log-header-search-wrap input {
	flex: 1;
	width: auto;
	min-width: 0;
}

/* Mobile helpline strip (above the mobile search field) */
.log-msb-help {
	display: none;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	padding: 6px;
	border-radius: 16px;
	background: linear-gradient(100deg, color-mix(in srgb, var(--hl-brand-hover) 55%, #000), color-mix(in srgb, var(--hl-brand-hover) 82%, #000));
	color: var(--lc-white, #fff);
	text-decoration: none;
	box-shadow: 0 12px 24px -16px color-mix(in srgb, var(--hl-brand-hover) 70%, transparent);
	transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.log-msb-help:active {
	transform: scale(.98);
}

.log-msb-ic {
	width: 34px;
	height: 34px;
	box-shadow: none;
}

.log-msb-ic svg {
	width: 16px;
	height: 16px;
	stroke-width: 2.2;
}

.log-msb-tx {
	flex: 1;
	min-width: 0;
}

.log-msb-help small {
	font-family: var(--body);
	font-size: 9.5px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .15em;
	text-transform: uppercase;
	color: var(--hl-brand-pale);
}

.log-msb-help b {
	font-family: var(--body);
	font-size: 14.5px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .02em;
	white-space: nowrap;
}

.log-msb-help em {
	flex-shrink: 0;
	font-family: var(--body);
	font-size: 10.5px;
	font-weight: 800;
	font-style: normal;
	line-height: 1;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--hl-brand-hover) 55%, #000);
	background: var(--hl-brand-pale);
	padding: 9px 12px;
	border-radius: 999px;
}

/* Mobile panel buttons */
.log-mobile-panel a.log-mp-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	margin-top: 18px;
	padding: 0 28px;
	border: 1px solid transparent;
	border-radius: var(--r-pill);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .13em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color .25s var(--ease), border-color .25s var(--ease), box-shadow .3s var(--ease);
}

.log-mobile-panel a.log-mp-btn + a.log-mp-btn {
	margin-top: 10px;
}

.log-mobile-panel a.log-mp-btn svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.log-mobile-panel a.log-mp-btn--primary {
	background: color-mix(in srgb, var(--hl-brand-hover) 55%, #000);
	color: var(--hl-brand-pale);
	box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--hl-brand-hover) 60%, transparent);
}

.log-mobile-panel a.log-mp-btn--primary:hover {
	background: color-mix(in srgb, var(--hl-brand-hover) 75%, #000);
	color: var(--hl-brand-pale);
}

.log-mobile-panel a.log-mp-btn--ghost {
	background: var(--lc-white, #fff);
	color: var(--ink-900);
	border-color: var(--hl-brand-subtle);
}

.log-mobile-panel a.log-mp-btn--ghost:hover {
	background: var(--hl-brand-pale);
	border-color: var(--hl-brand);
	color: var(--ink-900);
}

/* Icon buttons: reference hover border */
.log-cart-btn,
.log-burger {
	border: 1px solid transparent;
}

.log-cart-btn:hover,
.log-burger:hover {
	border-color: var(--line);
}

/* The pill/strip/button are always rendered when the Contact Number plugin
   is active (JS shows or hides them from the live number), and the display
   rules above would otherwise override the [hidden] attribute. */
.log-call-pill[hidden],
.log-msb-help[hidden],
.log-mobile-panel a.log-mp-btn[hidden] {
	display: none;
}

/* The strip is dark, so its ring and icon use the pale brand tint. */
.log-msb-ic::after {
	border-color: var(--hl-brand-pale);
}

@media (max-width: 1300px) {
	.log-search-toggle {
		display: none;
	}

	.log-search-drop,
	.log-search-drop.open {
		display: none;
	}
}

@media (max-width: 639px) {
	.log-call-pill {
		display: none;
	}

	.log-msb-help {
		display: flex;
	}

	.log-head-actions {
		gap: 8px;
	}
}
