.site-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 999;
    background: transparent; transition: all .3s;
}
/* Scrolled: floating frosted glass */
.site-header.scrolled {
    width: calc(100% - 0.4rem); margin: 0.2rem 0.2rem 0 0.2rem;
    background: rgba(255,255,255,.8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 0 10px rgba(255,255,255,.5); border-radius: 0.2rem;
}
.site-header.scrolled .header-nav a { color: var(--text-primary); }
.site-header.scrolled .header-logo-white { display: none; }
.site-header.scrolled .header-logo-color { display: block; }
/* Hover on scrolled header OR dropdown-hover: solid white, expand to full */
.site-header.scrolled:hover,
.site-header.scrolled.dropdown-hover,
.site-header.dropdown-hover {
    width: 100%; margin: 0;
    background: #fff; backdrop-filter: none;
    box-shadow: 0 4px 10px rgba(0,0,0,.06); border-radius: 0;
}
.site-header.dropdown-hover .header-nav a { color: var(--text-primary); }
.site-header.dropdown-hover .header-logo-white { display: none; }
.site-header.dropdown-hover .header-logo-color { display: block; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; }
.header-logo img { height: 50px; width: auto; }
.header-logo-color { display: none; }
.header-nav { display: flex; align-items: center; gap: 30px; }
.header-nav a { color: #fff; font-size: 16px; font-weight: 500; transition: color .3s; position: relative; }
.header-nav a:hover { color: var(--site-color); }
.header-nav-item { position: relative; }
.header-nav-item > a::after { content: ''; display: inline-block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid currentColor; margin-left: 6px; vertical-align: middle; }
.header-nav-item:hover .header-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

/* Products Mega Menu */
.header-mega-menu {
    position: fixed; top: 0; left: 0; width: 100%;
    background: var(--site-color); padding: 40px 0; box-sizing: border-box;
    border-top: none;
    box-shadow: 0 4px 10px rgba(0,0,0,.06);
    display: none; z-index: 998;
}
.header-mega-menu .mega-menu-wrap {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 0.4rem; max-width: 1440px; width: 90%; margin: 0 auto;
}
.mega-menu-item {
    width: calc((100% - 1.2rem) / 4); text-align: center;
}
.mega-menu-item img { width: 100%; border-radius: 12px; margin-bottom: 10px; transition: transform .3s; overflow: hidden; }
.mega-menu-item:hover img { transform: scale(1.05); }
.mega-menu-item h3 { font-size: 15px; color: #fff; font-weight: 500; transition: color .3s; line-height: 1.4; margin-top: 8px; }
.mega-menu-item:hover h3 { color: #c6fff9; }

/* Standard Dropdown */
.header-dropdown {
    position: absolute; top: 100%; left: 0; background: #fff;
    min-width: 220px; box-shadow: 0 5px 20px rgba(0,0,0,.1); border-radius: 8px;
    padding: 10px 0; opacity: 0; visibility: hidden; transition: all .3s;
    transform: translateY(10px);
}
.header-dropdown a { display: block; padding: 8px 20px; color: var(--text-primary) !important; font-size: 14px; }
.header-dropdown a:hover { background: var(--site-color-5); color: var(--site-color) !important; }

/* Header Right */
.header-right { display: flex; align-items: center; gap: 20px; }
.header-search-btn, .header-quote-btn { cursor: pointer; }
.header-search-btn { display: flex; align-items: center; justify-content: center; }
.header-search-btn svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 3; transition: stroke .3s; display: block; }
.site-header.scrolled .header-search-btn svg,
.site-header.dropdown-hover .header-search-btn svg { stroke: var(--text-primary); }
.header-quote-btn {
    background: var(--site-color); color: #fff; padding: 10px 24px;
    border: none; border-radius: var(--radius-btn); font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all .3s;
}
.header-quote-btn:hover { background: #fff; color: var(--site-color); }
.site-header.scrolled:hover .header-quote-btn,
.site-header.dropdown-hover .header-quote-btn { color: #fff; background: var(--site-color); }

/* Search Overlay */
.header-search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--overlay-bg); z-index: 9999; display: none;
    align-items: center; justify-content: center;
}
.header-search-overlay.active { display: flex; }
.header-search-form { width: 60%; max-width: 600px; position: relative; }
.header-search-form input {
    width: 100%; padding: 15px 60px 15px 20px; font-size: 18px;
    border: none; border-radius: 8px; outline: none;
}
.header-search-form button {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: var(--site-color); border: none; padding: 10px 20px;
    color: #fff; border-radius: 5px; cursor: pointer;
}
.search-close { position: absolute; top: 30px; right: 30px; color: #fff; font-size: 30px; cursor: pointer; }

/* Mobile Header */
.mobile-header { display: none; }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 25px; height: 3px; background: #333; transition: all .3s; }
.mobile-menu {
    position: fixed; top: 0; left: -300px; width: 280px; height: 100%;
    background: #fff; z-index: 10000; transition: left .3s; overflow-y: auto;
    box-shadow: 2px 0 15px rgba(0,0,0,.2); padding: 20px;
}
.mobile-menu.active { left: 0; }
.mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); z-index: 9999; display: none; }
.mobile-menu-overlay.active { display: block; }
.mobile-menu a { display: block; padding: 12px 0; color: var(--text-primary); border-bottom: 1px solid #eee; font-size: 15px; }
.mobile-menu .submenu { padding-left: 15px; }
.mobile-menu .submenu a { font-size: 14px; }
.mobile-menu-close { text-align: right; font-size: 24px; cursor: pointer; margin-bottom: 10px; }

@media (max-width: 991px) {
    .header-nav, .header-right .header-quote-btn { display: none; }
    .hamburger { display: flex; }
    .mobile-header { display: block; }
    .site-header { background: #fff; }
    .site-header.scrolled { width: 100%; margin: 0; border-radius: 0; }
    .header-logo-white { display: none; }
    .header-logo-color { display: block !important; }
    .header-search-btn svg { stroke: var(--text-primary); }
}
