/* ============================================
   BM EXPORTS — HEADER (REDESIGNED PREMIUM)
   ============================================ */

/* ===== ANIMATED TOP BAR ===== */
.top-bar {
  background: #0D0D0D;
  border-bottom: 1px solid rgba(201,168,76,0.15);
  height: 38px;
  position: relative;
  z-index: 200;
  display: flex;
  align-items: stretch;
}

/* Marquee section (left, grows to fill) */
.top-bar-marquee {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.top-bar-marquee::before,
.top-bar-marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
.top-bar-marquee::before { left: 0; background: linear-gradient(90deg, #0D0D0D, transparent); }
.top-bar-marquee::after  { right: 0; background: linear-gradient(-90deg, #0D0D0D, transparent); }

.top-bar-track {
  display: flex;
  align-items: center;
  height: 38px;
  width: max-content;
  animation: topBarScroll 28s linear infinite;
  gap: 0;
}
.top-bar-track:hover { animation-play-state: paused; }

@keyframes topBarScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.top-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 28px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.07);
  height: 38px;
  transition: color 0.2s;
}
.top-bar-item:hover { color: #fff; }
.top-bar-item svg { width: 13px; height: 13px; stroke: var(--gold); flex-shrink: 0; }
.top-bar-item a { color: inherit; }
.top-bar-item a:hover { color: var(--gold); }

/* Fixed WhatsApp button (right) */
.top-bar-wa-fixed {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px;
  background: rgba(37,211,102,0.1);
  border-left: 1px solid rgba(37,211,102,0.2);
  color: #25D366;
  font-size: 12px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s;
}
.top-bar-wa-fixed svg { stroke: #25D366; }
.top-bar-wa-fixed:hover { background: rgba(37,211,102,0.2); color: #25D366; }

/* ===== MAIN HEADER ===== */
.main-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 900;
  transition: box-shadow 0.4s ease, background 0.4s ease;
  border-bottom: 1px solid transparent;
}
.main-header.scrolled {
  box-shadow: 0 4px 32px rgba(0,0,0,0.1);
  border-bottom-color: var(--border);
}
.main-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.header-logo img {
  height: 50px;
  width: auto;
  object-fit: contain;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.logo-text span {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-top: 3px;
}

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  letter-spacing: 0.2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 13px; right: 13px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  border-radius: 1px;
  transform-origin: left;
}
.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--primary); }
.nav-link.active::after { transform: scaleX(1); }

/* CTA Group */
.header-cta-group { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-quote-btn { white-space: nowrap; }

/* Hamburger */
.hamburger {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  transition: var(--transition);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}
.hamburger:hover { border-color: var(--primary); background: rgba(192,57,43,0.04); }
.hamburger svg { width: 20px; height: 20px; }
.hamburger .icon-menu { display: block; stroke: var(--text); transition: var(--transition); }
.hamburger .icon-close { display: none; stroke: var(--primary); transition: var(--transition); }
.hamburger.open .icon-menu { display: none; }
.hamburger.open .icon-close { display: block; }
.hamburger.open { border-color: var(--primary); background: rgba(192,57,43,0.06); }

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ===== CATEGORY BAR ===== */
.category-bar {
  background: var(--dark);
  position: sticky;
  top: 74px; /* fallback – JS overwrites with real header height */
  z-index: 850;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.category-bar-inner {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  overflow-y: visible;
}
.category-bar-inner::-webkit-scrollbar { display: none; }

.cat-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  color: rgba(255,255,255,0.88);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.3px;
  user-select: none;
  flex-shrink: 0;
}
.cat-bar-item svg { width: 18px; height: 18px; stroke: rgba(255,255,255,0.78); transition: var(--transition); flex-shrink: 0; }
.cat-bar-item > a { color: inherit; display: flex; align-items: center; gap: 7px; }
.cat-bar-item:hover,
.cat-bar-item.active { color: #fff; }
.cat-bar-item:hover svg,
.cat-bar-item.active svg { stroke: var(--gold); }
.cat-bar-item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 18px; right: 18px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  border-radius: 1px 1px 0 0;
}
.cat-bar-item:hover::after,
.cat-bar-item.active::after { transform: scaleX(1); }


/* ===== MOBILE DRAWER ===== */
.mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1090;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.mobile-overlay.visible { display: block; }
.mobile-overlay.open { opacity: 1; }

.mobile-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 85vw);
  background: #fff;
  z-index: 1100;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.mobile-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  background: var(--dark);
  flex-shrink: 0;
}
.drawer-logo { display: flex; align-items: center; gap: 10px; }
.drawer-logo img { height: 36px; }
.drawer-logo-text strong { font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 900; color: #fff; }
.drawer-logo-text span { font-size: 9px; color: var(--gold); font-weight: 600; display: block; letter-spacing: 1.5px; text-transform: uppercase; }

.drawer-close {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
  flex-shrink: 0;
}
.drawer-close:hover { border-color: var(--primary); background: rgba(192,57,43,0.15); }
.drawer-close svg { width: 16px; height: 16px; stroke: rgba(255,255,255,0.8); }

.drawer-nav { flex: 1; padding: 8px 0; }
.drawer-nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--text); transition: var(--transition);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.drawer-nav-item:hover { color: var(--primary); background: rgba(192,57,43,0.04); }
.drawer-nav-item svg { width: 17px; height: 17px; stroke: var(--text-muted); }
.drawer-nav-item.active { color: var(--primary); background: rgba(192,57,43,0.05); }

.drawer-footer { padding: 20px 22px; border-top: 1px solid var(--border); flex-shrink: 0; }
.drawer-footer .btn { width: 100%; justify-content: center; }

/* Category sub-drawer */
.cat-subdrawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 85vw);
  background: #fff;
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.cat-subdrawer.open { transform: translateX(0); }

.subdrawer-header {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px;
  background: var(--dark);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.subdrawer-header:hover { background: #1a1a1a; }
.subdrawer-header svg { width: 18px; height: 18px; stroke: var(--gold); flex-shrink: 0; }
.subdrawer-header span { font-size: 14px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }

.subdrawer-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
}
.subdrawer-item:hover { background: var(--light-bg); padding-left: 28px; }
.subdrawer-item-icon {
  width: 36px; height: 36px;
  background: rgba(192,57,43,0.08); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.subdrawer-item-icon svg { width: 17px; height: 17px; stroke: var(--primary); }
.subdrawer-item-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.subdrawer-item-count { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
  .top-bar { display: none; }
  .category-bar { display: none; }
  .header-nav { display: none; }
  .header-cta-group { display: none; }
  .hamburger { display: flex; }
}
@media (min-width: 992px) {
  .hamburger { display: none !important; }
  .mobile-drawer,
  .mobile-overlay,
  .cat-subdrawer { display: none !important; }
}
