/* ========================================
   HEADER & NAVIGATION
======================================== */

/* Ensure main header has higher z-index than sticky bar */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    color: white;
    padding: 1rem 0;
    background: #0a1628;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Product sticky bar BELOW main header */
.product-sticky-bar {
  position: fixed !important;
  top: 77px !important; /* Below main header (66px height) */
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 999 !important; /* BELOW main header (1000) */
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-100%) !important;
  transition: transform 0.3s ease !important;
}

.product-sticky-bar.visible {
  transform: translateY(0) !important;
}
.site-header {
  transform: translateY(0) !important;
}
/* Fix header spacer overlap */
.header-spacer {
    height: 72px;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}
.site-header .logo {
    display: flex;
    align-items: center;
}

.site-header .logo .custom-logo {
    width: auto;
    height: 46px;
    max-width: 260px;
    vertical-align: middle;
}
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: white;
    flex-shrink: 0;
}

.logo a {
    color: white;
}

.logo strong {
    color: var(--accent-light);
    font-weight: 900;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a,
.nav-menu a.menu-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 0;
    text-decoration: none;
    position: relative;
}

/* Hover underline (non-dropdown) */
.nav-menu > li:not(.menu-item-has-children) > a::after,
.nav-menu > li:not(.menu-item-has-children) > a.menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-light);
    transition: width 0.3s ease;
}

.nav-menu > li:not(.menu-item-has-children) > a:hover::after,
.nav-menu > li:not(.menu-item-has-children) > a.menu-link:hover::after {
    width: 100%;
}

.nav-menu > li > a:hover,
.nav-menu a.menu-link:hover {
    color: var(--accent-light);
}

.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    color: var(--accent-light);
}

/* Down arrow for dropdowns */
.menu-item-has-children > a.menu-link::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 4px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.menu-item-has-children:hover > a.menu-link::after {
    transform: rotate(180deg);
}

.menu-item-has-children > a.menu-link::before {
    display: none !important;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    list-style: none;
    min-width: 220px;
    padding: 0.5rem 0;
    margin: 0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
}

.menu-item-has-children:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item-has-children::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 999;
}

.dropdown-menu li {
    position: relative;
    width: 100%;
}

.dropdown-menu a.menu-link {
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    gap: 1rem;
}

/* Remove underline from dropdown (but keep arrows) */
.dropdown-menu > li:not(.menu-item-has-children) > a.menu-link::before,
.dropdown-menu > li:not(.menu-item-has-children) > a.menu-link::after {
    display: none;
}

.dropdown-menu a.menu-link:hover {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.15) 0%, transparent 100%);
    color: var(--accent-light);
    padding-left: 2rem;
}

/* Nested Dropdown */
.dropdown-menu .menu-item-has-children > .dropdown-menu {
    top: -0.5rem;
    left: calc(100% + 8px);
    margin: 0;
}

.dropdown-menu .menu-item-has-children::before {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 8px;
    height: 100%;
    z-index: 999;
}

/* Right arrow for nested */
.dropdown-menu .menu-item-has-children > a.menu-link::after {
    content: '' !important;
    display: inline-block !important;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid currentColor;
    border-right: 0;
    margin-left: auto;
    margin-right: 0;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.dropdown-menu .menu-item-has-children:hover > a.menu-link::after {
    transform: translateX(4px);
}

.dropdown-menu .menu-item-has-children > a.menu-link::before {
    display: none !important;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.header-cart-icon {
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    position: relative !important;
}

.header-cart-icon:hover {
    background: rgba(6, 182, 212, 0.1);
}

.header-cart-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.header-cart-icon .cart-count-badge {
    background: #06b6d4 !important;
    color: white !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    min-width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2px 4px !important;
}

.cta-button {
    background: linear-gradient(135deg, var(--accent) 0%, #5a67d8 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
}

.cta-button:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #4c51bf 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 9999;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}
