/**
 * Header layout: Bazaar — .espt-block-header.is-preset-bazaar
 *
 * Phone-first marketplace. One deep brand band (the block's header colour,
 * else the theme's dark primary) with white type: the burger (below 1024),
 * a bold wordmark, an app-style white search with an accent button — a row
 * of its own on phones and tablets, inline from 1024 — the right-hand top
 * bar items as small white links (from 768), the account and the cart with
 * an accent bubble. A deeper band of translucent category chips scrolls
 * sideways on every screen; a thin white strip carries the top bar's words.
 *
 * Everything that paints the band is scoped to its own rows, so the phone
 * menu (a white sheet inside the same root) keeps its own colours.
 */

.espt-block-header.is-preset-bazaar {
	--bz-band: var(--header-bg, var(--hd-brand-dark));
	--bz-deep: color-mix(in srgb, var(--header-bg, var(--hd-brand-dark)) 82%, #000);
	--bz-ink: var(--menu-color, #fff);
	--bz-icon: var(--icons-color, #fff);
	--bz-hover: rgba(255, 255, 255, 0.12);
	--hd-chip-bg: rgba(255, 255, 255, 0.12);
	--hd-chip-ink: var(--menu-color, #fff);
	--hd-chip-on: #fff;
	--hd-chip-on-ink: var(--hd-brand-dark);
	--hd-cart-bg: #fff;
	--hd-cart-ink: var(--hd-brand-dark);
	--hd-search-btn: var(--hd-accent);
}

/* ---------------------------------------------------------------- band */

.espt-block-header.is-preset-bazaar .esptb-hd { background: var(--bz-band); }

/* ------------------------------------------------------------ main row */

/* Phones and tablets: burger · wordmark · icons on top, the search on a row
   of its own. A grid, so a long wordmark wraps inside its column instead of
   pushing the icons onto a line of their own. */
.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-bar {
	display: grid;
	gap: 8px 6px;
	grid-template-columns: auto minmax(0, 1fr) auto;
}

.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-burger {
	color: var(--bz-icon);
	grid-column: 1;
	grid-row: 1;
	height: 40px;
	margin-left: -6px;
	width: 40px;
}

.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-burger:hover { background: var(--bz-hover); }

.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-logo {
	color: var(--bz-ink);
	grid-column: 2;
	grid-row: 1;
	justify-self: start;
	margin-right: 0;
	max-width: 100%;
}

.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-logo-text {
	font-family: var(--hd-display);
	font-size: clamp(19px, 5.4vw, 23px);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.15;
}

.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-icons {
	gap: 2px;
	grid-column: 3;
	grid-row: 1;
	justify-self: end;
	margin-left: 0;
}

/* The search: a white field with an accent button. Ink text inside, so the
   live-search results never inherit the band's white. */
.espt-block-header.is-preset-bazaar .esptb-hd-searchbar {
	color: var(--hd-ink);
	display: block;
	grid-column: 1 / -1;
	grid-row: 2;
	min-width: 0;
}

.espt-block-header.is-preset-bazaar .esptb-hd-searchbar .espt-search-form input[type="search"] {
	background: var(--search-bg, #fff);
	border: 1px solid var(--search-line, transparent);
	border-radius: var(--search-radius, 8px);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
	color: var(--hd-ink);
	font-size: 16px; /* 16px: phones do not zoom in on focus */
	min-height: 46px;
	padding-left: 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.espt-block-header.is-preset-bazaar .esptb-hd-searchbar .espt-search-form:not(.has-btn-text) input[type="search"] { padding-right: 56px; }

.espt-block-header.is-preset-bazaar .esptb-hd-searchbar .espt-search-form input[type="search"]::placeholder {
	color: var(--hd-muted);
	opacity: 1;
}

.espt-block-header.is-preset-bazaar .esptb-hd-searchbar .espt-search-form input[type="search"]:focus {
	border-color: var(--hd-search-btn);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--hd-search-btn) 45%, transparent);
	outline: none;
}

/* Accent button, ink figures (the worded button too, when the block sets one). */
.espt-block-header.is-preset-bazaar .esptb-hd-searchbar .espt-search-form .button,
.espt-block-header.is-preset-bazaar .esptb-hd-searchbar .espt-search-form button[type="submit"] {
	background: var(--hd-search-btn);
	border-radius: max(0px, calc(var(--search-radius, 8px) - 3px));
	bottom: 3px;
	color: var(--hd-ink);
	height: auto;
	right: 3px;
	top: 3px;
	transform: none;
	transition: background 0.15s ease;
}

.espt-block-header.is-preset-bazaar .esptb-hd-searchbar .espt-search-form:not(.has-btn-text) .button,
.espt-block-header.is-preset-bazaar .esptb-hd-searchbar .espt-search-form:not(.has-btn-text) button[type="submit"] { width: 46px; }

.espt-block-header.is-preset-bazaar .esptb-hd-searchbar .espt-search-form .button:hover,
.espt-block-header.is-preset-bazaar .esptb-hd-searchbar .espt-search-form button[type="submit"]:hover {
	background: color-mix(in srgb, var(--hd-search-btn) 84%, #000);
	color: var(--hd-ink);
}

.espt-block-header.is-preset-bazaar .esptb-hd-searchbar .espt-search-form .button svg {
	height: 19px;
	width: 19px;
}

/* The right-hand top-bar items: small white links (from 768). */
.espt-block-header.is-preset-bazaar .esptb-bz-links {
	--hd-tb-icon: var(--hd-accent);
	align-items: center;
	display: none;
	flex: none;
	gap: 2px;
	margin-right: 6px;
}

.espt-block-header.is-preset-bazaar .esptb-bz-links .esptb-hd-tb-item {
	border-radius: 8px;
	color: var(--bz-ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	min-height: 40px;
	padding: 0 10px;
	transition: background 0.15s ease;
	white-space: nowrap;
}

.espt-block-header.is-preset-bazaar .esptb-bz-links a.esptb-hd-tb-item:hover {
	background: var(--bz-hover);
	opacity: 1;
	text-decoration: none;
}

/* Account, wishlist and compare icons: white on the band. */
.espt-block-header.is-preset-bazaar .esptb-hd-main .espt-icon-btn:not(.espt-cart-btn) {
	color: var(--bz-icon);
	height: 40px;
	width: 40px;
}

.espt-block-header.is-preset-bazaar .esptb-hd-main .espt-icon-btn:not(.espt-cart-btn):hover {
	background: var(--bz-hover);
	color: var(--menu-hover, var(--bz-icon));
}

.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-compare { display: none; }

/* The cart — the layout's own look: a white icon, the count in an accent
   bubble with ink figures. The other looks read on the band too. */
.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-cart.is-cart-icon .espt-cart-btn {
	color: var(--bz-icon);
	height: 40px;
	width: 40px;
}

.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-cart.is-cart-icon .espt-cart-btn:hover {
	background: var(--bz-hover);
	color: var(--menu-hover, var(--bz-icon));
}

.espt-block-header.is-preset-bazaar .esptb-hd-main .espt-cart-count {
	background: var(--cart-bubble, var(--hd-accent));
	color: var(--hd-ink);
	font-size: 11px;
	height: 19px;
	min-width: 19px;
}

.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-cart.is-cart-icon .espt-cart-count,
.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-cart.is-cart-round .espt-cart-count {
	box-shadow: 0 0 0 2px var(--bz-band);
	right: -3px;
	top: -2px;
}

.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-cart.is-cart-round .espt-cart-btn:hover {
	background: color-mix(in srgb, #fff 84%, var(--hd-accent));
	color: var(--hd-cart-ink);
}

.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-cart.is-cart-label { color: var(--bz-icon); }

.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-cart-label {
	align-items: center;
	display: inline-flex;
	min-height: 40px;
}

.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-cart.is-cart-label .espt-cart-btn { min-height: 40px; }

@media (max-width: 599px) {
	.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-cart.is-cart-total { color: var(--bz-icon); }
}

/* Phones: the chip row is the menu — the burger's panel carries it. */
@media (max-width: 767px) {
	.espt-block-header.is-preset-bazaar .esptb-hd-sub-chips { display: none; }
}

/* A white ring for keyboard focus on the dark band. */
.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-burger:focus-visible,
.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-logo:focus-visible,
.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-icons a:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ---------------------------------------------------------- chips row */

.espt-block-header.is-preset-bazaar .esptb-hd-sub-chips { background: var(--bz-deep); }

.espt-block-header.is-preset-bazaar .esptb-hd-sub-chips .esptb-hd-bar {
	padding-bottom: 2px;
	padding-top: 2px;
}

.espt-block-header.is-preset-bazaar .esptb-bz-chips {
	flex: 1 1 auto;
	min-width: 0;
}

/* The row scrolls sideways; a soft fade at the end hints there is more. */
.espt-block-header.is-preset-bazaar .esptb-bz-chips ul {
	gap: clamp(6px, calc(var(--menu-gap, 20px) * 0.4), 12px);
	-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
	mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
	padding-right: 28px;
}

/* A 40px tap target; the pill itself is painted 30px tall behind the text. */
.espt-block-header.is-preset-bazaar .esptb-bz-chips a {
	background: transparent;
	border-radius: 999px;
	color: var(--hd-chip-ink);
	font-size: calc(var(--menu-size, 15px) * 0.9);
	font-weight: 600;
	isolation: isolate;
	line-height: 1.2;
	min-height: 40px;
	padding: 0 14px;
	position: relative;
	transition: color 0.15s ease;
}

.espt-block-header.is-preset-bazaar .esptb-bz-chips a::before {
	background: var(--hd-chip-bg);
	border-radius: 999px;
	content: "";
	inset: 5px 0;
	position: absolute;
	transition: background 0.15s ease;
	z-index: -1;
}

.espt-block-header.is-preset-bazaar .esptb-bz-chips a:hover {
	background: transparent;
	color: var(--hd-chip-ink);
}

.espt-block-header.is-preset-bazaar .esptb-bz-chips a:hover::before { background: rgba(255, 255, 255, 0.22); }

/* The current chip — or the first one when no chip is the current page —
   turns white with the band's colour for its text. */
.espt-block-header.is-preset-bazaar .esptb-bz-chips a.is-current {
	background: transparent;
	color: var(--hd-chip-on-ink);
}

.espt-block-header.is-preset-bazaar .esptb-bz-chips a.is-current::before { background: var(--hd-chip-on); }

.espt-block-header.is-preset-bazaar .esptb-bz-chips ul:not(:has(.is-current)) > li:first-child > a { color: var(--hd-chip-on-ink); }

.espt-block-header.is-preset-bazaar .esptb-bz-chips ul:not(:has(.is-current)) > li:first-child > a::before { background: var(--hd-chip-on); }

.espt-block-header.is-preset-bazaar .esptb-bz-chips a:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -3px;
}

.espt-block-header.is-preset-bazaar.is-nav-uppercase .esptb-bz-chips a {
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* ------------------------------------------------------ the note strip */

.espt-block-header.is-preset-bazaar .esptb-hd-sub-note {
	--hd-tb-icon: var(--hd-brand);
	background: var(--topbar-bg, #fff);
	color: var(--topbar-color, var(--hd-muted));
	font-size: var(--topbar-size, 12.5px);
	font-weight: 500;
	line-height: 1.4;
}

.espt-block-header.is-preset-bazaar .esptb-hd-sub-note .esptb-hd-bar {
	flex-wrap: wrap;
	justify-content: center;
	min-height: 30px;
	padding-bottom: 5px;
	padding-top: 5px;
	row-gap: 2px;
}

.espt-block-header.is-preset-bazaar .esptb-bz-note,
.espt-block-header.is-preset-bazaar .esptb-bz-side {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 2px 14px;
	justify-content: center;
	min-width: 0;
}

.espt-block-header.is-preset-bazaar .esptb-bz-note {
	flex: 0 1 auto;
	text-align: center;
}

.espt-block-header.is-preset-bazaar .esptb-bz-note .esptb-hd-marquee { flex: 1 1 100%; min-width: 0; }

/* Running words: sized from zero, so the track's full length never pushes
   the contacts onto a line of their own — the note takes what is left. */
.espt-block-header.is-preset-bazaar .esptb-bz-note.is-running { flex: 1 1 0%; }

/* Phone, chat, socials and login wait for 768 (the phone menu has them). */
.espt-block-header.is-preset-bazaar .esptb-bz-side {
	display: none;
	flex: none;
}

.espt-block-header.is-preset-bazaar .esptb-hd-sub-note.is-bare { display: none; }

.espt-block-header.is-preset-bazaar .esptb-hd-sub-note a.esptb-hd-tb-item,
.espt-block-header.is-preset-bazaar .esptb-hd-sub-note .esptb-hd-tb-link,
.espt-block-header.is-preset-bazaar .esptb-hd-sub-note .esptb-hd-count-link {
	align-items: center;
	color: var(--topbar-color, var(--hd-ink));
	display: inline-flex;
	font-weight: 600;
}

.espt-block-header.is-preset-bazaar .esptb-bz-note a.esptb-hd-tb-item,
.espt-block-header.is-preset-bazaar .esptb-bz-note .esptb-hd-count-link { min-height: 40px; }

/* The contacts beside the words (tablets are touch screens too): 40px hit
   areas — WhatsApp / Messenger are bare icons, so 40px wide as well — that
   give their extra height back, so the strip stays thin. */
.espt-block-header.is-preset-bazaar .esptb-hd-sub-note .esptb-hd-tb-link {
	justify-content: center;
	margin-bottom: -5px;
	margin-top: -5px;
	min-height: 40px;
	min-width: 40px;
}

.espt-block-header.is-preset-bazaar .esptb-hd-sub-note .esptb-hd-tb-link .espt-ic { color: var(--hd-tb-icon); }
.espt-block-header.is-preset-bazaar .esptb-hd-sub-note .esptb-hd-count-clock { color: var(--topbar-color, var(--hd-ink)); }

/* The login pill stays 30px to the eye; its hit area reaches 40px. */
.espt-block-header.is-preset-bazaar .esptb-hd-sub-note .esptb-hd-login {
	background: var(--hd-soft);
	color: var(--hd-brand-dark);
	min-height: 30px;
	position: relative;
}

.espt-block-header.is-preset-bazaar .esptb-hd-sub-note .esptb-hd-login::after {
	content: "";
	inset: -5px 0;
	position: absolute;
}

.espt-block-header.is-preset-bazaar .esptb-hd-sub-note .esptb-hd-login:hover { background: color-mix(in srgb, var(--hd-brand) 16%, #fff); }

/* =====================================================================
   Tablet — the first seller link joins the icons; the strip's contacts show.
   ===================================================================== */

@media (min-width: 768px) {
	.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-bar { column-gap: 12px; }
	.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-icons { gap: 4px; }
	.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-compare { display: inline-flex; }

	.espt-block-header.is-preset-bazaar .esptb-bz-links { display: inline-flex; }

	/* 768–1279: the first link only — the rest wait for 1280. */
	.espt-block-header.is-preset-bazaar .esptb-bz-links > :nth-child(n + 2) { display: none; }

	.espt-block-header.is-preset-bazaar .esptb-hd-sub-note.is-bare { display: block; }
	.espt-block-header.is-preset-bazaar .esptb-hd-sub-note.is-bare .esptb-hd-bar { justify-content: flex-end; }
	.espt-block-header.is-preset-bazaar .esptb-bz-side { display: flex; }
	.espt-block-header.is-preset-bazaar .esptb-hd-sub-note.has-side .esptb-hd-bar { justify-content: space-between; }

	.espt-block-header.is-preset-bazaar .esptb-hd-sub-note.has-side .esptb-bz-note {
		justify-content: flex-start;
		text-align: left;
	}
}

/* =====================================================================
   Desktop — one row: wordmark · search · links · account · cart.
   ===================================================================== */

@media (min-width: 1024px) {
	.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-bar {
		display: flex;
		flex-wrap: nowrap;
		gap: 20px;
	}

	.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-logo {
		flex: 0 1 auto;
		max-width: 28%;
		order: 0;
	}

	.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-logo-text { font-size: 25px; }

	/* The search takes the room between the wordmark and the icons. */
	.espt-block-header.is-preset-bazaar .esptb-hd-searchbar {
		flex: 1 1 auto;
		margin: 0 auto;
		max-width: 680px;
		min-width: 240px;
		order: 0;
	}

	.espt-block-header.is-preset-bazaar .esptb-hd-searchbar .espt-search-form input[type="search"] {
		font-size: 15px;
		min-height: 42px;
	}

	.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-icons {
		flex: none;
		margin-left: auto;
		order: 0;
	}
}

@media (min-width: 1280px) {
	.espt-block-header.is-preset-bazaar .esptb-hd-main .esptb-hd-bar { gap: 24px; }
	.espt-block-header.is-preset-bazaar .esptb-bz-links > :nth-child(n + 2) { display: inline-flex; }
}
