/* ==========================================================================
   FE26 HEADER SEARCH, 2026 design
   Markup: inc/fe26-search.php (fe26_search_render). Script: ui/javascript/fe26-search.js
   Built 28 Sep 2026 from Chloe Scally's mockup "search-empty.png". Staging only.
   Everything is scoped under .fe26-search so nothing else in the header moves.

   1. Tokens
   2. Search box
   3. Panel shell
   4. Idle panel: chips, supplement cards, Shop by, experts
   5. Live results
   6. Footer
   7. Header fit (desktop)
   8. Mobile
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
.fe26-search {
	--fe26-orange: #f26522;
	--fe26-orange-dark: #d9531a;
	--fe26-orange-tint: #fff3ec;
	--fe26-ink: #1b1c20;
	--fe26-dark: #363437;
	--fe26-muted: #7a7b80;
	--fe26-line: #e7e7e9;
	--fe26-side: #f6f5f3;
	--fe26-h: 46px;
	position: relative;
	font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
	color: var(--fe26-ink);
	text-align: left;
}
.fe26-search *,
.fe26-search *::before,
.fe26-search *::after { box-sizing: border-box; }
.fe26-search .fe26-ico { width: 18px; height: 18px; flex: 0 0 auto; display: block; }

/* 2. Search box ------------------------------------------------------------ */
.fe26-search .fe26-search__form {
	position: relative;
	display: flex;
	align-items: stretch;
	margin: 0;
	height: var(--fe26-h);
	background: #fff;
	border: 1.5px solid #d6d6da;
	border-radius: 6px;
	overflow: hidden;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.fe26-search .fe26-search__form:hover { border-color: #b9b9bf; }
.fe26-search.is-open .fe26-search__form,
.fe26-search .fe26-search__form:focus-within {
	border-color: var(--fe26-orange);
	box-shadow: 0 0 0 3px rgba(242, 101, 34, .16);
}
.fe26-search .fe26-search__icon {
	display: flex;
	align-items: center;
	padding: 0 4px 0 14px;
	color: #8b8c91;
	pointer-events: none;
}
.fe26-search .fe26-search__input {
	/* The theme styles .form-control and input[type=search]; reset what matters. */
	-webkit-appearance: none;
	appearance: none;
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0 12px 0 8px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	outline: 0;
	font: 400 14px/1.2 Montserrat, "Helvetica Neue", Arial, sans-serif;
	color: var(--fe26-ink);
}
.fe26-search .fe26-search__input::placeholder { color: #85868b; opacity: 1; }
.fe26-search .fe26-search__input::-webkit-search-decoration,
.fe26-search .fe26-search__input::-webkit-search-results-button { -webkit-appearance: none; }
.fe26-search .fe26-search__input::-webkit-search-cancel-button { cursor: pointer; }
.fe26-search .fe26-search__go {
	flex: 0 0 var(--fe26-h);
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--fe26-h);
	height: auto;
	margin: -1.5px -1.5px -1.5px 0; /* sit flush over the form border */
	padding: 0;
	border: 0;
	border-radius: 0 6px 6px 0;
	background: var(--fe26-orange);
	color: #fff;
	cursor: pointer;
	transition: background-color .15s ease;
}
.fe26-search .fe26-search__go .fe26-ico { width: 20px; height: 20px; }
.fe26-search .fe26-search__go:hover,
.fe26-search .fe26-search__go:focus-visible { background: var(--fe26-orange-dark); }
.fe26-search .fe26-search__go:focus-visible { outline: 2px solid var(--fe26-ink); outline-offset: -4px; }

/* 3. Panel shell ----------------------------------------------------------- */
.fe26-search .fe26-panel {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	z-index: 1050;
	width: 720px;
	max-width: calc(100vw - 32px);
	background: #fff;
	/* orange 3px top line removed at Chloe's request (28 Oct 2026), as on RED MILLS Horse */
	border-radius: 10px;
	box-shadow: 0 24px 56px rgba(27, 28, 32, .18), 0 2px 8px rgba(27, 28, 32, .08);
	overflow: hidden;
	animation: fe26-in .16s ease-out;
}
.fe26-search .fe26-panel[hidden] { display: none; }
@keyframes fe26-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fe26-search .fe26-panel { animation: none; } }

.fe26-search .fe26-label {
	margin: 0 0 12px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--fe26-muted);
}
.fe26-search ul { list-style: none; margin: 0; padding: 0; }
.fe26-search a { text-decoration: none; }

/* 4. Idle panel ------------------------------------------------------------ */
.fe26-search .fe26-panel__idle {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 236px;
}
.fe26-search .fe26-panel__idle[hidden] { display: none; }
.fe26-search .fe26-panel__main { padding: 22px 24px 22px; }
.fe26-search .fe26-panel__side {
	padding: 22px 20px 20px;
	background: var(--fe26-side);
	border-left: 1px solid var(--fe26-line);
	display: flex;
	flex-direction: column;
}

/* Chips */
.fe26-search .fe26-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}
.fe26-search .fe26-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 7px 13px; /* chips have no icon (Chloe) */
	border: 1px solid var(--fe26-line);
	border-radius: 999px;
	background: #fff;
	font: 500 13px/1.2 Montserrat, "Helvetica Neue", Arial, sans-serif;
	color: var(--fe26-ink);
	cursor: pointer;
	transition: border-color .12s ease, background-color .12s ease, color .12s ease;
}
.fe26-search .fe26-chip .fe26-ico { width: 14px; height: 14px; color: var(--fe26-orange); }
.fe26-search .fe26-chip:hover,
.fe26-search .fe26-chip.is-active {
	border-color: var(--fe26-orange);
	background: var(--fe26-orange-tint);
	color: var(--fe26-orange-dark);
}

/* Popular supplements */
.fe26-search .fe26-panel__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}
.fe26-search .fe26-panel__row .fe26-label { margin: 0; }
.fe26-search .fe26-viewall {
	font-size: 12px;
	font-weight: 700;
	color: var(--fe26-orange);
	border-radius: 3px;
}
.fe26-search .fe26-viewall:hover,
.fe26-search .fe26-viewall.is-active { color: var(--fe26-orange-dark); text-decoration: underline; text-underline-offset: 3px; }
.fe26-search .fe26-cards {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}
.fe26-search .fe26-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	padding: 10px 8px 12px;
	border: 1px solid var(--fe26-line);
	border-radius: 8px;
	background: #fff;
	color: var(--fe26-ink);
	text-align: center;
	transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.fe26-search .fe26-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 84px;
	margin-bottom: 10px;
}
.fe26-search .fe26-card__media img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 84px;
	object-fit: contain;
}
.fe26-search .fe26-card__name {
	font-size: 11px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .02em;
	text-transform: uppercase;
}
.fe26-search .fe26-card:hover,
.fe26-search .fe26-card.is-active {
	border-color: var(--fe26-orange);
	box-shadow: 0 6px 16px rgba(27, 28, 32, .08);
	color: var(--fe26-ink);
}
.fe26-search .fe26-card:hover .fe26-card__name,
.fe26-search .fe26-card.is-active .fe26-card__name { color: var(--fe26-orange-dark); }

/* Shop by */
.fe26-search .fe26-shopby li + li { border-top: 1px solid #e3e1dd; }
.fe26-search .fe26-shopby a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 6px 12px 2px;
	font-size: 14px;
	font-weight: 600;
	color: var(--fe26-ink);
	border-radius: 4px;
	transition: color .12s ease, background-color .12s ease;
}
.fe26-search .fe26-shopby a > span { flex: 1 1 auto; }
.fe26-search .fe26-shopby .fe26-ico { color: var(--fe26-orange); }
.fe26-search .fe26-shopby .fe26-ico--chevron { width: 16px; height: 16px; color: #a3a4a9; transition: transform .12s ease, color .12s ease; }
.fe26-search .fe26-shopby a:hover,
.fe26-search .fe26-shopby a.is-active { color: var(--fe26-orange-dark); }
.fe26-search .fe26-shopby a:hover .fe26-ico--chevron,
.fe26-search .fe26-shopby a.is-active .fe26-ico--chevron { color: var(--fe26-orange); transform: translateX(2px); }

/* Ask our experts */
.fe26-search .fe26-experts {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: auto;
	padding: 14px 14px;
	border-radius: 8px;
	background: var(--fe26-dark);
	color: #fff;
	transition: background-color .12s ease;
}
.fe26-search .fe26-panel__side .fe26-shopby + .fe26-experts { margin-top: 18px; }
.fe26-search .fe26-experts .fe26-ico { width: 22px; height: 22px; color: var(--fe26-orange); }
.fe26-search .fe26-experts .fe26-ico--arrow { width: 16px; height: 16px; color: #fff; opacity: .7; }
.fe26-search .fe26-experts__txt { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.fe26-search .fe26-experts__kicker { font-size: 11px; font-weight: 500; line-height: 1.3; color: #cfcfd2; }
.fe26-search .fe26-experts__label { font-size: 14px; font-weight: 700; line-height: 1.25; color: #fff; }
.fe26-search .fe26-experts:hover,
.fe26-search .fe26-experts.is-active { background: #1f1e20; color: #fff; }

/* Keyboard highlight: the input keeps focus, so show a ring on the item. */
.fe26-search [data-fe26-item].is-active { outline: 2px solid var(--fe26-orange); outline-offset: 2px; }
.fe26-search .fe26-card.is-active,
.fe26-search .fe26-chip.is-active { outline: 0; }
.fe26-search [data-fe26-item]:focus-visible { outline: 2px solid var(--fe26-orange); outline-offset: 2px; }

/* 5. Live results ---------------------------------------------------------- */
.fe26-search .fe26-panel__results {
	max-height: min(460px, calc(100vh - 220px));
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 18px 24px 16px;
	transition: opacity .15s ease;
}
.fe26-search .fe26-panel__results[hidden] { display: none; }
.fe26-search .fe26-panel__results.is-loading { opacity: .55; }
.fe26-search .fe26-panel__results::-webkit-scrollbar { width: 8px; }
.fe26-search .fe26-panel__results::-webkit-scrollbar-thumb { background: #d4d4d8; border-radius: 8px; }

.fe26-search .fe26-panel__results .als-summary {
	margin: 0 0 4px;
	font-size: 12px;
	color: var(--fe26-muted);
	text-align: left;
}
.fe26-search .fe26-panel__results .als-summary strong { color: var(--fe26-ink); font-weight: 700; }
.fe26-search .fe26-panel__results .als-type-heading {
	margin: 18px 0 10px;
	padding: 0;
	border: 0;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--fe26-muted);
}
.fe26-search .fe26-panel__results .als-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.fe26-search .fe26-panel__results .als-item {
	display: block;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	transform: none;
}
.fe26-search .fe26-panel__results .als-item:hover { transform: none; box-shadow: none; }
.fe26-search .fe26-panel__results .als-item-cta { display: none; }
.fe26-search .fe26-panel__results .als-item-link {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 6px 8px 6px 6px;
	border: 1px solid transparent;
	border-radius: 8px;
	color: var(--fe26-ink);
	transition: border-color .12s ease, background-color .12s ease;
}
.fe26-search .fe26-panel__results .als-item-media {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 6px;
	background: #fff;
	border: 1px solid var(--fe26-line);
}
.fe26-search .fe26-panel__results .als-item-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: contain;
	border-radius: 0;
}
.fe26-search .fe26-panel__results .als-item-body { flex: 1 1 auto; min-width: 0; padding: 0; }
.fe26-search .fe26-panel__results .als-item-title {
	margin: 0;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: inherit;
	text-transform: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.fe26-search .fe26-panel__results .als-item-link:hover,
.fe26-search .fe26-panel__results .als-item-link.is-active {
	border-color: var(--fe26-orange);
	background: var(--fe26-orange-tint);
	color: var(--fe26-ink);
	outline: 0;
}
.fe26-search .fe26-panel__results .als-no-results,
.fe26-search .fe26-panel__results .fe26-msg {
	margin: 4px 0 14px;
	font-size: 14px;
	color: var(--fe26-ink);
}
.fe26-search .fe26-panel__results .fe26-msg--muted { color: var(--fe26-muted); }
.fe26-search .fe26-panel__results .fe26-chips { margin-bottom: 4px; }
.fe26-search .fe26-spin {
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 8px;
	vertical-align: -2px;
	border: 2px solid rgba(242, 101, 34, .25);
	border-top-color: var(--fe26-orange);
	border-radius: 50%;
	animation: fe26-spin .7s linear infinite;
}
@keyframes fe26-spin { to { transform: rotate(360deg); } }

/* 6. Footer ---------------------------------------------------------------- */
.fe26-search .fe26-panel__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 13px 24px;
	border-top: 1px solid var(--fe26-line);
	background: #fff;
}
.fe26-search .fe26-all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	font-size: 13px;
	font-weight: 700;
	color: var(--fe26-orange);
	border-radius: 3px;
}
.fe26-search .fe26-all > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe26-search .fe26-all .fe26-ico { width: 16px; height: 16px; transition: transform .12s ease; }
.fe26-search .fe26-all:hover,
.fe26-search .fe26-all.is-active { color: var(--fe26-orange-dark); }
.fe26-search .fe26-all:hover .fe26-ico,
.fe26-search .fe26-all.is-active .fe26-ico { transform: translateX(3px); }
.fe26-search .fe26-keys {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 14px;
	margin: 0;
	font-size: 11px;
	color: var(--fe26-muted);
	white-space: nowrap;
}
.fe26-search .fe26-keys span { display: inline-flex; align-items: center; gap: 4px; }
.fe26-search .fe26-keys kbd {
	display: inline-block;
	min-width: 20px;
	padding: 2px 5px;
	border: 1px solid #dcdce0;
	border-bottom-width: 2px;
	border-radius: 4px;
	background: #fafafa;
	box-shadow: none;
	font: 600 10.5px/1.3 Montserrat, "Helvetica Neue", Arial, sans-serif;
	color: #54555a;
	text-align: center;
}

/* 7. Header fit (desktop) -------------------------------------------------- */
.search-row:has(> .fe26-search) { margin-right: 14px; }
.fe26-search--desktop { width: clamp(300px, 31vw, 460px); }
@media (max-width: 1199px) {
	.fe26-search--desktop { width: clamp(260px, 28vw, 340px); }
}

/* 7b. Underline look (desktop), as on RED MILLS Horse (Chloe): "Search..." over a thin orange
   line with a magnifier on the right, never a box. Focus thickens the line; the panel still opens.
   The phone strip keeps the boxed field with the orange arrow button. */
.fe26-search .fe26-go__rest { display: none; }
.fe26-search .fe26-go__open { display: contents; }
.fe26-search.fe26-search--desktop .fe26-search__form,
.fe26-search.fe26-search--desktop .fe26-search__form:hover,
.fe26-search.fe26-search--desktop.is-open .fe26-search__form,
.fe26-search.fe26-search--desktop .fe26-search__form:focus-within {
	background: transparent;
	border: 0;
	border-bottom: 1.5px solid var(--fe26-orange);
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}
.fe26-search.fe26-search--desktop.is-open .fe26-search__form,
.fe26-search.fe26-search--desktop .fe26-search__form:focus-within { border-bottom-width: 2.5px; }
/* The header's generic input:focus-visible rule (fe26-header.css) draws a 2px orange box round the
   field; the thicker underline is the focus cue here instead. */
.fe26-search .fe26-search__input:focus,
.fe26-search .fe26-search__input:focus-visible { outline: none !important; box-shadow: none !important; }
.fe26-search.fe26-search--desktop .fe26-search__icon { display: none; }
.fe26-search.fe26-search--desktop .fe26-search__input { padding-left: 2px; }
.fe26-search.fe26-search--desktop .fe26-search__input::placeholder { color: #55565b; }
.fe26-search.fe26-search--desktop .fe26-search__go {
	flex-basis: 36px;
	width: 36px;
	margin: 0;
	border-radius: 0;
	background: transparent;
	color: #3a3a3d;
}
.fe26-search.fe26-search--desktop .fe26-search__go:hover,
.fe26-search.fe26-search--desktop .fe26-search__go:focus-visible { color: var(--fe26-orange); background: transparent; }
.fe26-search.fe26-search--desktop .fe26-search__go .fe26-ico { width: 18px; height: 18px; stroke-width: 2.4; }
.fe26-search.fe26-search--desktop .fe26-go__rest { display: contents; }
.fe26-search.fe26-search--desktop .fe26-go__open { display: none; }

/* 8. Mobile ---------------------------------------------------------------- */
.fe26-search--mobile { width: 100%; margin: 10px 0 12px; }
.fe26-search--mobile .fe26-panel {
	left: 0 !important;
	right: 0;
	width: auto;
	max-width: none;
	max-height: calc(100vh - 140px);
	max-height: calc(100dvh - 140px);
	overflow-y: auto;
	overscroll-behavior: contain;
}
@media (max-width: 767px) {
	.fe26-search .fe26-panel__idle { grid-template-columns: minmax(0, 1fr); }
	.fe26-search .fe26-panel__main { padding: 18px 16px; }
	.fe26-search .fe26-panel__side { padding: 16px; border-left: 0; border-top: 1px solid var(--fe26-line); }
	/* Four supplements across on phones (Chloe). */
	.fe26-search .fe26-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
	.fe26-search .fe26-card { padding: 6px 3px 8px; border-radius: 6px; }
	.fe26-search .fe26-card__media { height: 54px; margin-bottom: 6px; }
	.fe26-search .fe26-card__media img { max-height: 54px; }
	.fe26-search .fe26-card__name { font-size: 9px; letter-spacing: 0; overflow-wrap: anywhere; }
	.fe26-search .fe26-chips { margin-bottom: 20px; }
	.fe26-search .fe26-panel__results { max-height: none; padding: 14px 16px; }
	.fe26-search .fe26-panel__results .als-list { grid-template-columns: minmax(0, 1fr); }
	.fe26-search .fe26-panel__foot { padding: 12px 16px; }
	.fe26-search .fe26-keys { display: none; }
	.fe26-search .fe26-search__input { font-size: 16px; } /* stops iOS zooming on focus */
}

/* 9. Sharp corners (Chloe): square edges throughout the search, to match the header's
   parallelogram buttons. Last in the file so it beats the radii above, mobile included.
   Only the loading spinner stays round. */
.fe26-search .fe26-search__form,
.fe26-search .fe26-search__go,
.fe26-search .fe26-panel,
.fe26-search .fe26-chip,
.fe26-search .fe26-viewall,
.fe26-search .fe26-card,
.fe26-search .fe26-shopby a,
.fe26-search .fe26-experts,
.fe26-search .fe26-all,
.fe26-search .fe26-keys kbd,
.fe26-search .fe26-panel__results .als-item-link,
.fe26-search .fe26-panel__results .als-item-media,
.fe26-search .fe26-panel__results::-webkit-scrollbar-thumb { border-radius: 0; }

/* 10. Small arrows (Chloe): every arrow is the live site's small arrow-right-short (9x8, filled),
   printed by fe26_search_icon( 'arrow' ). Sizes here override the 16-20px icon sizes above. */
.fe26-search .fe26-ico--arrow,
.fe26-search .fe26-experts .fe26-ico--arrow,
.fe26-search .fe26-all .fe26-ico--arrow { width: 9.158px; height: 8.014px; }
.fe26-search .fe26-experts .fe26-ico--arrow { opacity: 1; }
.fe26-search .fe26-search__go .fe26-ico--arrow { width: 13px; height: 11.4px; }

/* 11. Icon fills (Chloe): the site has a global inline `svg { fill: #fff }`, and CSS beats an SVG's
   fill="" attribute, so it turned the filled horse head (and arrows) white and gave the stroke icons
   a white fill. Put the intended fills back: stroke icons unfilled, filled icons in currentColor. */
.fe26-search .fe26-ico { fill: none; }
.fe26-search .fe26-ico--horse,
.fe26-search .fe26-ico--arrow { fill: currentColor; }
