Ecom Header 1
Store header for DR product brands: the supplied offer rides the top strip, the logo sits centred, and the one
Use it in a prompt
Use nav/ecom-header from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/nav/ecom-header.tsx. - Import it and pass your copy and images (Props tab):
import { EcomHeader } from "@/components/funneldna/nav/ecom-header"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/nav/ecom-header/component.tsx 881 lines
// layout: classic-centred-stack
// Store header for DR product brands: the supplied offer rides the top strip, the logo sits centred, and the one
// action (the bundle at its price) stays one tap away on every width, beside a live cart count and a progress line.
// Theme notes: every colour, face, radius and shadow reads the theme contract tokens. The done tick is a solid
// --success badge with a white glyph (status icon badge rule), read through the scoped --eh-done-glyph variable.
// Quiet icon, nav and chip buttons read --button-weight; the primary reads the --button-* family and the search
// submit reads the --button-2-* family.
import * as React from 'react';
import { AnimatePresence, motion, useReducedMotion } from 'motion/react';
import { AlertCircle, Check, ChevronDown, Filter, Menu, Package, Search, ShoppingBag, Tag, User, X } from 'lucide-react';
export type EcomHeaderCategory = {
label: string; // benefit-led line, e.g. 'Plan every page of your funnel'
name?: string; // the product behind it
value?: string; // its price on its own
href?: string;
image?: string; // item-n slot image
imageAlt?: string;
};
export type EcomHeaderLink = { label: string; href?: string };
export type EcomHeaderPromo = {
text: React.ReactNode; // full strip line (641px and up)
short?: React.ReactNode; // phone strip line
linkLabel?: string;
href?: string;
};
export type EcomHeaderOffer = {
headline: React.ReactNode; // wrap the key phrase in <mark> for one marker stroke
price: string;
anchor?: React.ReactNode; // the supplied alternative the price beats
quiet?: React.ReactNode; // the plain line under the button
quietHref?: string;
};
export type EcomHeaderProgress = {
current: number;
goal: number;
message: React.ReactNode; // strings may use {current}, {goal} and {remaining}
doneMessage?: React.ReactNode;
linkLabel?: string;
href?: string;
format?: (n: number) => string; // e.g. currency for a free-shipping goal
};
export type EcomHeaderCopy = {
brandHome: string; // {brand}
menu: string;
closeMenu: string;
menuTitle: string;
navLabel: string;
search: string;
searchLabel: string;
searchPlaceholder: string;
searchSubmit: string;
searchError: string;
closeSearch: string;
popular: string;
account: string;
cartEmpty: string;
cartOne: string;
cartMany: string; // {count}
dropdownTitle: string;
drawerTitle: string;
itemMeta: string; // {name}, {value}
progressLabel: string; // {current}, {goal}
progressAria: string;
};
export type EcomHeaderProps = {
brandName?: string;
logoImage?: string; // logo slot; the wordmark shows when empty
logoAlt?: string;
homeHref?: string;
promo?: EcomHeaderPromo | null;
shopLabel?: string; // dropdown trigger label
categories?: EcomHeaderCategory[];
links?: EcomHeaderLink[]; // plain links beside the dropdown
offer?: EcomHeaderOffer | null;
cta?: { label: string; href?: string };
cartCount?: number;
cartHref?: string;
onCart?: () => void;
accountHref?: string;
onAction?: () => void;
progress?: EcomHeaderProgress | null; // free-shipping or bundle progress line
onSearch?: (query: string) => void;
searchSuggestions?: string[];
sticky?: boolean;
copy?: Partial<EcomHeaderCopy>;
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error';
className?: string;
};
export function EcomHeader(props: EcomHeaderProps) {
const {
brandName = 'Funnel Starter',
logoImage,
logoAlt,
homeHref = '#top',
promo = DEFAULT_PROMO,
shopLabel = 'Shop by goal',
categories = DEFAULT_CATEGORIES,
links = DEFAULT_LINKS,
offer = DEFAULT_OFFER,
cta = DEFAULT_CTA,
cartCount = 0,
cartHref,
onCart,
accountHref = '#account',
onAction,
progress = null,
onSearch,
searchSuggestions = DEFAULT_SUGGESTIONS,
sticky = false,
state = 'default',
className,
} = props;
const copy: EcomHeaderCopy = { ...DEFAULT_COPY, ...props.copy };
const uid = 'eh' + React.useId().replace(/[^a-zA-Z0-9]/g, '');
const reduce = useReducedMotion();
const [panelOpen, setPanelOpen] = React.useState(false);
const [searchOpen, setSearchOpen] = React.useState(state === 'error');
const [drawerOpen, setDrawerOpen] = React.useState(false);
const [scrolled, setScrolled] = React.useState(false);
const [query, setQuery] = React.useState('');
const [searchError, setSearchError] = React.useState(state === 'error');
const [announce, setAnnounce] = React.useState('');
const shopRef = React.useRef<HTMLLIElement>(null);
const triggerRef = React.useRef<HTMLButtonElement>(null);
const searchBtnRef = React.useRef<HTMLButtonElement>(null);
const menuBtnRef = React.useRef<HTMLButtonElement>(null);
const drawerRef = React.useRef<HTMLDivElement>(null);
const searchInputRef = React.useRef<HTMLInputElement>(null);
const firstCount = React.useRef(true);
const ids = { panel: uid + '-panel', search: uid + '-search', drawer: uid + '-drawer' };
const disabled = state === 'disabled';
const count = Math.max(0, Math.floor(cartCount));
const cartLabel = count === 0 ? copy.cartEmpty : count === 1 ? copy.cartOne : fill(copy.cartMany, { count: String(count) });
React.useEffect(() => {
if (state === 'error') {
setSearchOpen(true);
setSearchError(true);
}
}, [state]);
React.useEffect(() => {
if (firstCount.current) {
firstCount.current = false;
return;
}
setAnnounce(cartLabel);
}, [count]);
React.useEffect(() => {
if (!panelOpen && !searchOpen && !drawerOpen) return;
const onKey = (e: KeyboardEvent) => {
if (e.key !== 'Escape') return;
if (drawerOpen) {
setDrawerOpen(false);
menuBtnRef.current?.focus();
} else if (panelOpen) {
setPanelOpen(false);
triggerRef.current?.focus();
} else if (searchOpen) {
setSearchOpen(false);
searchBtnRef.current?.focus();
}
};
document.addEventListener('keydown', onKey);
return () => document.removeEventListener('keydown', onKey);
}, [panelOpen, searchOpen, drawerOpen]);
React.useEffect(() => {
if (!panelOpen) return;
const onDown = (e: PointerEvent) => {
if (!shopRef.current?.contains(e.target as Node)) setPanelOpen(false);
};
document.addEventListener('pointerdown', onDown);
return () => document.removeEventListener('pointerdown', onDown);
}, [panelOpen]);
React.useEffect(() => {
if (!sticky) return;
const onScroll = () => setScrolled(window.scrollY > 8);
onScroll();
window.addEventListener('scroll', onScroll, { passive: true });
return () => window.removeEventListener('scroll', onScroll);
}, [sticky]);
React.useEffect(() => {
if (!drawerOpen) return;
const root = document.documentElement;
const prev = root.style.overflow;
root.style.overflow = 'hidden';
const mq = window.matchMedia('(min-width: 1180px)');
const onMq = () => {
if (mq.matches) setDrawerOpen(false);
};
mq.addEventListener('change', onMq);
const frame = requestAnimationFrame(() => drawerRef.current?.querySelector<HTMLElement>('[data-autofocus]')?.focus());
return () => {
root.style.overflow = prev;
mq.removeEventListener('change', onMq);
cancelAnimationFrame(frame);
};
}, [drawerOpen]);
const closeDrawer = () => {
setDrawerOpen(false);
requestAnimationFrame(() => menuBtnRef.current?.focus());
};
const toggleSearch = () => {
const next = !searchOpen;
setPanelOpen(false);
setSearchOpen(next);
if (next) requestAnimationFrame(() => searchInputRef.current?.focus());
};
const onTriggerKey = (e: React.KeyboardEvent<HTMLButtonElement>) => {
if (e.key !== 'ArrowDown') return;
e.preventDefault();
setPanelOpen(true);
requestAnimationFrame(() => document.getElementById(ids.panel)?.querySelector<HTMLElement>('a, button')?.focus());
};
const trapFocus = (e: React.KeyboardEvent<HTMLDivElement>) => {
if (e.key !== 'Tab' || !drawerRef.current) return;
const items = Array.from(drawerRef.current.querySelectorAll<HTMLElement>('a[href], button:not([disabled]), input:not([disabled])'));
if (!items.length) return;
const first = items[0];
const last = items[items.length - 1];
if (e.shiftKey && document.activeElement === first) {
e.preventDefault();
last.focus();
} else if (!e.shiftKey && document.activeElement === last) {
e.preventDefault();
first.focus();
}
};
const submitSearch = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
const q = query.trim();
if (!q) {
setSearchError(true);
return;
}
setSearchError(false);
onSearch?.(q);
};
const renderCta = (variant: 'bar' | 'block') => {
const cls = 'eh-cta ' + (variant === 'block' ? 'eh-cta--block' : 'eh-cta-bar');
if (cta.href && !disabled) {
return (
<a className={cls} href={cta.href} onClick={() => onAction?.()}>
{cta.label}
</a>
);
}
return (
<button type='button' className={cls} disabled={disabled} onClick={() => onAction?.()}>
{cta.label}
</button>
);
};
const renderSearch = (where: 'panel' | 'drawer') => {
const inputId = uid + '-' + where + '-q';
const errId = inputId + '-err';
return (
<form role='search' className='eh-form' onSubmit={submitSearch} noValidate>
<label className='eh-sr' htmlFor={inputId}>
{copy.searchLabel}
</label>
<div className='eh-form-row'>
<div className='eh-field-wrap'>
<Search className='eh-field-icon' size={20} strokeWidth={2.5} aria-hidden='true' />
<input
ref={where === 'panel' ? searchInputRef : undefined}
id={inputId}
className='eh-field'
type='search'
name='q'
autoComplete='off'
enterKeyHint='search'
placeholder={copy.searchPlaceholder}
value={query}
onChange={(e) => {
setQuery(e.target.value);
if (searchError && e.target.value.trim()) setSearchError(false);
}}
aria-invalid={searchError ? 'true' : undefined}
aria-describedby={searchError ? errId : undefined}
/>
</div>
<button type='submit' className='eh-btn2'>
{copy.searchSubmit}
</button>
{where === 'panel' ? (
<button
type='button'
className='eh-icon-btn eh-close-search'
aria-label={copy.closeSearch}
onClick={() => {
setSearchOpen(false);
searchBtnRef.current?.focus();
}}
>
<X size={20} strokeWidth={2.5} aria-hidden='true' />
</button>
) : null}
</div>
{searchError ? (
<p id={errId} className='eh-error' role='alert'>
<AlertCircle className='eh-inline' size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.searchError}
</p>
) : null}
{where === 'panel' && searchSuggestions.length > 0 ? (
<div className='eh-chips'>
<span className='eh-chips-label'>{copy.popular}</span>
{searchSuggestions.map((s) => (
<button
key={s}
type='button'
className='eh-chip'
onClick={() => {
setQuery(s);
setSearchError(false);
onSearch?.(s);
}}
>
{s}
</button>
))}
</div>
) : null}
</form>
);
};
const renderItems = () => (
<ul className='eh-items'>
{categories.map((c, i) => {
const meta =
c.name && c.value
? fillNodes(copy.itemMeta, { name: c.name, value: <strong className='eh-item-value'>{c.value}</strong> })
: c.name || c.value;
return (
<li key={c.label + i}>
<a className='eh-item' href={c.href ?? '#'}>
{c.image ? <img className='eh-thumb' src={c.image} alt={c.imageAlt ?? ''} width={72} height={72} loading='lazy' decoding='async' /> : null}
<span className='eh-item-text'>
<span className='eh-item-label'>{c.label}</span>
{meta ? <span className='eh-item-meta'>{meta}</span> : null}
</span>
</a>
</li>
);
})}
</ul>
);
const thumbs = categories.filter((c) => c.image).slice(0, 3);
const renderOffer = () =>
offer ? (
<div className='eh-offer'>
{thumbs.length > 0 ? (
<div className='eh-fan' aria-hidden='true'>
{thumbs.map((c, i) => (
<img key={i} src={c.image} alt='' width={64} height={64} loading='lazy' decoding='async' />
))}
</div>
) : null}
<p className='eh-offer-title'>{offer.headline}</p>
<p className='eh-price'>
<span className='eh-price-num'>{offer.price}</span>
{offer.anchor ? <span className='eh-price-anchor'>{offer.anchor}</span> : null}
</p>
{renderCta('block')}
{offer.quiet ? <p className='eh-quiet'>{offer.quietHref ? <a href={offer.quietHref}>{offer.quiet}</a> : offer.quiet}</p> : null}
</div>
) : null;
let progressEl: React.ReactNode = null;
if (progress) {
const goal = Math.max(1, progress.goal);
const cur = Math.min(Math.max(0, progress.current), goal);
const done = cur >= goal;
const f = progress.format ?? ((n: number) => String(n));
const vars = { current: f(cur), goal: f(goal), remaining: f(goal - cur) };
const raw = done && progress.doneMessage ? progress.doneMessage : progress.message;
const msg = typeof raw === 'string' ? fill(raw, vars) : raw;
const segments = Number.isInteger(goal) && goal <= 8 ? goal : 1;
progressEl = (
<div className='eh-progress' data-done={done ? 'true' : undefined}>
<div className='eh-progress-inner'>
<p className='eh-progress-text'>
{done ? (
<span className='eh-done' aria-hidden='true'>
<Check size={14} strokeWidth={3} />
</span>
) : (
<Package className='eh-inline' size={18} strokeWidth={2.5} aria-hidden='true' />
)}
{msg}
{progress.linkLabel && progress.href ? (
<a className='eh-link' href={progress.href}>
{progress.linkLabel}
</a>
) : null}
</p>
<div className='eh-track' role='progressbar' aria-label={copy.progressAria} aria-valuemin={0} aria-valuemax={goal} aria-valuenow={cur} aria-valuetext={fill(copy.progressLabel, vars)}>
{Array.from({ length: segments }, (_, i) => {
const w = segments === 1 ? (cur / goal) * 100 : Math.min(100, Math.max(0, (cur - i) * 100));
return (
<span key={i} className='eh-seg'>
<i style={{ width: w + '%' }} />
</span>
);
})}
</div>
</div>
</div>
);
}
const logo = (
<a className='eh-logo' href={homeHref} aria-label={fill(copy.brandHome, { brand: brandName })}>
{logoImage ? (
<img className='eh-logo-img' src={logoImage} alt={logoAlt ?? brandName} />
) : (
<>
<span className='eh-logo-mark' aria-hidden='true'>
<Filter size={20} strokeWidth={2.5} />
</span>
<span className='eh-logo-word'>{brandName}</span>
</>
)}
</a>
);
const cartBody = (
<>
<ShoppingBag size={24} strokeWidth={2.5} aria-hidden='true' />
{count > 0 ? (
<span key={count} className='eh-badge' aria-hidden='true'>
{count > 99 ? '99+' : count}
</span>
) : null}
</>
);
const cart = cartHref ? (
<a className='eh-icon-btn eh-cart' href={cartHref} aria-label={cartLabel}>
{cartBody}
</a>
) : (
<button type='button' className='eh-icon-btn eh-cart' aria-label={cartLabel} onClick={() => onCart?.()}>
{cartBody}
</button>
);
return (
<header
className={'cf-ecom-header' + (className ? ' ' + className : '')}
data-state={state}
data-sticky={sticky ? 'true' : undefined}
data-scrolled={scrolled ? 'true' : undefined}
>
<style>{CSS}</style>
{promo ? (
<div className='eh-promo'>
<p>
<Tag className='eh-inline' size={16} strokeWidth={2.5} aria-hidden='true' />
<span className='eh-promo-long'>{promo.text}</span>
<span className='eh-promo-short'>{promo.short ?? promo.text}</span>
{promo.linkLabel && promo.href ? <a href={promo.href}>{promo.linkLabel}</a> : null}
</p>
</div>
) : null}
<div className='eh-bar'>
<div className='eh-bar-inner'>
<div className='eh-left'>
<button
ref={menuBtnRef}
type='button'
className='eh-icon-btn eh-menu-btn'
aria-label={copy.menu}
aria-expanded={drawerOpen}
aria-controls={ids.drawer}
onClick={() => setDrawerOpen(true)}
>
<Menu size={24} strokeWidth={2.5} aria-hidden='true' />
</button>
<nav className='eh-nav' aria-label={copy.navLabel}>
<ul className='eh-nav-list'>
{categories.length > 0 ? (
<li
ref={shopRef}
onBlur={(e) => {
const next = e.relatedTarget as Node | null;
if (next && !e.currentTarget.contains(next)) setPanelOpen(false);
}}
>
<button
ref={triggerRef}
type='button'
className='eh-navlink'
aria-expanded={panelOpen}
aria-controls={ids.panel}
onClick={() => {
setSearchOpen(false);
setPanelOpen((o) => !o);
}}
onKeyDown={onTriggerKey}
>
{shopLabel}
<ChevronDown size={18} strokeWidth={2.5} aria-hidden='true' />
</button>
<div id={ids.panel} className='eh-panel' data-offer={offer ? 'true' : 'false'} hidden={!panelOpen}>
<div className='eh-panel-list'>
<p className='eh-panel-title'>{copy.dropdownTitle}</p>
{renderItems()}
</div>
{renderOffer()}
</div>
</li>
) : null}
{links.map((l) => (
<li key={l.label}>
<a className='eh-navlink' href={l.href ?? '#'}>
{l.label}
</a>
</li>
))}
</ul>
</nav>
</div>
{logo}
<div className='eh-actions'>
<button
ref={searchBtnRef}
type='button'
className='eh-icon-btn eh-search-btn'
aria-label={copy.search}
aria-expanded={searchOpen}
aria-controls={ids.search}
onClick={toggleSearch}
>
<Search size={24} strokeWidth={2.5} aria-hidden='true' />
</button>
<a className='eh-icon-btn eh-account' href={accountHref} aria-label={copy.account}>
<User size={24} strokeWidth={2.5} aria-hidden='true' />
</a>
{cart}
{renderCta('bar')}
</div>
</div>
</div>
<div id={ids.search} className='eh-search' hidden={!searchOpen}>
<div className='eh-search-inner'>{renderSearch('panel')}</div>
</div>
{progressEl}
<div className='eh-dock'>{renderCta('block')}</div>
<span className='eh-sr' aria-live='polite'>
{announce}
</span>
<AnimatePresence>
{drawerOpen ? (
<motion.div
key='scrim'
className='eh-scrim'
aria-hidden='true'
onClick={closeDrawer}
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: reduce ? 0 : 0.2 }}
/>
) : null}
{drawerOpen ? (
<motion.div
key='drawer'
ref={drawerRef}
id={ids.drawer}
className='eh-drawer'
role='dialog'
aria-modal='true'
aria-label={copy.menuTitle}
onKeyDown={trapFocus}
initial={reduce ? { opacity: 0 } : { x: '-100%' }}
animate={reduce ? { opacity: 1 } : { x: 0 }}
exit={reduce ? { opacity: 0 } : { x: '-100%' }}
transition={{ duration: reduce ? 0.01 : 0.28, ease: [0.2, 0.7, 0.2, 1] }}
>
<div className='eh-drawer-head'>
{logo}
<button type='button' className='eh-icon-btn' data-autofocus='' aria-label={copy.closeMenu} onClick={closeDrawer}>
<X size={24} strokeWidth={2.5} aria-hidden='true' />
</button>
</div>
<div className='eh-drawer-body'>
{renderSearch('drawer')}
{renderOffer()}
{categories.length > 0 ? (
<div>
<h2 className='eh-drawer-title'>{copy.drawerTitle}</h2>
{renderItems()}
</div>
) : null}
<ul className='eh-rows'>
{links.map((l) => (
<li key={l.label}>
<a className='eh-row' href={l.href ?? '#'}>
{l.label}
</a>
</li>
))}
<li>
<a className='eh-row' href={accountHref}>
<User size={20} strokeWidth={2.5} aria-hidden='true' />
{copy.account}
</a>
</li>
</ul>
</div>
</motion.div>
) : null}
</AnimatePresence>
</header>
);
}
export default EcomHeader;
function fill(template: string, vars: Record<string, string>) {
return template.replace(/[{]([a-zA-Z]+)[}]/g, (m: string, k: string) => (k in vars ? vars[k] : m));
}
function fillNodes(template: string, vars: Record<string, React.ReactNode>) {
return template.split(/([{][a-zA-Z]+[}])/).map((part, i) => {
const m = /^[{]([a-zA-Z]+)[}]$/.exec(part);
return m && m[1] in vars ? <React.Fragment key={i}>{vars[m[1]]}</React.Fragment> : part;
});
}
const DEFAULT_PROMO: EcomHeaderPromo = {
text: 'The guide, workbook and checklist together: $47, vs. $97 bought one by one.',
short: 'All 3 funnel tools for $47',
linkLabel: 'Shop the kit',
href: '#kit',
};
const DEFAULT_CATEGORIES: EcomHeaderCategory[] = [
{ label: 'Plan every page of your funnel', name: 'Funnel Planning Guide', value: '$49', href: '#planning-guide' },
{ label: 'Write the headline and the offer', name: 'Page Copy Workbook', value: '$29', href: '#copy-workbook' },
{ label: 'Check every link before launch', name: 'Launch Checklist', value: '$19', href: '#launch-checklist' },
];
const DEFAULT_LINKS: EcomHeaderLink[] = [{ label: 'Free workshop', href: '#workshop' }];
const DEFAULT_OFFER: EcomHeaderOffer = {
headline: (
<>
Get <mark>all three tools</mark> in one kit
</>
),
price: '$47',
anchor: 'vs. $97 when you buy them one by one',
quiet: 'or pick the one tool you need',
};
const DEFAULT_CTA = { label: 'Get All 3 for $47' };
const DEFAULT_SUGGESTIONS = ['Headline', 'Launch checklist', 'Funnel plan'];
const DEFAULT_COPY: EcomHeaderCopy = {
brandHome: '{brand} home',
menu: 'Open menu',
closeMenu: 'Close menu',
menuTitle: 'Shop menu',
navLabel: 'Shop',
search: 'Search the store',
searchLabel: 'Search the store',
searchPlaceholder: 'Try “headline”',
searchSubmit: 'Search',
searchError: 'Type what you’re looking for first.',
closeSearch: 'Close search',
popular: 'Popular:',
account: 'Your account',
cartEmpty: 'Cart, empty',
cartOne: 'Cart, 1 item',
cartMany: 'Cart, {count} items',
dropdownTitle: 'Everything you need to launch',
drawerTitle: 'Pick the step you’re stuck on',
itemMeta: '{name} · {value} on its own',
progressLabel: '{current} of {goal}',
progressAria: 'Your progress',
};
const CSS = `
.cf-ecom-header{--eh-wrap:1240px;--eh-gutter:clamp(16px,5vw,48px);--eh-shadow:var(--shadow,oklch(0.22 0.03 260));--eh-line:oklch(from var(--ink,#101828) l c h / 0.12);--eh-well:color-mix(in oklch,var(--ink,#101828) 4%,var(--card,#ffffff));--eh-chip:color-mix(in oklch,var(--ink,#101828) 6%,var(--card,#ffffff));--eh-focus:var(--field-focus,var(--accent,#2563eb));position:relative;z-index:30;font-family:var(--font-body,system-ui,sans-serif);color:var(--ink,#101828)}
.cf-ecom-header[data-sticky='true']{position:sticky;top:0;z-index:40;transition:box-shadow .16s ease}
.cf-ecom-header *,.cf-ecom-header *::before,.cf-ecom-header *::after{box-sizing:border-box}
.cf-ecom-header .eh-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-ecom-header .eh-inline{display:inline-block;vertical-align:-0.15em;margin-inline-end:0.4em}
.cf-ecom-header .eh-promo{background:var(--band,#1b2b4a);color:var(--band-ink,#ffffff)}
.cf-ecom-header .eh-promo p{margin:0 auto;max-width:var(--eh-wrap);padding:10px var(--eh-gutter);text-align:center;font-size:0.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-ecom-header .eh-promo strong{font-weight:800}
.cf-ecom-header .eh-promo a{color:var(--band-ink,#ffffff);font-weight:800;margin-inline-start:0.6em;white-space:nowrap;text-decoration:underline;text-decoration-thickness:1.5px;text-decoration-color:oklch(from var(--band-ink,#ffffff) l c h / 0.5);text-underline-offset:0.2em;border-radius:4px}
.cf-ecom-header .eh-promo a:hover{text-decoration-color:var(--band-ink,#ffffff)}
.cf-ecom-header .eh-promo a:focus-visible{outline:2px solid var(--band-ink,#ffffff);outline-offset:3px}
.cf-ecom-header .eh-promo-short{display:none}
.cf-ecom-header .eh-bar{background:var(--card,#ffffff);border-bottom:1px solid var(--eh-line);transition:box-shadow .16s ease}
.cf-ecom-header[data-scrolled='true']{box-shadow:var(--shadow-md,0 1px 2px oklch(from var(--eh-shadow) l c h / 0.22),0 4px 10px -2px oklch(from var(--eh-shadow) l c h / 0.2))}
.cf-ecom-header .eh-bar-inner{position:relative;max-width:var(--eh-wrap);margin-inline:auto;padding-inline:var(--eh-gutter);min-height:84px;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:24px}
.cf-ecom-header .eh-left{display:flex;align-items:center;min-width:0}
.cf-ecom-header .eh-nav-list{list-style:none;margin:0;padding:0;display:flex;align-items:center;gap:4px}
.cf-ecom-header .eh-navlink{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border:0;border-radius:var(--radius,12px);background:transparent;color:var(--ink,#101828);font:inherit;font-size:1rem;font-weight:var(--button-weight,700);line-height:1.2;white-space:nowrap;text-decoration:none;cursor:pointer;transition:background .16s ease}
.cf-ecom-header .eh-navlink:hover{background:var(--eh-chip)}
.cf-ecom-header .eh-navlink[aria-expanded='true']{background:color-mix(in oklch,var(--accent,#2563eb) 10%,var(--card,#ffffff))}
.cf-ecom-header .eh-navlink svg{transition:transform .16s ease}
.cf-ecom-header .eh-navlink[aria-expanded='true'] svg{transform:rotate(180deg)}
.cf-ecom-header :is(.eh-navlink,.eh-icon-btn,.eh-logo,.eh-item,.eh-chip,.eh-btn2,.eh-row,.eh-quiet a):focus-visible{outline:3px solid var(--eh-focus);outline-offset:2px}
.cf-ecom-header .eh-logo{justify-self:center;display:inline-flex;align-items:center;gap:12px;color:var(--ink,#101828);text-decoration:none;border-radius:8px;min-width:0}
.cf-ecom-header .eh-logo-mark{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:999px;background:var(--accent-fill,var(--accent,#2563eb));color:var(--accent-fill-ink,var(--card,#ffffff))}
.cf-ecom-header .eh-logo-word{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;white-space:nowrap}
.cf-ecom-header .eh-logo-img{display:block;height:44px;width:auto;max-width:200px;object-fit:contain}
.cf-ecom-header .eh-actions{display:flex;align-items:center;justify-content:flex-end;gap:4px;min-width:0}
.cf-ecom-header .eh-icon-btn{position:relative;flex:none;display:inline-grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:999px;background:transparent;color:var(--ink,#101828);font-weight:var(--button-weight,800);cursor:pointer;text-decoration:none;transition:background .16s ease}
.cf-ecom-header .eh-icon-btn:hover,.cf-ecom-header .eh-icon-btn[aria-expanded='true']{background:var(--eh-chip)}
.cf-ecom-header .eh-badge{position:absolute;top:0;right:-2px;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--accent-fill,var(--accent,#2563eb));color:var(--accent-fill-ink,var(--card,#ffffff));font-size:0.875rem;font-weight:800;line-height:22px;text-align:center;font-variant-numeric:tabular-nums;outline:2px solid var(--card,#ffffff);animation:cf-eh-pop .3s cubic-bezier(.2,.7,.2,1) both}
.cf-ecom-header .eh-cta.eh-cta-bar{margin-inline-start:12px;min-height:52px;padding:0 24px;font-size:1.125rem}
.cf-ecom-header .eh-menu-btn{display:none}
.cf-ecom-header .eh-cta{--eh-b:var(--button-bg,var(--cta,#d92d20));--eh-b2:var(--button-bg-2,var(--cta-2,#b42318));display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 22px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--eh-b) calc(l + 0.04) c h),oklch(from var(--eh-b2) calc(l - 0.02) c h));color:var(--button-ink,var(--cta-ink,#ffffff));font-family:var(--button-font,var(--font-display,inherit));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:1.0625rem;line-height:1.15;white-space:nowrap;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--eh-b) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--eh-b) calc(l - 0.16) c h),0 1px 2px oklch(from var(--eh-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--eh-shadow) l c h / 0.45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease;-webkit-tap-highlight-color:transparent}
.cf-ecom-header .eh-cta:not(:disabled):hover,.cf-ecom-header[data-state='hover'] .eh-cta{background:linear-gradient(oklch(from var(--eh-b) calc(l - 0.01) c h),oklch(from var(--eh-b2) calc(l - 0.07) c h));transform:translateY(-1px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--eh-b) calc(l + 0.12) c h / 0.7),inset 0 -3px 0 oklch(from var(--eh-b) calc(l - 0.2) c h),0 1px 2px oklch(from var(--eh-shadow) l c h / 0.34),0 12px 20px -8px oklch(from var(--eh-shadow) l c h / 0.5))}
.cf-ecom-header .eh-cta:not(:disabled):active,.cf-ecom-header[data-state='active'] .eh-cta{transform:translateY(1px);background:linear-gradient(oklch(from var(--eh-b) calc(l - 0.04) c h),oklch(from var(--eh-b2) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--eh-b) calc(l - 0.22) c h / 0.55),inset 0 -2px 0 oklch(from var(--eh-b) calc(l - 0.16) c h),0 1px 2px oklch(from var(--eh-shadow) l c h / 0.3)}
.cf-ecom-header .eh-cta:focus-visible{outline:3px solid var(--eh-focus);outline-offset:3px}
.cf-ecom-header .eh-cta:disabled{cursor:not-allowed;opacity:0.55;box-shadow:inset 0 -3px 0 oklch(from var(--eh-b) calc(l - 0.16) c h)}
.cf-ecom-header .eh-cta--block{width:100%;min-height:56px;padding:0 20px;font-size:1.125rem;white-space:normal;text-wrap:balance;text-align:center}
.cf-ecom-header .eh-btn2{--eh-s:var(--button-2-bg,var(--secondary,#e9edf3));flex:none;display:inline-flex;align-items:center;justify-content:center;min-height:56px;padding:0 24px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--eh-s);color:var(--button-2-ink,var(--secondary-ink,#101828));font-family:var(--button-font,var(--font-display,inherit));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:1.0625rem;line-height:1.15;white-space:nowrap;cursor:pointer;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--eh-shadow) l c h / 0.2)));transition:background .16s ease,transform .16s ease}
.cf-ecom-header .eh-btn2:hover{background:oklch(from var(--eh-s) calc(l - 0.04) c h)}
.cf-ecom-header .eh-btn2:active{transform:translateY(1px)}
.cf-ecom-header .eh-search{background:var(--card,#ffffff);border-bottom:1px solid var(--eh-line);animation:cf-eh-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-ecom-header .eh-search[hidden]{display:none}
.cf-ecom-header .eh-search-inner{max-width:880px;margin-inline:auto;padding:20px var(--eh-gutter) 24px}
.cf-ecom-header .eh-form{margin:0}
.cf-ecom-header .eh-form-row{display:flex;align-items:flex-start;gap:12px}
.cf-ecom-header .eh-field-wrap{position:relative;flex:1 1 auto;min-width:0}
.cf-ecom-header .eh-field-icon{position:absolute;left:18px;top:18px;color:color-mix(in oklch,var(--field-ink,#101828) 65%,var(--field,#ffffff));pointer-events:none}
.cf-ecom-header .eh-field{display:block;width:100%;height:56px;margin:0;padding:0 16px 0 50px;border:1px solid var(--field-border,color-mix(in oklch,var(--ink,#101828) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));background:var(--field,#ffffff);color:var(--field-ink,#101828);font:inherit;font-size:1.0625rem;font-weight:500;-webkit-appearance:none;appearance:none;transition:border-color .16s ease,box-shadow .16s ease}
.cf-ecom-header .eh-field::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.cf-ecom-header .eh-field::placeholder{color:color-mix(in oklch,var(--field-ink,#101828) 65%,var(--field,#ffffff));opacity:1}
.cf-ecom-header .eh-field:focus{outline:none;border-color:var(--eh-focus);box-shadow:0 0 0 3px oklch(from var(--eh-focus) l c h / 0.35)}
.cf-ecom-header .eh-field[aria-invalid='true']{border-color:var(--danger,#c0362c)}
.cf-ecom-header .eh-field[aria-invalid='true']:focus{box-shadow:0 0 0 3px oklch(from var(--danger,#c0362c) l c h / 0.3)}
.cf-ecom-header .eh-error{margin:8px 0 0;color:var(--danger,#c0362c);font-size:0.9375rem;font-weight:600;line-height:1.4;text-wrap:pretty}
.cf-ecom-header .eh-close-search{margin-top:6px}
.cf-ecom-header .eh-chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:16px}
.cf-ecom-header .eh-chips-label{margin-inline-end:4px;font-size:0.9375rem;font-weight:600;color:var(--muted,#475467)}
.cf-ecom-header .eh-chip{min-height:32px;padding:4px 12px;border:0;border-radius:999px;background:var(--eh-chip);color:var(--ink,#101828);font:inherit;font-size:0.875rem;font-weight:var(--button-weight,800);line-height:1.2;cursor:pointer;transition:background .16s ease}
.cf-ecom-header .eh-chip:hover{background:color-mix(in oklch,var(--ink,#101828) 11%,var(--card,#ffffff))}
.cf-ecom-header .eh-progress{--eh-link:color-mix(in oklch,var(--link,var(--accent,#2563eb)) 85%,var(--ink,#101828));background:var(--eh-well);border-bottom:1px solid var(--eh-line)}
.cf-ecom-header .eh-progress-inner{max-width:var(--eh-wrap);margin-inline:auto;padding:10px var(--eh-gutter);display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 20px}
.cf-ecom-header .eh-progress-text{margin:0;text-align:center;font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--ink,#101828);text-wrap:pretty}
.cf-ecom-header .eh-progress-text .eh-inline{color:var(--accent,#2563eb)}
.cf-ecom-header .eh-done{--eh-done-glyph:var(--status-glyph,#fff);display:inline-grid;place-items:center;width:20px;height:20px;border-radius:999px;background:var(--success,#15803d);color:var(--eh-done-glyph);vertical-align:-0.3em;margin-inline-end:0.45em}
.cf-ecom-header .eh-link{margin-inline-start:0.5em;color:var(--eh-link,var(--link,var(--accent,#2563eb)));font-weight:800;white-space:nowrap;text-decoration:underline;text-decoration-color:oklch(from var(--eh-link,var(--link,var(--accent,#2563eb))) l c h / 0.45);text-underline-offset:0.18em;border-radius:4px}
.cf-ecom-header .eh-link:hover{color:oklch(from var(--eh-link,var(--link,var(--accent,#2563eb))) calc(l - 0.08) c h);text-decoration-color:currentColor}
.cf-ecom-header .eh-link:focus-visible{outline:3px solid var(--eh-focus);outline-offset:2px}
.cf-ecom-header .eh-track{flex:none;display:flex;gap:4px;width:180px;height:8px}
.cf-ecom-header .eh-seg{flex:1;height:100%;border-radius:999px;overflow:hidden;background:color-mix(in oklch,var(--ink,#101828) 14%,var(--card,#ffffff))}
.cf-ecom-header .eh-seg>i{display:block;height:100%;border-radius:inherit;background:var(--accent-fill,var(--accent,#2563eb));transition:width .45s cubic-bezier(.2,.7,.2,1)}
.cf-ecom-header .eh-progress[data-done='true'] .eh-seg>i{background:var(--success,#15803d)}
.cf-ecom-header .eh-dock{display:none;background:var(--card,#ffffff);border-bottom:1px solid var(--eh-line)}
.cf-ecom-header .eh-panel{position:absolute;top:calc(100% + 8px);left:var(--eh-gutter);z-index:5;width:min(880px,calc(100% - 2 * var(--eh-gutter)));display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr);gap:24px;align-items:stretch;padding:24px;background:var(--card,#ffffff);color:var(--ink,#101828);text-align:left;border:1px solid var(--card-border,oklch(from var(--ink,#101828) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--eh-shadow) l c h / 0.22),0 12px 24px -8px oklch(from var(--eh-shadow) l c h / 0.32)));animation:cf-eh-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-ecom-header .eh-panel[hidden]{display:none}
.cf-ecom-header .eh-panel[data-offer='false']{grid-template-columns:minmax(0,1fr);width:min(520px,calc(100% - 2 * var(--eh-gutter)))}
.cf-ecom-header .eh-panel-list{display:flex;flex-direction:column;min-width:0;padding-top:4px}
.cf-ecom-header .eh-panel-title,.cf-ecom-header .eh-drawer-title{margin:0 0 12px;padding-inline:12px;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.01em);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--ink,#101828);text-wrap:balance}
.cf-ecom-header .eh-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.cf-ecom-header .eh-items>li{display:block;min-width:0}
.cf-ecom-header .eh-item{display:flex;align-items:flex-start;gap:16px;padding:12px;border-radius:12px;color:var(--ink,#101828);text-decoration:none;transition:background .16s ease}
.cf-ecom-header .eh-item:hover{background:var(--eh-well)}
.cf-ecom-header .eh-item:hover .eh-item-label{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:0.18em;text-decoration-color:oklch(from var(--ink,#101828) l c h / 0.3)}
.cf-ecom-header .eh-thumb{flex:none;display:block;width:72px;height:72px;border-radius:8px;object-fit:cover;object-position:center;background:var(--eh-well)}
.cf-ecom-header .eh-item-text{flex:1 1 auto;display:flex;flex-direction:column;gap:4px;min-width:0;padding-top:8px}
.cf-ecom-header .eh-item-label{font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:800;line-height:1.25;text-wrap:pretty}
.cf-ecom-header .eh-item-meta{font-size:0.9375rem;font-weight:500;line-height:1.4;color:var(--muted,#475467);text-wrap:pretty}
.cf-ecom-header .eh-item-value{font-weight:800;color:var(--ink,#101828);font-variant-numeric:tabular-nums}
.cf-ecom-header .eh-offer{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-width:0;padding:24px;border-radius:12px;background:var(--eh-well)}
.cf-ecom-header .eh-fan{display:flex;justify-content:center;margin-bottom:16px;padding-inline-start:12px}
.cf-ecom-header .eh-fan img{display:block;width:64px;height:64px;margin-inline-start:-12px;border-radius:8px;object-fit:cover;background:var(--card,#ffffff);outline:3px solid var(--eh-well);filter:drop-shadow(0 1px 2px oklch(from var(--eh-shadow) l c h / 0.22))}
.cf-ecom-header .eh-offer-title{margin:0 0 12px;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--ink,#101828);text-wrap:balance}
.cf-ecom-header .eh-offer-title mark{color:var(--marker-ink,#14171f);background:linear-gradient(transparent 6%,oklch(from var(--marker,#fae37c) l c h / 0.9) 6% 94%,transparent 94%);padding:0 0.14em;margin:0 -0.04em;border-radius:0.18em 0.32em 0.22em 0.3em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-ecom-header .eh-price{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 12px;margin:0 0 20px}
.cf-ecom-header .eh-price-num{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,3.4vw,3rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--ink,#101828)}
.cf-ecom-header .eh-price-anchor{max-width:11rem;text-align:left;font-size:0.9375rem;font-weight:600;line-height:1.35;color:var(--muted,#475467);text-wrap:pretty}
.cf-ecom-header .eh-quiet{margin:12px 0 0;font-size:0.9375rem;line-height:1.4;color:var(--muted,#475467);text-wrap:pretty}
.cf-ecom-header .eh-quiet a{color:inherit;text-decoration:underline;text-underline-offset:0.18em;text-decoration-color:oklch(from var(--muted,#475467) l c h / 0.5);border-radius:4px}
.cf-ecom-header .eh-quiet a:hover{text-decoration-color:currentColor}
.cf-ecom-header .eh-scrim{position:fixed;inset:0;z-index:60;background:oklch(from var(--band,#1b2b4a) l c h / 0.6)}
.cf-ecom-header .eh-drawer{position:fixed;top:0;bottom:0;left:0;z-index:61;width:min(400px,88vw);display:flex;flex-direction:column;background:var(--card,#ffffff);color:var(--ink,#101828);box-shadow:var(--shadow-lg,0 2px 4px oklch(from var(--eh-shadow) l c h / 0.22),0 12px 24px -8px oklch(from var(--eh-shadow) l c h / 0.32))}
.cf-ecom-header .eh-drawer-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:68px;padding:12px 12px 12px 20px;border-bottom:1px solid var(--eh-line)}
.cf-ecom-header .eh-drawer-head .eh-logo-mark{width:36px;height:36px}
.cf-ecom-header .eh-drawer-head .eh-logo-word{font-size:1.3125rem}
.cf-ecom-header .eh-drawer-head .eh-logo-img{height:36px;max-width:160px}
.cf-ecom-header .eh-drawer-body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:20px 20px 32px;display:grid;align-content:start;gap:24px}
.cf-ecom-header .eh-drawer .eh-form-row{gap:8px}
.cf-ecom-header .eh-drawer .eh-btn2{padding:0 16px}
.cf-ecom-header .eh-drawer .eh-drawer-title{padding-inline:0;margin:0 0 8px;font-size:1.3125rem}
.cf-ecom-header .eh-drawer .eh-items{margin-inline:-12px}
.cf-ecom-header .eh-drawer .eh-thumb{width:64px;height:64px}
.cf-ecom-header .eh-drawer .eh-item-text{padding-top:4px}
.cf-ecom-header .eh-rows{list-style:none;margin:0 -12px;padding:0;display:grid}
.cf-ecom-header .eh-row{display:flex;align-items:center;gap:12px;min-height:52px;padding:0 12px;border-radius:10px;color:var(--ink,#101828);font-size:1.0625rem;font-weight:700;text-decoration:none;transition:background .16s ease}
.cf-ecom-header .eh-row:hover{background:var(--eh-well)}
@media (max-width:1179.98px){
.cf-ecom-header .eh-nav,.cf-ecom-header .eh-search-btn,.cf-ecom-header .eh-account,.cf-ecom-header .eh-panel{display:none}
.cf-ecom-header .eh-cta.eh-cta-bar{min-height:44px;padding:0 18px;font-size:1rem;margin-inline-start:8px}
.cf-ecom-header .eh-menu-btn{display:inline-grid}
.cf-ecom-header .eh-bar-inner{min-height:64px;gap:12px}
.cf-ecom-header .eh-left{margin-inline-start:-10px}
.cf-ecom-header .eh-actions{margin-inline-end:-10px}
.cf-ecom-header .eh-bar .eh-logo-mark{width:36px;height:36px}
.cf-ecom-header .eh-bar .eh-logo-word{font-size:1.3125rem}
.cf-ecom-header .eh-bar .eh-logo-img{height:36px;max-width:160px}
}
@media (min-width:860px) and (max-width:1179.98px){
.cf-ecom-header .eh-actions{margin-inline-end:0}
}
@media (max-width:859.98px){
.cf-ecom-header .eh-cta.eh-cta-bar{display:none}
.cf-ecom-header .eh-dock{display:block;padding:12px var(--eh-gutter)}
.cf-ecom-header .eh-dock .eh-cta{display:flex;max-width:480px;margin-inline:auto;min-height:52px}
}
@media (max-width:640px){
.cf-ecom-header .eh-promo-long{display:none}
.cf-ecom-header .eh-promo-short{display:inline}
.cf-ecom-header .eh-search-inner{padding:16px var(--eh-gutter) 20px}
.cf-ecom-header .eh-form-row{gap:8px}
.cf-ecom-header .eh-btn2{padding:0 16px}
.cf-ecom-header .eh-logo{gap:8px}
}
@keyframes cf-eh-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-eh-pop{from{transform:scale(.9)}to{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){
.cf-ecom-header .eh-panel,.cf-ecom-header .eh-search,.cf-ecom-header .eh-badge{animation:none}
.cf-ecom-header[data-sticky='true']{transition:none}
.cf-ecom-header .eh-cta,.cf-ecom-header .eh-btn2,.cf-ecom-header .eh-bar,.cf-ecom-header .eh-navlink,.cf-ecom-header .eh-navlink svg,.cf-ecom-header .eh-icon-btn,.cf-ecom-header .eh-item,.cf-ecom-header .eh-chip,.cf-ecom-header .eh-field,.cf-ecom-header .eh-row,.cf-ecom-header .eh-seg>i{transition:none}
.cf-ecom-header .eh-cta:not(:disabled):hover,.cf-ecom-header[data-state='hover'] .eh-cta,.cf-ecom-header .eh-cta:not(:disabled):active,.cf-ecom-header[data-state='active'] .eh-cta,.cf-ecom-header .eh-btn2:active{transform:none}
}
`;
pieces/nav/ecom-header/specimen.tsx 72 lines
// Specimen: the store header for The Funnel Starter Kit, with the bundle price in the strip, a live cart count and kit progress.
import * as React from 'react';
import { EcomHeader } from '../ecom-header';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled', 'error'];
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled' | 'error';
export default function EcomHeaderSpecimen({ state = 'default' }: { state?: SpecimenState }) {
const s = defaults.sample;
const benefits = ['Plan every page of your funnel', 'Write the headline and the offer', 'Check every link before launch'];
const hrefs = ['#planning-guide', '#copy-workbook', '#launch-checklist'];
const categories = s.items.map((item, i) => ({
label: benefits[i] ?? item.detail,
name: item.name,
value: item.value,
href: hrefs[i] ?? '#kit',
image: slot('item-' + (i + 1), item.image),
imageAlt: item.imageAlt,
}));
const logo = slot('logo', '');
return (
<EcomHeader
state={state}
sticky
brandName='Funnel Starter'
logoImage={logo || undefined}
logoAlt='Funnel Starter'
promo={{
text: (
<>
The guide, workbook and checklist together: <strong>{s.price}</strong>, vs. {s.regularPrice} bought one by one.
</>
),
short: (
<>
All 3 funnel tools for <strong>{s.price}</strong>
</>
),
linkLabel: 'Shop the kit',
href: '#kit',
}}
shopLabel='Shop by goal'
categories={categories}
links={[{ label: 'Free workshop', href: '#workshop' }]}
offer={{
headline: (
<>
Get <mark>all three tools</mark> in one kit
</>
),
price: s.price,
anchor: <>vs. {s.regularPrice} when you buy them one by one</>,
quiet: 'or pick the one tool you need',
}}
cta={{ label: 'Get All 3 for ' + s.price }}
cartCount={2}
progress={{
current: 2,
goal: 3,
message: 'You’ve picked {current} of {goal} kit tools. Get all three together for ' + s.price + '.',
linkLabel: 'Switch to the full kit',
href: '#kit',
}}
onAction={() => undefined}
onCart={() => undefined}
onSearch={() => undefined}
/>
);
}
| Name | Type | Details |
|---|---|---|
brandName OptionalEcomHeader |
string |
|
logoImage OptionalEcomHeader |
string |
|
logoAlt OptionalEcomHeader |
string |
|
homeHref OptionalEcomHeader |
string |
|
promo OptionalEcomHeader |
EcomHeaderPromo | null |
|
shopLabel OptionalEcomHeader |
string |
|
categories OptionalEcomHeader |
EcomHeaderCategory[] |
|
links OptionalEcomHeader |
EcomHeaderLink[] |
|
offer OptionalEcomHeader |
EcomHeaderOffer | null |
|
cta OptionalEcomHeader |
{ label: string; href?: string } |
|
cartCount OptionalEcomHeader |
number |
|
cartHref OptionalEcomHeader |
string |
|
onCart OptionalEcomHeader |
() => void |
|
accountHref OptionalEcomHeader |
string |
|
onAction OptionalEcomHeader |
() => void |
|
progress OptionalEcomHeader |
EcomHeaderProgress | null |
|
onSearch OptionalEcomHeader |
(query: string) => void |
|
searchSuggestions OptionalEcomHeader |
string[] |
|
sticky OptionalEcomHeader |
boolean |
|
copy OptionalEcomHeader |
Partial<EcomHeaderCopy> |
|
state OptionalEcomHeader |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
className OptionalEcomHeader |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
logo- The brand’s logo mark.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB