/* ── Hide existing Astra header ── */
#ast-desktop-header,
.ast-above-header-wrap,
.ast-main-header-wrap,
.np-desktop-submenu-panel {
    display: none !important;
}

/* ── USP Bar ── */

.np-usp-bar {
    background: #1a1a1a;
    color: #fff;
    padding: 8px 40px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.np-usp-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 40px;
    align-items: center;
}
.np-usp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.9);
}
.np-usp-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* ── Main Header ── */

.np-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.np-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr auto;
    align-items: center;
    padding: 0 40px;
    height: 72px;
}

/* Logo */
.np-header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.np-header-logo img {
    height: 40px;
    width: auto;
    margin: 0 !important;
}

/* Navigation */
.np-header-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    height: 100%;
}
.np-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 100%;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}
.np-nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #1a1a1a;
    transform: scaleX(0);
    transition: transform 0.2s;
}
.np-nav-item:hover {
    color: #1a1a1a;
}
.np-nav-item:hover::after {
    transform: scaleX(1);
}
.np-nav-chevron {
    margin-left: 6px;
    transition: transform 0.2s;
}
.np-nav-item:hover .np-nav-chevron {
    transform: rotate(180deg);
}

/* Header icons */
.np-header-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}
.np-header .np-header-icon,
.np-header button.np-header-icon,
.np-header a.np-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.2s;
    cursor: pointer;
    position: relative;
    color: #1a1a1a !important;
    text-decoration: none;
    background: none;
    border: none;
    font-family: inherit;
}
.np-header .np-header-icon:hover,
.np-header button.np-header-icon:hover {
    background: #f5f5f5;
    color: #1a1a1a !important;
}
.np-header .np-header-icon svg {
    stroke: #1a1a1a !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
/* Ensure header buttons are never hidden by Astra */
.np-header button.np-header-search-btn,
.np-header button.np-header-cart-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 40px !important;
    min-height: 40px !important;
    overflow: visible !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    box-shadow: none !important;
    line-height: 1 !important;
    font-size: 0 !important;
}
.np-header-badge {
    position: absolute;
    top: 2px;
    right: 0;
    background: #e53e3e;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ── Mega Menu ── */

.np-mega-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.15);
    z-index: 90;
}
.np-mega-overlay.is-active {
    display: block;
}
.np-mega-menu {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    z-index: 100;
    padding: 24px 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    border-radius: 0 0 8px 8px;
}
.np-mega-menu.is-active {
    display: block;
}
.np-mega-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}
.np-mega-col h5 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1a1a1a;
    display: inline-block;
}
.np-mega-col a {
    display: block;
    padding: 7px 0;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    transition: color 0.15s, padding-left 0.15s;
}
.np-mega-col a:hover {
    color: #1a1a1a;
    padding-left: 6px;
}
.np-mega-featured {
    background: #f7f7f7;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.np-mega-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-bottom: 12px;
}
.np-mega-featured h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.3;
}
.np-mega-featured p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 16px;
}
.np-mega-cta {
    display: inline-block;
    background: #1a1a1a;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    align-self: flex-start;
}
.np-mega-cta:hover {
    background: #333;
    color: #fff !important;
}

/* ── Search Overlay ── */

.np-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.np-search-overlay.is-active {
    display: flex;
}
.np-search-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 640px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.np-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    padding: 14px 16px;
}
.np-search-input-wrap form {
    flex: 1;
    display: flex;
}
.np-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: 'Inter', system-ui, sans-serif;
    background: transparent;
}
.np-search-input::placeholder {
    color: #aaa;
}
.np-search-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 0;
    display: flex;
}
.np-search-close:hover {
    color: #111;
}
.np-search-hint {
    margin-top: 12px;
    font-size: 12px;
    color: #aaa;
}
.np-search-hint span {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 4px;
    cursor: pointer;
}
.np-search-hint span:hover {
    background: #e0e0e0;
}

/* ── Mobile Header (hidden on desktop) ── */

.np-mobile-header {
    display: none;
}

/* ── Responsive ── */

@media (max-width: 921px) {
    .np-usp-bar {
        display: none;
    }
    .np-header {
        display: none;
    }
    .np-mega-menu,
    .np-mega-overlay {
        display: none !important;
    }
    /* Hide Astra headers */
    #ast-desktop-header,
    .ast-mobile-header-wrap {
        display: none !important;
    }
    /* Show our mobile header */
    .np-mobile-header {
        display: block;
        position: sticky;
        top: 0;
        z-index: 100;
        background: #fff;
        border-bottom: 1px solid #eee;
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
    }
    .np-mobile-header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
    }
    /* Hamburger */
    .np-mobile-hamburger {
        width: 40px;
        height: 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        cursor: pointer;
        background: none;
        border: none;
        padding: 0;
        -webkit-appearance: none;
    }
    .np-mobile-hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: #1a1a1a;
        border-radius: 1px;
        transition: transform 0.3s, opacity 0.3s;
    }
    /* Logo */
    .np-mobile-logo {
        display: flex;
        align-items: center;
    }
    .np-mobile-logo img {
        height: 40px;
        width: auto;
        margin: 0 !important;
    }
    /* Icons */
    .np-mobile-icons {
        display: flex;
        gap: 4px;
        align-items: center;
    }
    .np-mobile-icon {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        background: none !important;
        border: none;
        padding: 0;
        cursor: pointer;
        color: #1a1a1a !important;
        -webkit-appearance: none;
    }
    .np-mobile-badge {
        position: absolute;
        top: 0;
        right: -2px;
        background: #e53e3e;
        color: #fff;
        font-size: 9px;
        font-weight: 700;
        min-width: 16px;
        height: 16px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
    }
    /* Mobile menu */
    .np-mobile-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        height: 100vh;
        background: #fff;
        z-index: 200;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding-top: 60px;
        box-shadow: 4px 0 20px rgba(0,0,0,0.1);
    }
    .np-mobile-header.menu-open .np-mobile-menu {
        display: block;
        transform: translateX(0);
    }
    /* Backdrop */
    .np-mobile-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 199;
    }
    .np-mobile-header.menu-open .np-mobile-backdrop {
        display: block;
    }
    /* Close button */
    .np-mobile-menu-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none !important;
        border: none;
        cursor: pointer;
        padding: 0;
        -webkit-appearance: none;
        z-index: 1;
    }
    /* Mobile search bar */
    .np-mobile-search-bar {
        padding: 12px 16px;
    }
    .np-mobile-search-input-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
        background: #f5f5f5;
        border-radius: 8px;
        padding: 10px 14px;
    }
    .np-mobile-search-input {
        flex: 1;
        border: none;
        background: none;
        outline: none;
        font-size: 16px;
        font-family: 'Inter', system-ui, sans-serif;
    }
    .np-mobile-search-input::placeholder {
        color: #999;
    }
    /* Nav items */
    .np-mobile-nav-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 15px;
        font-weight: 500;
        color: #1a1a1a;
        cursor: pointer;
        text-decoration: none;
        background: none;
        border-left: none;
        border-right: none;
        border-top: none;
        width: 100%;
        font-family: inherit;
    }
    .np-mobile-nav-item:last-child {
        border-bottom: none;
    }
    .np-mobile-nav-item svg {
        transition: transform 0.2s;
    }
    .np-mobile-nav-item.is-open svg {
        transform: rotate(180deg);
    }
    /* Submenu */
    .np-mobile-submenu {
        display: none;
        background: #f9f9f9;
    }
    .np-mobile-submenu.is-open {
        display: block;
    }
    .np-mobile-submenu a {
        display: block;
        padding: 12px 16px 12px 32px;
        font-size: 14px;
        color: #555;
        text-decoration: none;
        border-bottom: 1px solid #eee;
    }
    .np-mobile-submenu a:last-child {
        border-bottom: none;
    }
    .np-mobile-submenu a:first-child {
        font-weight: 600;
        color: #1a1a1a;
    }
}

@media (max-width: 600px) {
    .np-search-overlay {
        padding-top: 60px;
    }
    .np-search-box {
        margin: 0 12px;
    }
}
