/* ============================================================
   BLANC' — HEADER mới (Task header)
   - Dùng độc lập (hiển thị mọi trang) -> tự nạp font + css này
     trong snippet header.bwt; không phụ thuộc scope .bl-home.
   - Topbar nâu (#3D271A) + thanh nav trắng; mobile = logo + hamburger.
   ============================================================ */
.bl-header, .bl-header * { box-sizing: border-box; }
.bl-header { font-family: 'EuclidCircularAVN', 'Manrope', sans-serif; }
.bl-header a { text-decoration: none; }
.bl-header .container { width: 100%; max-width: 1470px; margin: 0 auto; padding: 0 15px; }

/* -- Topbar link (desktop) -- */
.bl-header__top { background: #3D271A; }
.bl-header__top .container { display: flex; align-items: center; gap: clamp(20px, 3vw, 56px); height: 50px; justify-content: center; }
.bl-header__toplink { color: #fff; font-weight: 400; white-space: nowrap; font-size: clamp(13px, 1vw, 21px); transition: opacity var(--bl-dur-fast, 180ms) ease; }
.bl-header__toplink:hover { opacity: .75; }

/* -- Sticky header: cả header bám đỉnh; khi cuộn topbar thu lại, chỉ còn nav -- */
.bl-header { position: sticky; top: 0; z-index: 9999; }
.bl-header__top { overflow: hidden; transition: max-height .3s ease; max-height: 60px; }
.bl-header.is-scrolled .bl-header__top { max-height: 0; }

/* -- Main header -- */
.bl-header__main { background: #fff; transition: box-shadow .3s ease; }
.bl-header.is-scrolled .bl-header__main { box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.bl-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: clamp(64px, 6vw, 100px); }
.bl-header__logo { flex: none; font-weight: 700; letter-spacing: 1px; color: #3D271A; font-size: clamp(22px, 2vw, 32px); }
.bl-header__logo img { height: clamp(22px, 2vw, 34px); width: auto; display: block; }

.bl-header__nav { display: flex; align-items: center; gap: clamp(12px, 1.5vw, 30px); flex-wrap: nowrap; }
.bl-header__navlink { position: relative; color: #3D271A; font-weight: 400; white-space: nowrap; font-size: clamp(14px, 1.05vw, 21px); padding: 6px 0; text-transform: uppercase; }
.bl-header__navlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: #3D271A; transform: scaleX(0); transform-origin: left; transition: transform 200ms cubic-bezier(.16,1,.3,1); }
.bl-header__navlink:hover::after, .bl-header__navlink.is-active::after { transform: scaleX(1); }

.bl-header__actions { flex: none; display: flex; align-items: center; gap: clamp(12px, 1vw, 20px); }
.bl-header__icon { color: #3D271A; display: inline-flex; line-height: 0; transition: opacity var(--bl-dur-fast, 180ms) ease; }
.bl-header__icon:hover { opacity: .65; }
.bl-header__icon svg { width: clamp(18px, 1.4vw, 22px); height: clamp(18px, 1.4vw, 22px); }
.bl-header__icon img { height: clamp(18px, 1.4vw, 22px); width: auto; display: block; }
.bl-header__cart { position: relative; }
.bl-header__cart-count { position: absolute; top: -8px; right: -10px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 16px; font-size: 10px; font-weight: 400; display: flex; align-items: center; justify-content: center; }

/* -- Hamburger (mobile) -- */
.bl-header__burger { display: none; flex-direction: column; gap: 4px; width: 26px; height: 20px; justify-content: center; background: none; border: 0; cursor: pointer; padding: 0; }
.bl-header__burger span { display: block; height: 2px; width: 100%; background: #231F20; border-radius: 2px; }

/* -- Drawer (mobile menu) -- */
.bl-header__overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); opacity: 0; visibility: hidden; z-index: 998; transition: opacity .3s ease; }
.bl-header__overlay.is-open { opacity: 1; visibility: visible; }
.bl-header__drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(82%, 340px); background: #fff; z-index: 999; transform: translateX(100%); transition: transform .32s cubic-bezier(.16,1,.3,1); display: flex; flex-direction: column; overflow-y: auto; padding: 20px 22px 32px; }
.bl-header__drawer.is-open { transform: translateX(0); }
.bl-header__drawer-close { align-self: flex-end; background: none; border: 0; cursor: pointer; color: #3D271A; font-size: 26px; line-height: 1; padding: 0 0 12px; }
.bl-header__drawer-nav { display: flex; flex-direction: column; }
.bl-header__drawer-nav a { padding: 12px 0; color: #3D271A; font-weight: 500; font-size: 17px; border-bottom: 1px solid #eee; }
.bl-header__drawer-top { display: flex; flex-direction: column; margin-top: 14px; }
.bl-header__drawer-top a { padding: 9px 0; color: #6b5a4d; font-size: 14px; }
.bl-header__drawer-sublink { padding: 9px 0 9px 16px !important; color: #6b5a4d !important; font-size: 14px !important; font-weight: 400 !important; }
.bl-header__drawer-account { margin-top: 14px; }
.bl-header__drawer-account a { display: inline-block; padding: 10px 18px; border: 1px solid #3D271A; border-radius: 999px; color: #3D271A; font-size: 14px; }
.bl-header__drawer-search { display: flex; align-items: center; gap: 6px; border: 1px solid #d9cfc6; border-radius: 999px; padding: 6px 6px 6px 14px; margin-bottom: 16px; }
.bl-header__drawer-search .search-input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; color: #3D271A; }
.bl-header__drawer-search button { background: none; border: 0; cursor: pointer; line-height: 0; color: #3D271A; padding: 4px; }
.bl-header__drawer-search button svg { width: 18px; height: 18px; }

/* -- Menu dropdown (desktop, logic cũ) -- */
.bl-header__navitem { position: relative; display: inline-flex; align-items: center; }
.bl-header__dropdown { position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.1); padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility .2s; z-index: 50; }
.bl-header__navitem:hover .bl-header__dropdown,
.bl-header__navitem:focus-within .bl-header__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.bl-header__dropdown ul { list-style: none; margin: 0; padding: 0; }
.bl-header__dropdown a { display: block; padding: 9px 18px; color: #3D271A; font-size: 15px; white-space: nowrap; }
.bl-header__dropdown a:hover { background: #f6f1ec; }

/* -- Search input (desktop, dùng chung logic theme) -- */
.bl-header__search { display: flex; align-items: center; gap: 4px; border: 1px solid #d9cfc6; border-radius: 999px; padding: 4px 6px 4px 14px; }
.bl-header__search .search-input { border: 0; outline: 0; background: none; font-size: 14px; color: #3D271A; width: clamp(110px, 11vw, 190px); }
.bl-header__search button { background: none; border: 0; cursor: pointer; line-height: 0; color: #3D271A; padding: 4px; }
.bl-header__search button svg { width: 18px; height: 18px; }

@media (max-width: 1024px) {
  .bl-header__top { display: none; }
  .bl-header__nav, .bl-header__actions { display: none; }
  .bl-header__burger { display: flex; }
  .bl-header__bar { height: 50px; }
  .bl-header__logo { font-size: 22px; }
  .bl-header__logo img { height: 20px; }
}