/* SteinAir Mobile Header
   Palette: accent (brand red, from settings), ink #1f2328, charcoal #333 (matches site bar),
   line #e4e6ea, field #f3f4f6. Type inherits the site's font. */

#samh {
	--samh-ink: #1f2328;
	--samh-muted: #5b616b;
	--samh-line: #e4e6ea;
	--samh-field: #f3f4f6;
	--samh-bar-h: 56px;

	position: relative;
	z-index: 9990;
	display: block;
	background: #fff;
	color: var(--samh-ink);
	font-size: 16px;
	line-height: 1.4;
	border-bottom: 1px solid var(--samh-line);
	transition: box-shadow .2s ease;
}

#samh[data-samh-relocate] { visibility: hidden; }

body.samh-sticky #samh { position: sticky; top: 0; }
body.samh-sticky.admin-bar #samh { top: 0; }
@media (min-width: 601px) { body.samh-sticky.admin-bar #samh { top: 46px; } }
@media (min-width: 783px) { body.samh-sticky.admin-bar #samh { top: 32px; } }

#samh.is-scrolled { box-shadow: 0 2px 10px rgba(31, 35, 40, .08); }
#samh.is-open { z-index: 100001; }

/* Defensive reset against theme styles */
#samh, #samh *, #samh *::before, #samh *::after { box-sizing: border-box; }
#samh ul, #samh li { list-style: none; margin: 0; padding: 0; }
#samh a { text-decoration: none; }
#samh button {
	font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0;
	box-shadow: none; text-transform: none; letter-spacing: normal; min-height: 0; line-height: 1;
	border-radius: 0; cursor: pointer; -webkit-appearance: none; appearance: none;
}
#samh .samh-icon { display: block; width: 24px; height: 24px; flex: none; }
#samh .samh-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
#samh :focus-visible { outline: 2px solid var(--samh-accent); outline-offset: 2px; }

/* ---- Bar ---- */
#samh .samh-bar {
	display: grid;
	grid-template-columns: 88px 1fr 88px;
	align-items: center;
	height: var(--samh-bar-h);
	padding: 0 6px;
}

#samh .samh-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; color: var(--samh-ink); border-radius: 8px; position: relative;
}
#samh .samh-btn:active { background: var(--samh-field); }

#samh .samh-logo { justify-self: center; display: flex; align-items: center; line-height: 0; }
#samh .samh-logo-img {
	opacity: 1 !important; visibility: visible !important; filter: none !important;
	transform: none !important; clip-path: none !important;
	display: block; width: var(--samh-logo-w); max-width: 100%; height: auto; max-height: 40px; object-fit: contain; }
#samh .samh-logo-text { font-weight: 700; font-size: 20px; color: var(--samh-ink); line-height: 1; }

#samh .samh-actions { display: flex; justify-content: flex-end; }

#samh .samh-cart-count {
	position: absolute; top: 5px; right: 3px;
	min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: var(--samh-accent); color: #fff;
	font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
	font-variant-numeric: tabular-nums;
}
#samh .samh-cart-count.is-empty { display: none; }

/* ---- Search ---- */
#samh .samh-search { padding: 0 12px 12px; }

#samh .samh-search-form { position: relative; display: flex; margin: 0; }
#samh .samh-search-form input[type="search"] {
	width: 100%; height: 44px; margin: 0;
	padding: 0 48px 0 14px;
	font: inherit; font-size: 16px; /* 16px stops iOS zooming on focus */
	color: var(--samh-ink);
	background: var(--samh-field);
	border: 1px solid transparent; border-radius: 10px;
	box-shadow: none; outline: 0;
	-webkit-appearance: none; appearance: none;
	transition: border-color .15s ease, background-color .15s ease;
}
#samh .samh-search-form input[type="search"]::placeholder { color: var(--samh-muted); opacity: 1; }
#samh .samh-search-form input[type="search"]:focus { background: #fff; border-color: var(--samh-accent); }
#samh .samh-search-form input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
#samh .samh-search-submit {
	position: absolute; right: 2px; top: 2px;
	width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
	color: var(--samh-muted); border-radius: 8px;
}

/* FiboSearch inside our bar */
#samh .samh-search .dgwt-wcas-search-wrapp { max-width: none !important; min-width: 0 !important; width: 100%; margin: 0; }
#samh .samh-search .dgwt-wcas-sf-wrapp { background: transparent; padding: 0; }
#samh .samh-search input.dgwt-wcas-search-input {
	height: 44px; font-size: 16px; border-radius: 10px !important;
	background: var(--samh-field); border: 1px solid transparent; color: var(--samh-ink);
}
#samh .samh-search input.dgwt-wcas-search-input:focus { background: #fff; border-color: var(--samh-accent); }

/* ---- Drawer ---- */
#samh .samh-overlay {
	position: fixed; inset: 0; background: rgba(31, 35, 40, .45);
	opacity: 0; transition: opacity .25s ease;
}
#samh .samh-overlay.is-visible { opacity: 1; }

#samh .samh-drawer {
	position: fixed; top: 0; bottom: 0; left: 0;
	width: min(86vw, 360px);
	display: flex; flex-direction: column;
	background: #fff;
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform .28s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .28s;
	overscroll-behavior: contain;
}
#samh.is-open .samh-drawer {
	transform: none; visibility: visible;
	transition: transform .28s cubic-bezier(.2, .7, .2, 1), visibility 0s;
	box-shadow: 8px 0 30px rgba(31, 35, 40, .18);
}

#samh .samh-drawer-head {
	display: flex; align-items: center; justify-content: space-between;
	height: var(--samh-bar-h); padding: 0 6px 0 18px;
	background: #333; color: #fff; flex: none;
}
#samh .samh-drawer-head .samh-btn { color: #fff; }
#samh .samh-drawer-head .samh-btn:active { background: rgba(255, 255, 255, .12); }
#samh .samh-drawer-title { font-weight: 700; font-size: 17px; }

#samh .samh-tabs { display: flex; align-self: stretch; gap: 4px; margin-left: -18px; padding-left: 8px; }
#samh .samh-tab {
	position: relative; padding: 0 12px; height: 100%;
	color: rgba(255, 255, 255, .7); font-size: 16px; font-weight: 600; line-height: 1;
	white-space: nowrap;
}
#samh .samh-tab[aria-selected="true"] { color: #fff; }
#samh .samh-tab[aria-selected="true"]::after {
	content: ""; position: absolute; left: 12px; right: 12px; bottom: 0;
	height: 3px; background: var(--samh-accent); border-radius: 3px 3px 0 0;
}
#samh .samh-tab:focus-visible { outline-color: #fff; outline-offset: -4px; }

#samh .samh-drawer-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 0 18px; }

/* Menu levels. Our own class names + !important so theme dropdown CSS can't hide them. */
#samh .samh-item {
	display: grid !important; grid-template-columns: 1fr auto; align-items: center;
	float: none !important; width: auto !important; position: static !important;
	border-bottom: 1px solid var(--samh-line);
}
#samh .samh-nav > .samh-item:last-child { border-bottom: 0; }
#samh .samh-item > a {
	display: block; padding: 14px 18px; min-height: 48px;
	color: var(--samh-ink); font-size: 16px; font-weight: 600; background: none;
}
#samh .samh-item.is-current > a { color: var(--samh-accent); }

#samh .samh-sub {
	display: block !important; position: static !important; visibility: visible !important;
	opacity: 1 !important; transform: none !important; float: none !important;
	width: auto !important; min-width: 0 !important; max-height: none !important;
	margin: 0 !important; padding: 0 !important; box-shadow: none !important; border: 0 !important;
	grid-column: 1 / -1;
	background: #f8f9fa !important;
	border-top: 1px solid var(--samh-line) !important;
}
#samh .samh-sub[hidden] { display: none !important; }
#samh .samh-sub .samh-item:last-child { border-bottom: 0; }
#samh .samh-sub > .samh-item > a { font-weight: 400; font-size: 15px; padding-left: 30px; }
#samh .samh-depth-2 { background: #f1f3f5 !important; }
#samh .samh-depth-2 > .samh-item > a { padding-left: 44px; font-size: 14.5px; }
#samh .samh-depth-3 > .samh-item > a { padding-left: 58px; font-size: 14.5px; }

#samh .samh-sub-toggle {
	width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
	color: var(--samh-muted); border-left: 1px solid var(--samh-line);
}
#samh .samh-sub-toggle .samh-icon { width: 20px; height: 20px; transition: transform .2s ease; }
#samh .samh-sub-toggle[aria-expanded="true"] .samh-icon { transform: rotate(180deg); }

#samh .samh-nav-heading {
	margin: 18px 0 0; padding: 10px 18px 8px;
	font-size: 13px; font-weight: 700; color: var(--samh-muted);
	border-bottom: 1px solid var(--samh-line);
}

#samh .samh-drawer-foot {
	flex: none; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--samh-line); background: #fff;
	display: grid; gap: 4px;
}
#samh .samh-call {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	height: 48px; margin-bottom: 6px; border-radius: 10px;
	background: var(--samh-accent); color: #fff; font-weight: 700; font-size: 16px;
}
#samh .samh-call .samh-icon { width: 20px; height: 20px; }
#samh .samh-foot-link {
	display: flex; align-items: center; gap: 10px; padding: 8px 4px;
	color: var(--samh-ink); font-size: 15px; word-break: break-all;
}
#samh .samh-foot-link .samh-icon { width: 20px; height: 20px; color: var(--samh-muted); }

html.samh-lock, html.samh-lock body { overflow: hidden !important; }

@media (prefers-reduced-motion: reduce) {
	#samh, #samh * { transition: none !important; }
}
#samh .samh-panel[hidden] { display: none !important; }

/* Layering: keep bar/search contents (e.g. FiboSearch's mobile-overlay trigger link,
   which carries its own z-index) below the overlay and drawer. */
#samh .samh-bar,
#samh .samh-search { position: relative; z-index: 1; }
#samh .samh-overlay { z-index: 2; }
#samh .samh-drawer { z-index: 3; }
