/* ============================================
   OPTIMIZED HEADER - HIGH SPECIFICITY VERSION
   ============================================ */

:root {
  --header-font: 'Play', sans-serif;
  --header-height: 70px;
  --header-height-mobile: 50px;
  
  /* Colors */
  --header-text: #ffffff;
  --header-icon: #ffffff;
  --cart-badge-bg: #D21776;
  --cart-badge-text: #ffffff;
}

/* ============================================
   BASE HEADER (ALWAYS GLASSMORPHISM)
   ============================================ */

body .site-header,
html body .site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-family: var(--header-font) !important;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  
  /* ALWAYS glassmorphism */
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 100px !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08) !important;
  
  /* Centered pill shape */
  width: 92% !important;
  max-width: 1400px !important;
  height: 65px !important;
  padding: 0 35px !important;
  margin: 20px auto 0 !important;
}

/* Hide on scroll down */
body .site-header.hidden,
html body .site-header.hidden {
  transform: translateY(-130%) !important;
}

/* ============================================
   LOGO
   ============================================ */

body .site-branding,
html body .site-branding {
  flex-shrink: 0 !important;
}

body .site-branding a,
html body .site-branding a {
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
  color: var(--header-text) !important;
  font-family: var(--header-font) !important;
  transition: opacity 0.3s ease !important;
}

body .site-branding a:hover,
html body .site-branding a:hover {
  opacity: 0.8 !important;
}

body .site-logo,
html body .site-logo,
body .site-logo img,
html body .site-logo img {
  height: 40px !important;
  width: auto !important;
  max-height: 40px !important;
  display: block !important;
  object-fit: contain !important;
}

body .site-name,
html body .site-name {
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: var(--header-text) !important;
}

/* ============================================
   RIGHT SIDE ICONS
   ============================================ */

body .header-right,
html body .header-right {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

body .header-icon,
html body .header-icon {
  background: none !important;
  border: none !important;
  padding: 8px !important;
  cursor: pointer !important;
  color: var(--header-icon) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  transition: opacity 0.3s ease, transform 0.2s ease !important;
}

body .header-icon:hover,
html body .header-icon:hover {
  opacity: 0.7 !important;
  transform: scale(1.05) !important;
}

body .header-icon svg,
html body .header-icon svg {
  display: block !important;
  fill: currentColor !important;
}

/* Cart Count Badge */
body .cart-count,
html body .cart-count {
  position: absolute !important;
  top: 2px !important;
  right: 2px !important;
  background: var(--cart-badge-bg) !important;
  color: var(--cart-badge-text) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  min-width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 4px !important;
  font-family: var(--header-font) !important;
}

body .menu-toggle .menu-icon,
html body .menu-toggle .menu-icon {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  width: 22px !important;
}

body .menu-toggle .menu-icon span,
html body .menu-toggle .menu-icon span {
  width: 100% !important;
  height: 2px !important;
  background: var(--header-icon) !important;
  display: block !important;
  transition: all 0.3s ease !important;
}

body .menu-toggle:hover .menu-icon span,
html body .menu-toggle:hover .menu-icon span {
  background: rgba(255, 255, 255, 0.7) !important;
}

/* ============================================
   FULL-SCREEN NAVIGATION OVERLAY - FIXED
   ============================================ */

body .nav-overlay,
html body .nav-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  background: rgba(10, 10, 28, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  z-index: 2000 !important;
  
  /* CRITICAL: Hide completely by default */
  transform: translateY(-100%) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  overflow: hidden !important;
  
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0s 0.5s !important;
  
  /* Force GPU acceleration */
  will-change: transform !important;
  -webkit-backface-visibility: hidden !important;
  backface-visibility: hidden !important;
}

body .nav-overlay.active,
html body .nav-overlay.active {
  transform: translateY(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0s 0s !important;
}

body .nav-close,
html body .nav-close {
  position: fixed !important;
  top: 30px !important;
  right: 30px !important;
  background: none !important;
  border: none !important;
  color: #fff !important;
  font-size: 40px !important;
  font-weight: 300 !important;
  cursor: pointer !important;
  padding: 10px !important;
  line-height: 1 !important;
  opacity: 0.8 !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
  z-index: 2001 !important;
}

body .nav-close:hover,
html body .nav-close:hover {
  opacity: 1 !important;
  transform: rotate(90deg) !important;
}

body .nav-content,
html body .nav-content {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  overflow-y: auto !important;
}

body .nav-content iframe,
html body .nav-content iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

body .nav-loading,
html body .nav-loading {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: #fff !important;
  font-family: var(--header-font) !important;
  font-size: 18px !important;
}

body.nav-open {
  overflow: hidden !important;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  body .site-header,
  html body .site-header {
    height: 55px !important;
    padding: 0 20px !important;
    margin: 10px auto 0 !important;
  }
  
  body .site-logo,
  html body .site-logo,
  body .site-logo img,
  html body .site-logo img {
    height: 28px !important;
    max-height: 28px !important;
  }
  
  body .header-right,
  html body .header-right {
    gap: 3px !important;
  }
  
  body .header-icon,
  html body .header-icon {
    padding: 6px !important;
  }
  
  body .nav-close,
  html body .nav-close {
    top: 15px !important;
    right: 15px !important;
    font-size: 32px !important;
  }
}