/* NetPear Commerce header integration — desktop and small screens. */
#np-header>.container{position:relative}
#np-header .npc-store-navigation > a {white-space:nowrap}
#np-header .npc-account-anchor {position:relative}
#np-header .npc-account-menu{position:absolute;z-index:100050;right:0;top:calc(100% + 10px);width:224px;background:#fff;border:1px solid #dae9dd;box-shadow:0 16px 46px rgba(13,50,29,.16);border-radius:14px;padding:8px;display:grid;gap:2px}
#np-header .npc-account-menu[hidden]{display:none!important}
#np-header .npc-account-menu a{display:block;color:#153e29!important;text-decoration:none;font-size:13px;line-height:1.35;font-weight:600;border-radius:8px;padding:10px 12px}
#np-header .npc-account-menu a:hover,#np-header .npc-account-menu a:focus-visible{background:#edf6ee;color:#13673c!important;outline:2px solid transparent}
#np-header .npc-mobile-actions{display:none}
@media(max-width:767px){
  #np-header .npc-mobile-actions{display:flex;gap:5px;align-items:center;justify-content:flex-end;position:absolute;right:14px;top:25px;z-index:20}
  #np-header .npc-mobile-actions a{min-height:38px;display:inline-flex;justify-content:center;align-items:center;position:relative;padding:7px 9px;border-radius:9px;color:#143e29;background:rgba(255,255,255,.94);border:1px solid rgba(33,134,81,.22);font-size:12px;font-weight:700;text-decoration:none}
  #np-header .npc-mobile-actions .npc-cart-count{position:absolute;top:-7px;right:-4px;font-size:10px;color:#fff;background:#207d49;border-radius:30px;min-width:17px;text-align:center;padding:2px 3px}
  #np-header .npc-mobile-actions .npc-cart-count[hidden]{display:none}
  #np-header .npc-account-menu{display:none!important}
  #np-header .npc-mobile-account{white-space:nowrap}
}
@media(max-width:400px){#np-header .npc-mobile-actions{gap:3px;right:7px}#np-header .npc-mobile-actions a{font-size:11px;padding:5px 6px}}

#np-header .npc-account-menu .npc-account-logout{display:block;width:100%;border:0;border-top:1px solid #e2ebe5;background:#fff;color:#195a35;cursor:pointer;text-align:left;font-size:13px;font-weight:700;border-radius:8px;padding:12px}
#np-header .npc-account-menu .npc-account-logout:hover,#np-header .npc-account-menu .npc-account-logout:focus-visible{background:#edf6ee;outline:2px solid #208651;outline-offset:1px}
@media(max-width:520px){#np-header .npc-mobile-actions{gap:3px;right:6px}#np-header .npc-mobile-actions a{width:37px;height:38px;padding:7px;box-sizing:border-box}#np-header .npc-mobile-actions a>span:not(.npc-cart-count){display:none}#np-header .npc-mobile-actions svg{flex-shrink:0}}
@media(min-width:521px) and (max-width:767px){#np-header .npc-mobile-actions a{gap:6px}}

/* =====================================================
   NETPEAR MODERN ACCOUNT NAVIGATION
   ===================================================== */

#np-header .npc-header-account-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 37px;
    height: 37px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

#np-header .npc-header-account-button svg {
    display: block;
}

#np-header .npc-header-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #dff5e7;
    color: #186c42;
    font-size: 12px;
    font-weight: 800;
}

@media (min-width: 1000px) {

    #np-header.npc-modern-account-active #np-menuside {
        display: none !important;
    }

    #np-header.npc-modern-account-active #np-menu {
        flex: 0 0 82.333333% !important;
        max-width: 82.333333% !important;
        width: 82.333333% !important;
    }

    #np-header .np-megamenu-parent > li.npc-cart-menu-item,
    #np-header .np-megamenu-parent > li.npc-header-account-item {
        position: relative !important;
        display: flex !important;
        float: left !important;
        align-items: center !important;
        justify-content: center !important;
        height: 70px !important;
        padding: 0 !important;
        margin: 0 0 0 8px !important;
        top: 0 !important;
        transform: none !important;
        line-height: 1 !important;
    }

    #np-header .npc-header-account-button:hover {
        color: #37d58c;
        border-color: #37d58c;
    }

    #np-header .npc-mobile-actions {
        display: none !important;
    }
}

/* Mobile and tablet use the theme's 999px breakpoint. */

@media (max-width: 999px) {

    #np-header .npc-header-account-item {
        display: none !important;
    }

    #np-header .npc-mobile-actions {
        position: absolute !important;
        top: 22px !important;
        right: 72px !important;
        left: auto !important;
        z-index: 30 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 6px !important;

        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #np-header .npc-mobile-actions > a,
    #np-header .npc-mobile-actions > button {
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;

        padding: 0 !important;
        margin: 0 !important;

        background: #fff !important;
        color: #17633e !important;
        border: 1px solid #d6e8dc !important;
        border-radius: 11px !important;
        box-sizing: border-box !important;
    }

    #np-header .npc-mobile-actions svg {
        width: 20px !important;
        height: 20px !important;
        stroke: currentColor !important;
        display: block !important;
    }

    #np-header .npc-mobile-actions .npc-cart-count {
        position: absolute !important;
        top: -6px !important;
        right: -5px !important;
    }

    #np-header .npc-mobile-actions .npc-cart-count[hidden] {
        display: none !important;
    }
}

@media (max-width: 480px) {

    #np-header .npc-mobile-actions {
        right: 62px !important;
        gap: 4px !important;
    }

    #np-header .npc-mobile-actions > a,
    #np-header .npc-mobile-actions > button {
        width: 36px !important;
        min-width: 36px !important;
        height: 38px !important;
        min-height: 38px !important;
    }

    /* Give the logo space without overlapping the actions. */
    #np-header img.np-default-logo {
        max-width: min(34vw, 145px) !important;
        width: auto !important;
        height: auto !important;
        max-height: 55px !important;
    }
}

/* Account dropdown */

.npc-modern-account-menu {
    position: fixed;
    z-index: 2147483644;

    max-height: calc(100dvh - 110px);
    overflow-y: auto;

    padding: 11px;

    background: #fff;
    border: 1px solid #e1ebe4;
    border-radius: 16px;

    box-shadow: 0 20px 60px rgba(8,35,21,.2);

    color: #203e2c;
    font-family: Poppins, Arial, sans-serif;
}

.npc-modern-account-menu[hidden] {
    display: none !important;
}

.npc-account-profile {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 10px 16px;
    border-bottom: 1px solid #e7eee9;
    margin-bottom: 8px;
}

.npc-account-profile-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    border-radius: 50%;
    background: #e0f5e8;
    color: #197044;
    font-size: 14px;
    font-weight: 800;
}

.npc-account-profile-info {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.npc-account-profile-info strong {
    color: #183e29;
    font-size: 13px;
    font-weight: 750;
}

.npc-account-profile-info span {
    color: #788b7c;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.npc-account-links {
    display: grid;
    gap: 2px;
}

.npc-modern-account-menu .npc-account-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #355540;
    font-size: 12px;
    font-weight: 600;
}

.npc-modern-account-menu .npc-account-link:hover {
    background: #edf8f0;
    color: #17683f;
}

.npc-account-signout {
    display: block;
    width: 100%;
    margin-top: 9px;
    padding: 13px 12px;
    border: 0;
    border-top: 1px solid #e8eee9;
    background: transparent;
    color: #a44444;
    text-align: left;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.npc-account-welcome {
    padding: 15px 10px;
    text-align: center;
}

.npc-account-welcome h3 {
    margin: 0 0 8px;
    color: #193e2b;
    font-size: 17px;
}

.npc-account-welcome p {
    margin: 0;
    color: #738878;
    font-size: 12px;
    line-height: 1.7;
}

.npc-account-primary,
.npc-account-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 12px;
    border-radius: 9px;
    margin-top: 9px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.npc-account-primary {
    background: #218f59;
    color: #fff;
}

.npc-account-secondary {
    background: #fff;
    border: 1px solid #d6e8dc;
    color: #206a43;
}

.npc-account-loading,
.npc-account-error {
    padding: 18px;
    color: #718474;
    text-align: center;
    font-size: 12px;
}



/* NPC MOBILE OFFCANVAS DUPLICATE FIX */

/*
 * The theme generates an independent off-canvas menu.
 * Basket and account are header actions, not navigation links.
 * Keep Store in the menu.
 */

@media (max-width: 999px) {

    .offcanvas-menu li.npc-cart-menu-item,
    .offcanvas-menu li.npc-header-account-item,
    .offcanvas-inner li.npc-cart-menu-item,
    .offcanvas-inner li.npc-header-account-item {
        display: none !important;
    }

    /*
     * The actual commerce controls remain in the header,
     * outside the off-canvas menu.
     */
    #np-header .npc-mobile-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
    }

    #np-header .npc-mobile-actions > a,
    #np-header .npc-mobile-actions > button {
        flex: 0 0 auto !important;
    }

    #np-header .npc-mobile-actions > a:focus-visible,
    #np-header .npc-mobile-actions > button:focus-visible {
        outline: 2px solid #37d58c !important;
        outline-offset: 3px;
    }
}


/* NPC MOBILE HEADER REFINEMENT V2 */

@media (max-width: 999px) {

    /* Keep only Basket and Account beside the hamburger. */
    #np-header .npc-mobile-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 8px !important;

        position: absolute !important;
        top: -6px !important;
        right: 76px !important;
        left: auto !important;

        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 30 !important;
    }

    #np-header .npc-mobile-actions > a,
    #np-header .npc-mobile-actions > button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        flex: 0 0 42px !important;
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;

        margin: 0 !important;
        padding: 0 !important;

        border: 1px solid rgba(255,255,255,.22) !important;
        border-radius: 12px !important;
        background: rgba(255,255,255,.08) !important;
        color: #ffffff !important;

        box-shadow: none !important;
        box-sizing: border-box !important;
        line-height: 1 !important;
    }

    /* Correct the invisible basket SVG. */
    #np-header .npc-mobile-actions > a.npc-mobile-basket svg,
    #np-header .npc-mobile-actions > button.npc-mobile-account svg {
        display: block !important;
        width: 21px !important;
        height: 21px !important;
        stroke: #ffffff !important;
        color: #ffffff !important;
        opacity: 1 !important;
    }

    #np-header .npc-mobile-actions > a:hover,
    #np-header .npc-mobile-actions > button:hover {
        background: rgba(55,213,140,.18) !important;
        border-color: #37d58c !important;
    }

    #np-header .npc-mobile-actions .npc-cart-count {
        top: -7px !important;
        right: -6px !important;
        border: 2px solid #293034 !important;
    }
}

/* Narrow phones */

@media (max-width: 480px) {

    #np-header .npc-mobile-actions {
        right: 66px !important;
        gap: 6px !important;
    }

    #np-header .npc-mobile-actions > a,
    #np-header .npc-mobile-actions > button {
        flex-basis: 38px !important;
        width: 38px !important;
        min-width: 38px !important;
        height: 40px !important;
        min-height: 40px !important;
    }

    #np-header img.np-default-logo {
        max-width: min(37vw, 145px) !important;
        width: auto !important;
        height: auto !important;
    }
}

/* Very narrow phones */

@media (max-width: 360px) {

    #np-header .npc-mobile-actions {
        gap: 4px !important;
        right: 60px !important;
    }

    #np-header img.np-default-logo {
        max-width: 34vw !important;
    }
}


@media (max-width: 999px) {
    #np-header #offcanvas-toggler {
        transform: translateY(-22px);
    }
}


/*
 * NETPEAR STICKY HEADER ICON SCALING
 *
 * Keep navigation layout dimensions unchanged.
 * Scale only the visible cart and account controls.
 * Preserve hover animations and mobile layout.
 */

@media (min-width: 1000px) {

    /* Preserve stable layout dimensions */

    body.sticky-header
    #np-header .np-megamenu-parent
    > li.npc-cart-menu-item > a.npc-cart-toggle,

    body.sticky-header
    #np-header .npc-header-account-button {

        transform-origin: center center !important;

        transition:
            transform 300ms ease,
            background-color 200ms ease,
            border-color 200ms ease !important;
    }

    /* Visually shrink without changing layout width */

    body.sticky-header.scrolled
    #np-header .np-megamenu-parent
    > li.npc-cart-menu-item > a.npc-cart-toggle,

    body.sticky-header.scrolled
    #np-header .npc-header-account-button {

        transform: scale(.865) !important;
    }

    /* Preserve basket hover movement */

    body.sticky-header.scrolled
    #np-header .np-megamenu-parent
    > li.npc-cart-menu-item > a.npc-cart-toggle:hover {

        transform: translateY(-1px) scale(.865) !important;
    }

    /* Normal header: preserve original basket hover */

    body.sticky-header:not(.scrolled)
    #np-header .np-megamenu-parent
    > li.npc-cart-menu-item > a.npc-cart-toggle:hover {

        transform: translateY(-1px) !important;
    }

}

/* Accessibility: respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {

    body.sticky-header
    #np-header .np-megamenu-parent
    > li.npc-cart-menu-item > a.npc-cart-toggle,

    body.sticky-header
    #np-header .npc-header-account-button {

        transition: none !important;
    }
}


/* NETPEAR STICKY ICON VERTICAL ADJUSTMENT */
@media (min-width: 1000px) {

    body.sticky-header.scrolled
    #np-header .np-megamenu-parent > li.npc-cart-menu-item > a.npc-cart-toggle,

    body.sticky-header.scrolled
    #np-header .npc-header-account-button {
        transform: translateY(-3px) scale(.865) !important;
    }

    body.sticky-header.scrolled
    #np-header .np-megamenu-parent > li.npc-cart-menu-item > a.npc-cart-toggle:hover {
        transform: translateY(-4px) scale(.865) !important;
    }
}
