
/* =====================================================
   BATTERIES PLUS CUSTOM NAVIGATION
   ===================================================== */

.bp-main-nav,
.bp-main-nav *,
.bp-category-sidebar,
.bp-category-sidebar * {
    box-sizing: border-box;
}

/* ---------- TOP NAVIGATION ---------- */

.bp-main-nav {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: #f5f5f5;
}

.bp-primary-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bp-primary-menu > li {
    position: relative;
    margin: 0;
    padding: 0;
}

.bp-primary-menu > li > a {
    display: block;
    padding: 20px 17px;
    color: #202b55;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    text-transform: uppercase;
}

.bp-primary-menu a:hover,
.bp-primary-menu a:focus-visible {
    color: #f2670a;
}

/* Dropdowns */

.bp-primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1100;
    display: block;
    visibility: hidden;
    opacity: 0;
    min-width: 230px;
    margin: 0;
    padding: 5px 0;
    list-style: none;
    background: #fff;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .16);
    pointer-events: none;
    transform: translateY(6px);
    transition:
        opacity .2s ease,
        transform .2s ease,
        visibility .2s ease;
}

.bp-primary-menu li:hover > .sub-menu,
.bp-primary-menu li:focus-within > .sub-menu,
.bp-primary-menu li.bp-submenu-open > .sub-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.bp-primary-menu .sub-menu li {
    position: relative;
    margin: 0;
    padding: 0;
}

.bp-primary-menu .sub-menu a {
    display: block;
    padding: 12px 16px;
    color: #202b55;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    text-transform: none;
    border-bottom: 1px solid #eee;
}

.bp-primary-menu .sub-menu a:hover,
.bp-primary-menu .sub-menu a:focus-visible {
    background: #f5f5f5;
    color: #f2670a;
}

.bp-primary-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
}

/* Desktop submenu toggle buttons */

.bp-primary-menu .bp-submenu-toggle {
    position: absolute;
    top: 50%;
    right: 3px;
    display: none;
    width: 26px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #202b55;
    cursor: pointer;
    transform: translateY(-50%);
}

.bp-mobile-nav-toggle {
    display: none;
}

/* ---------- CATEGORY SIDEBAR ---------- */

.bp-category-sidebar {
    position: relative;
    z-index: 900;
    flex: 0 0 270px;
    width: 270px;
    max-width: 100%;
    background: #f2670a;
    color: #fff;
}

.bp-category-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 16px 18px;
    border: 0;
    background: #f2670a;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.bp-category-arrow {
    margin-left: auto;
    transition: transform .2s ease;
}

.bp-category-sidebar.bp-categories-closed .bp-category-arrow {
    transform: rotate(-90deg);
}

/* Category list */

.bp-category-list,
.bp-category-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bp-category-list {
    display: block;
}

.bp-category-sidebar.bp-categories-closed .bp-category-list {
    display: none;
}

.bp-category-list > li {
    position: relative;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(150, 60, 0, .25);
}

.bp-category-list > li > a {
    display: block;
    padding: 15px 40px 15px 18px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    text-transform: uppercase;
}

.bp-category-list a:hover,
.bp-category-list a:focus-visible {
    background: #d95400;
    color: #fff;
}

/* Nested category submenus */

.bp-category-list .children {
    position: static;
    display: block;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    background: #e75c00;
    pointer-events: none;
    transition:
        max-height .25s ease,
        opacity .2s ease,
        visibility .2s ease;
}

.bp-category-list li:hover > .children,
.bp-category-list li:focus-within > .children,
.bp-category-list li.bp-submenu-open > .children {
    max-height: 1200px;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.bp-category-list .children a {
    display: block;
    padding: 12px 36px 12px 28px;
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
    text-decoration: none;
    text-transform: none;
}

.bp-category-list .children .children a {
    padding-left: 42px;
}

/* Expand buttons added by JavaScript */

.bp-category-list .bp-submenu-toggle {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.bp-category-list .bp-submenu-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
}

/* More Categories button */

.bp-more-categories {
    display: block;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-top: 1px solid rgba(150, 60, 0, .3);
    background: #f2670a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
}

.bp-more-categories:hover,
.bp-more-categories:focus-visible {
    background: #d95400;
    color: #fff;
}

.bp-category-list > li.bp-category-hidden {
    display: none;
}

/* ---------- SEARCH BAR ROW ---------- */

.bp-category-search-row {
    position: relative;
    z-index: 800;
    display: flex;
    align-items: stretch;
    width: 100%;
    background: #202b55;
}

.bp-existing-search {
    flex: 1 1 auto;
    min-width: 0;
}

/* ---------- MOBILE ---------- */

@media (max-width: 767px) {
    .bp-mobile-nav-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 14px 18px;
        border: 0;
        background: #202b55;
        color: #fff;
        font-weight: 700;
        text-align: left;
        cursor: pointer;
    }

    .bp-primary-menu {
        display: none;
        align-items: stretch;
        flex-direction: column;
        width: 100%;
        background: #f5f5f5;
    }

    .bp-main-nav.bp-mobile-open .bp-primary-menu {
        display: flex;
    }

    .bp-primary-menu > li {
        width: 100%;
        border-bottom: 1px solid #ddd;
    }

    .bp-primary-menu > li > a {
        padding: 14px 45px 14px 18px;
    }

    .bp-primary-menu .bp-submenu-toggle {
        top: 5px;
        right: 8px;
        display: flex;
        transform: none;
    }

    .bp-primary-menu .sub-menu,
    .bp-primary-menu .sub-menu .sub-menu {
        position: static;
        display: block;
        min-width: 0;
        max-height: 0;
        overflow: hidden;
        padding-left: 14px;
        visibility: hidden;
        opacity: 0;
        box-shadow: none;
        pointer-events: none;
        transform: none;
    }

    .bp-primary-menu li.bp-submenu-open > .sub-menu {
        max-height: 1200px;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .bp-category-sidebar {
        flex: 0 0 auto;
        width: 100%;
    }

    .bp-category-search-row {
        flex-direction: column;
    }

    .bp-category-sidebar .bp-category-heading {
        min-height: 48px;
    }

    .bp-category-list > li > a {
        padding-top: 13px;
        padding-bottom: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bp-primary-menu .sub-menu,
    .bp-category-list .children,
    .bp-category-arrow {
        transition: none;
    }
}
