/**
 * Header layout: Drop — .espt-block-header.is-preset-drop
 *
 * Streetwear drops: a brand top bar with the drop message and a live
 * countdown, then one white row with a big uppercase wordmark, a bold menu,
 * a search-panel toggle, the account as a word and the cart as a solid ink
 * "ব্যাগ (2)" button. Colours come from the --hd-* tokens (the theme's
 * settings) unless the block sets its own.
 */

.espt-block-header.is-preset-drop {
	--hd-drop-line: color-mix(in srgb, var(--hd-ink) 90%, transparent);
	--hd-search-btn: var(--hd-ink);
	--hd-chip-bg: transparent;
	--hd-chip-on: var(--hd-ink);
	--hd-chip-on-ink: #fff;
}

/* ------------------------------------------------------------- top bar */

.espt-block-header.is-preset-drop .esptb-hd-topbar {
	background: var(--topbar-bg, var(--hd-brand));
	color: var(--topbar-color, #fff);
}

.espt-block-header.is-preset-drop .esptb-hd-tb-l .esptb-hd-tb-note {
	font-weight: 700;
	letter-spacing: 0.01em;
}

/* A running message takes a line of its own on phones. */
.espt-block-header.is-preset-drop .esptb-hd-topbar.has-marquee .esptb-hd-tb-l { flex: 1 1 100%; }

.espt-block-header.is-preset-drop .esptb-hd-count {
	gap: 4px 12px;
	justify-content: center;
}

/* The clock in a darker box with a ticking dot in front. */
.espt-block-header.is-preset-drop .esptb-hd-count-clock {
	align-items: center;
	background: rgba(0, 0, 0, 0.2);
	border-radius: 2px;
	display: inline-flex;
	gap: 7px;
	padding: 2px 8px;
	white-space: nowrap;
}

.espt-block-header.is-preset-drop .esptb-hd-count-clock::before {
	background: currentColor;
	border-radius: 999px;
	content: "";
	flex: none;
	height: 7px;
	width: 7px;
}

/* A 40px hit area for the link (18px line + 2 × 11px) without making the
   bar taller — the negative margins give the height back. */
.espt-block-header.is-preset-drop .esptb-hd-count-link {
	font-weight: 700;
	margin-bottom: -11px;
	margin-top: -11px;
	padding-bottom: 11px;
	padding-top: 11px;
}

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

.espt-block-header.is-preset-drop .esptb-hd-main { background: var(--header-bg, var(--hd-bg)); }

/* The bottom border line is a hard ink rule in this layout. */
.espt-block-header.is-preset-drop.is-divider .esptb-hd { border-bottom-color: var(--hd-drop-line); }

/* Phones and tablets: burger · wordmark · icons. */
.espt-block-header.is-preset-drop .esptb-hd-burger { order: 0; }

/* 40px tap targets on phones too (the base draws them 36 × 38 below 768). */
.espt-block-header.is-preset-drop .esptb-hd-burger,
.espt-block-header.is-preset-drop .esptb-hd-icons > .espt-icon-btn {
	height: 40px;
	width: 40px;
}

.espt-block-header.is-preset-drop .esptb-hd-logo-text {
	font-family: var(--hd-display);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.05;
	text-transform: uppercase;
}

.espt-block-header.is-preset-drop .esptb-hd-main .esptb-hd-logo-text { font-size: clamp(24px, 8.2vw, 32px); }
.espt-block-header.is-preset-drop .esptb-hd-logo-panel .esptb-hd-logo-text { font-size: 24px; }

.espt-block-header.is-preset-drop .esptb-hd-icons { gap: 4px; }
.espt-block-header.is-preset-drop .espt-icon-btn { border-radius: 2px; }

/* Account and wishlist wait for room (the phone menu carries the account). */
.espt-block-header.is-preset-drop .esptb-hd-acct,
.espt-block-header.is-preset-drop .esptb-hd-icons > .espt-account-btn,
.espt-block-header.is-preset-drop .esptb-hd-icons > .esptb-hd-wish { display: none; }

/* Search toggle: the magnifier turns into a filled ✕ while the panel is open. */
.espt-block-header.is-preset-drop .esptb-hd-sbtn-o { align-items: center; display: inline-flex; }
.espt-block-header.is-preset-drop .esptb-hd-sbtn-x { align-items: center; display: none; }
.espt-block-header.is-preset-drop .esptb-hd-sbtn[aria-expanded="true"] .esptb-hd-sbtn-o { display: none; }
.espt-block-header.is-preset-drop .esptb-hd-sbtn[aria-expanded="true"] .esptb-hd-sbtn-x { display: inline-flex; }

.espt-block-header.is-preset-drop .esptb-hd-sbtn[aria-expanded="true"] {
	background: var(--hd-ink);
	color: #fff;
}

/* Cart, "word + count" look: a solid ink rectangle, the count inline as (2).
   The link's ::after covers the whole box, so all of it opens the cart. */
.espt-block-header.is-preset-drop .esptb-hd-cart.is-cart-label {
	background: var(--hd-ink);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	gap: 5px;
	line-height: 1;
	min-height: 40px;
	padding: 8px 12px;
	transition: background-color 0.15s ease;
}

.espt-block-header.is-preset-drop .esptb-hd-cart.is-cart-label:hover { background: var(--hd-brand); }

/* Its own rule: a browser without :has() drops only this one. */
.espt-block-header.is-preset-drop .esptb-hd-cart.is-cart-label:has(.espt-cart-btn:focus-visible) { background: var(--hd-brand); }

.espt-block-header.is-preset-drop .esptb-hd-cart.is-cart-label .espt-cart-btn,
.espt-block-header.is-preset-drop .esptb-hd-cart.is-cart-label .espt-cart-btn:hover {
	background: transparent;
	border-radius: 0;
	color: inherit;
	font-size: inherit;
	height: auto;
	min-height: 0;
	position: static;
	width: auto;
}

.espt-block-header.is-preset-drop .esptb-hd-cart.is-cart-label .espt-cart-btn::after {
	content: "";
	inset: 0;
	position: absolute;
}

.espt-block-header.is-preset-drop .esptb-hd-cart.is-cart-label .espt-cart-count {
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-size: inherit;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	height: auto;
	min-width: 0;
	padding: 0;
	position: static;
}

.espt-block-header.is-preset-drop .esptb-hd-cart.is-cart-label .espt-cart-count::before { content: "("; }
.espt-block-header.is-preset-drop .esptb-hd-cart.is-cart-label .espt-cart-count::after { content: ")"; }

/* -------------------------------------------------------- search panel */

.espt-block-header.is-preset-drop .esptb-hd-dsearch {
	background: var(--header-bg, var(--hd-bg));
	border-bottom: 1px solid var(--hd-drop-line);
	border-top: 1px solid var(--hd-drop-line);
	box-shadow: 0 24px 40px -24px rgba(15, 23, 42, 0.45);
	color: var(--hd-ink);
	left: 0;
	position: absolute;
	right: 0;
	top: 100%;
	z-index: 992;
}

.espt-block-header.is-preset-drop .esptb-hd-dsearch[hidden] { display: none; }

.espt-block-header.is-preset-drop .esptb-hd-dsearch > .esptb-hd-bar {
	display: block;
	padding-bottom: 16px;
	padding-top: 16px;
}

.espt-block-header.is-preset-drop .esptb-hd-dsearch-in {
	display: grid;
	gap: 12px;
	grid-template-columns: minmax(0, 1fr);
	margin: 0 auto;
	max-width: 760px;
}

.espt-block-header.is-preset-drop .esptb-hd-dsearch-in > * { min-width: 0; }

.espt-block-header.is-preset-drop .esptb-hd-dsearch .espt-search-form input[type="search"] {
	background: var(--search-bg, var(--header-bg, var(--hd-bg)));
	border: 2px solid var(--search-line, var(--hd-drop-line));
	border-radius: var(--search-radius, 0px);
	font-size: 16px;
	font-weight: 600;
	padding-bottom: 12px;
	padding-top: 12px;
}

.espt-block-header.is-preset-drop .esptb-hd-dsearch .espt-search-form.has-btn-text .button:hover { background: var(--hd-brand); }

.espt-block-header.is-preset-drop .esptb-hd-dsearch-chips ul { padding: 2px; }

.espt-block-header.is-preset-drop .esptb-hd-dsearch-chips a {
	border: 1px solid var(--hd-drop-line);
	border-radius: 0;
	font-weight: 700;
	min-height: 40px;
	padding: 0 14px;
}

/* ------------------------------------------------ phone menu (full screen) */

.espt-block-header.is-preset-drop.is-panel-style-fullscreen .esptb-nav-panel > ul > li > a {
	font-family: var(--hd-display);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.01em;
	text-transform: uppercase;
}

.espt-block-header.is-preset-drop .esptb-hd-q,
.espt-block-header.is-preset-drop .esptb-hd-ctiles a { border-radius: 4px; }

.espt-block-header.is-preset-drop .esptb-hd-ptabs,
.espt-block-header.is-preset-drop .esptb-hd-ptabs button { border-radius: 2px; }

.espt-block-header.is-preset-drop .esptb-hd-ptabs button[aria-selected="true"] { background: var(--panel-active, var(--hd-ink)); }

/* ---------------------------------------------- slimmer once it's stuck */

.espt-block-header.is-preset-drop.is-sticky-shrink.is-stuck .esptb-hd-main .esptb-hd-logo-text { font-size: clamp(22px, 7vw, 26px); }

@media (max-width: 767px) {
	/* Stuck on a phone: the countdown stays, the message steps aside. */
	.espt-block-header.is-preset-drop.is-sticky-shrink.is-stuck .esptb-hd-topbar.has-count .esptb-hd-tb-l { display: none; }
}

/* =====================================================================
   600px up: the account word, the wishlist, a roomier bag button
   ===================================================================== */

@media (min-width: 600px) {
	.espt-block-header.is-preset-drop .esptb-hd-icons > .esptb-hd-wish { display: inline-flex; }

	.espt-block-header.is-preset-drop .esptb-hd-acct {
		align-items: center;
		display: inline-flex;
		flex-direction: row;
		min-height: 40px;
		padding: 0 8px;
	}

	.espt-block-header.is-preset-drop .esptb-hd-acct-s { display: none; }

	.espt-block-header.is-preset-drop .esptb-hd-acct-b {
		font-size: 14px;
		font-weight: 700;
		white-space: nowrap;
	}

	.espt-block-header.is-preset-drop .esptb-hd-acct:hover {
		color: var(--menu-hover, var(--hd-link-h));
		text-decoration: underline;
		text-decoration-thickness: 2px;
		text-underline-offset: 5px;
	}

	.espt-block-header.is-preset-drop .esptb-hd-cart.is-cart-label {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* =====================================================================
   Tablet: one side of the top bar alone sits in the middle
   ===================================================================== */

@media (min-width: 768px) {
	.espt-block-header.is-preset-drop .esptb-hd-topbar .esptb-hd-bar > :only-child {
		justify-content: center;
		margin-left: auto;
		margin-right: auto;
	}

	.espt-block-header.is-preset-drop .esptb-hd-topbar.has-marquee .esptb-hd-tb-l { flex: 1 1 0%; }
	.espt-block-header.is-preset-drop .esptb-hd-topbar.has-marquee .esptb-hd-tb-r { flex: none; }

	.espt-block-header.is-preset-drop .esptb-hd-dsearch .espt-search-form input[type="search"] { font-size: 18px; }
}

/* =====================================================================
   Desktop: wordmark · bold menu · icons
   ===================================================================== */

@media (min-width: 1024px) {
	.espt-block-header.is-preset-drop .esptb-hd-main .esptb-hd-bar { gap: 20px; }
	.espt-block-header.is-preset-drop .esptb-hd-main .esptb-hd-logo-text { font-size: 38px; }
	.espt-block-header.is-preset-drop.is-sticky-shrink.is-stuck .esptb-hd-main .esptb-hd-logo-text { font-size: 30px; }

	/* 1024–1279 is tight: the menu gap stays modest so it wraps late. */
	.espt-block-header.is-preset-drop .esptb-nav-main .espt-hd-menu {
		gap: 2px min(var(--menu-gap, 32px), 20px);
		justify-content: flex-start;
	}

	.espt-block-header.is-preset-drop .esptb-nav:not(.esptb-nav-panel) .espt-hd-menu > li > a {
		font-size: var(--menu-size, 14px);
		font-weight: 700;
	}

	.espt-block-header.is-preset-drop .esptb-hd-icons { gap: 6px; }

	/* Dropdowns: square, ink-edged, a hard offset shadow. */
	.espt-block-header.is-preset-drop .esptb-nav:not(.esptb-nav-panel) .sub-menu {
		border-color: var(--hd-drop-line);
		border-radius: 0;
		box-shadow: 5px 5px 0 var(--hd-drop-line);
	}

	.espt-block-header.is-preset-drop .esptb-nav:not(.esptb-nav-panel) .sub-menu a { border-radius: 0; }

	.espt-block-header.is-preset-drop .esptb-hd-dsearch > .esptb-hd-bar {
		padding-bottom: 22px;
		padding-top: 22px;
	}
}

/* 1024–1279: the account word gives way to its icon. */
@media (min-width: 1024px) and (max-width: 1279px) {
	.espt-block-header.is-preset-drop .esptb-hd-acct { display: none; }
	.espt-block-header.is-preset-drop .esptb-hd-icons > .espt-account-btn { display: inline-flex; }
}

@media (min-width: 1280px) {
	.espt-block-header.is-preset-drop .esptb-hd-main .esptb-hd-bar { gap: 32px; }
	.espt-block-header.is-preset-drop .esptb-nav-main .espt-hd-menu { gap: 2px var(--menu-gap, 32px); }
}

/* Motion only for shoppers who have not asked for less. */
@media (prefers-reduced-motion: no-preference) {
	.espt-block-header.is-preset-drop .esptb-hd-main .esptb-hd-logo-text { transition: font-size 0.25s ease; }
	.espt-block-header.is-preset-drop .esptb-hd-count-clock::before { animation: esptb-hd-drop-pulse 1.6s ease-in-out infinite; }
}

@keyframes esptb-hd-drop-pulse {
	50% { opacity: 0.3; }
}
