/* curren-storefront — desktop header from the redesign (≥992px). Below that Martfury's header shows. */
.csf-topbar, .csf-header { display: none; }

@media (min-width: 992px) {
	.csf-topbar { display: block; background: #0E0F11; color: #E9E5DA; font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif; font-size: 14px; }
	.csf-topbar__in { max-width: 1440px; margin: 0 auto; height: 40px; padding: 0 clamp(24px, 5.5vw, 80px); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
	.csf-topbar a { color: #FF8A8F !important; font-weight: 600; text-decoration: none; }

	/* Martfury's two-row desktop header is replaced by the row below. */
	#site-header .header-main,
	#site-header .main-menu { display: none !important; }
	#site-header { padding: 0 !important; border: 0 !important; background: #fff; }

	.csf-header { display: block; background: #fff; border-bottom: 1px solid #E4E0D6; font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif; }
	.csf-header__in { max-width: 1440px; margin: 0 auto; height: 88px; padding: 0 clamp(24px, 5.5vw, 80px); display: flex; align-items: center; gap: clamp(20px, 2.8vw, 40px); box-sizing: border-box; }
	.csf-header__logo { flex: 0 0 auto; display: flex; align-items: center; text-decoration: none; }
	.csf-header .csf-header__logo img { height: 44px !important; width: auto !important; max-width: 240px !important; max-height: none !important; display: block; margin: 0 !important; padding: 0 !important; object-fit: contain; }
	.csf-header__logo span { font-size: 28px; font-weight: 700; color: #141414; }

	.csf-header__nav { flex: 0 1 auto; min-width: 0; }
	.csf-header__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: clamp(16px, 2vw, 28px); }
	.csf-header__menu li { margin: 0; padding: 0; white-space: nowrap; }
	.csf-header__menu a { display: block; padding: 8px 0; font-size: 16px; font-weight: 500; color: #141414 !important; text-decoration: none; border-bottom: 2px solid transparent; line-height: 1.3; }
	.csf-header__menu a:hover,
	.csf-header__menu .current-menu-item > a:not([href*="#"]) { border-bottom-color: #E6212C; }

	.csf-header__tools { flex: 1 1 auto; display: flex; justify-content: flex-end; align-items: center; gap: 12px; min-width: 0; }
	.csf-header__search { position: relative; flex: 0 1 280px; min-width: 160px; margin: 0; }
	.csf-header__search input[type=search] { width: 100%; height: 44px; box-sizing: border-box; border: 1px solid #D6D1C4; border-radius: 8px; padding: 0 44px 0 14px; font-family: inherit; font-size: 15px; background: #FAF8F3; color: #141414; margin: 0; box-shadow: none; }
	.csf-header__search input[type=search]:focus { outline: 2px solid #E6212C; outline-offset: 1px; border-color: #E6212C; background: #fff; }
	.csf-header__search button { position: absolute; right: 0; top: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: #5E5A52; padding: 0; cursor: pointer; }
	.csf-header__search button:hover { color: #141414; background: none; }

	.csf-header__icon { position: relative; flex: 0 0 44px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid #D6D1C4; border-radius: 8px; color: #141414 !important; text-decoration: none; }
	.csf-header__icon:hover { border-color: #141414; }
	.csf-cart-count { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: #E6212C; color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
	.csf-cart-count[hidden] { display: none; }
}

/* Narrow desktops: the search box folds into an icon (it opens over the menu when clicked),
   so the menu never wraps or runs into the tools. */
@media (min-width: 992px) and (max-width: 1239px) {
	.csf-header__menu a { font-size: 15px; }
	.csf-header__icon[aria-label="আমার অ্যাকাউন্ট"] { display: none; }
	.csf-header__tools { flex: 0 0 auto; }
	.csf-header__search { flex: 0 0 44px; min-width: 0; height: 44px; }
	.csf-header__search input[type=search] { width: 44px; padding: 0; color: transparent; cursor: pointer; border-radius: 8px; }
	.csf-header__search input[type=search]::placeholder { color: transparent; }
	.csf-header__search button { pointer-events: none; }
	.csf-header__search:focus-within input[type=search] { position: absolute; right: 0; top: 0; width: 300px; padding: 0 44px 0 14px; color: #141414; cursor: text; z-index: 5; background: #fff; }
	.csf-header__search:focus-within input[type=search]::placeholder { color: #8F897B; }
	.csf-header__search:focus-within button { pointer-events: auto; z-index: 6; }
}

/* checkout header: logo · "নিরাপদ চেকআউট" · help number */
@media (min-width: 992px) {
	.csf-header--checkout .csf-header__in { height: 84px; justify-content: space-between; }
	.csf-header__secure { display: flex; align-items: center; gap: 28px; font-size: 15px; color: #3F3B34; }
	.csf-header__secure span { display: flex; align-items: center; gap: 8px; }
	.csf-header__secure a { color: #B3121B !important; font-weight: 600; text-decoration: none; }
}

/* "সব ব্র্যান্ড ▾" dropdown (includes/brand-menu.php) */
.csf-brand-menu { position: relative; }
.csf-brand-menu__btn { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 8px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none !important; font-family: inherit; font-size: 16px; font-weight: 500; line-height: 1.3; color: #141414 !important; cursor: pointer; }
.csf-brand-menu__btn svg { transition: transform .15s; }
.csf-brand-menu__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.csf-brand-menu.current-menu-ancestor > .csf-brand-menu__btn,
.csf-brand-menu__btn:hover { border-bottom-color: #E6212C; }
.csf-header__menu .csf-brand-menu__list { position: absolute; top: 100%; left: -14px; z-index: 1000; min-width: 200px; margin: 6px 0 0; padding: 6px; list-style: none; background: #fff; border: 1px solid #E4E0D6; border-radius: 10px; box-shadow: 0 10px 28px rgba(17, 18, 20, .12); }
.csf-header__menu .csf-brand-menu__list:not([hidden]) { display: block; }
.csf-header__menu .csf-brand-menu__list::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; } /* keeps hover alive across the gap */
.csf-header__menu .csf-brand-menu__list a { display: block; padding: 9px 12px !important; border: 0 !important; border-radius: 6px; font-size: 15px; }
.csf-header__menu .csf-brand-menu__list a:hover,
.csf-header__menu .csf-brand-menu__list .current-menu-item > a { background: #FDEDEE; color: #B3121B !important; }
@media (min-width: 992px) and (hover: hover) {
	.csf-header__menu .csf-brand-menu:hover > .csf-brand-menu__list { display: block; }
}
@media (min-width: 992px) and (max-width: 1239px) {
	.csf-brand-menu__btn { font-size: 15px; }
}
/* With "সব ব্র্যান্ড" the menu has eight items: tighten it on the narrowest desktops so it keeps clear of the tools. */
@media (min-width: 992px) and (max-width: 1119px) {
	.csf-header__menu { gap: 12px; }
	.csf-header__menu a,
	.csf-brand-menu__btn { font-size: 14.5px; }
}
@media (min-width: 1240px) and (max-width: 1365px) {
	.csf-header__menu { gap: 18px; }
}
/* The menu keeps its width; the search box (min 160px) gives way instead of the menu running under it. */
@media (min-width: 992px) {
	.csf-header__nav { flex-shrink: 0; }
}
