:root {
    --nav-bg-color: #ffffff;
    --nav-text-color: #333333;
    --nav-hover-color: #f5f5f5;
    --nav-active-color: #e65c00;
    --nav-border-color: #dddddd;
    --nav-focus-color: #e65c00;
    --nav-transition-speed: 0.35s;
    --nav-shadow: -4px 0 12px rgba(0,0,0,0.15);
    --nav-backdrop: rgba(0,0,0,0.5);
    --offcanvas-width: 320px;
}

.smartnav-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mod-smartnav-drilldown {
    font-family: inherit;
    width: 100%;
}

.mod-smartnav-drilldown *:focus-visible {
    outline: 3px solid var(--nav-focus-color) !important;
    outline-offset: -3px;
}

.mod-smartnav-drilldown *:focus:not(:focus-visible) {
    outline: none;
}

.smartnav-mobile-toggle,
.smartnav-btn-toggle,
.smartnav-btn-back,
.smartnav-offcanvas-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--nav-text-color);
}

.smartnav-mobile-toggle,
.smartnav-btn-toggle,
.smartnav-btn-back,
.smartnav-offcanvas-close,
.smartnav-link {
    min-height: 48px;
    min-width: 48px;
}

.smartnav-item.current > .smartnav-link,
.smartnav-item.active > .smartnav-link {
    font-weight: 700;
    color: var(--nav-active-color);
}

.smartnav-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--nav-active-color);
    color: #ffffff;
    margin-left: 8px;
    line-height: 1;
}

.smartnav-offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--nav-border-color);
    background: var(--nav-bg-color);
    min-height: 56px;
}

.smartnav-offcanvas-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.smartnav-offcanvas-footer {
    padding: 16px;
    border-top: 1px solid var(--nav-border-color);
    background: var(--nav-hover-color);
    margin-top: auto;
}

.smartnav-footer-link,
.smartnav-footer-text {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    color: var(--nav-active-color);
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .smartnav-mobile-toggle {
        font-size: 1.5rem;
        width: 48px;
        height: 48px;
        background-color: var(--nav-bg-color);
        border: 1px solid var(--nav-border-color);
        border-radius: 4px;
    }

    .smartnav-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--nav-backdrop);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--nav-transition-speed) ease;
    }

    .smartnav-backdrop.is-active {
        opacity: 1;
        visibility: visible;
    }

    .smartnav-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        max-width: var(--offcanvas-width);
        height: 100vh;
        background: var(--nav-bg-color);
        box-shadow: var(--nav-shadow);
        overflow-x: hidden;
        overflow-y: auto;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform var(--nav-transition-speed) ease-in-out;
        visibility: hidden;
        display: flex;
        flex-direction: column;
    }

    .smartnav-nav.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .smartnav-menu-wrapper {
        flex: 1;
        position: relative;
    }

    .smartnav-drilldown-menu,
    .smartnav-drilldown-submenu {
        list-style: none;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .smartnav-drilldown-submenu {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        min-height: 100%;
        background: var(--nav-bg-color);
        transform: translateX(100%);
        transition: transform var(--nav-transition-speed) ease-in-out;
        z-index: 10;
        visibility: hidden;
    }

    .smartnav-drilldown-submenu.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .smartnav-item,
    .smartnav-back-item {
        display: flex;
        align-items: center;
        border-bottom: 1px solid var(--nav-border-color);
    }

    .smartnav-item:last-child {
        border-bottom: none;
    }

    .smartnav-link {
        flex: 1;
        display: flex;
        align-items: center;
        padding: 0 16px;
        text-decoration: none;
        color: var(--nav-text-color);
    }

    .smartnav-link:hover {
        background-color: var(--nav-hover-color);
    }

    .smartnav-active-indicator {
        display: inline-block;
        width: 6px;
        height: 20px;
        background-color: var(--nav-active-color);
        border-radius: 3px;
        margin-left: auto;
    }

    .smartnav-btn-toggle {
        width: 48px;
        border-left: 1px solid var(--nav-border-color);
    }

    .smartnav-btn-toggle:hover,
    .smartnav-btn-back:hover,
    .smartnav-offcanvas-close:hover {
        background-color: var(--nav-hover-color);
    }

    .smartnav-btn-back {
        width: 100%;
        justify-content: flex-start;
        padding: 0 16px;
        font-weight: bold;
        border-bottom: 1px solid var(--nav-border-color);
        background-color: var(--nav-hover-color);
    }

    .smartnav-back-text {
        margin-left: 8px;
    }
}

@media (min-width: 992px) {
    .smartnav-mobile-toggle,
    .smartnav-backdrop,
    .smartnav-offcanvas-header,
    .smartnav-offcanvas-footer {
        display: none !important;
    }

    .mod-smartnav-drilldown {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        width: 100%;
        margin-left: auto;
    }

    .smartnav-nav,
    .smartnav-menu-wrapper {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        width: 100%;
        margin-left: auto;
        position: static;
        box-shadow: none;
        transform: none;
        overflow: visible;
        height: auto;
        background: transparent;
    }

    .smartnav-drilldown-menu {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        margin-left: auto;
        list-style: none;
        margin-top: 0;
        margin-bottom: 0;
        padding: 0;
        background: transparent;
    }

    .smartnav-item {
        position: relative;
        display: flex;
        align-items: center;
    }

    .smartnav-link {
        display: flex;
        align-items: center;
        padding: 0 20px;
        text-decoration: none;
        color: var(--nav-text-color);
        white-space: nowrap;
        position: relative;
    }

    .smartnav-link:hover {
        background-color: var(--nav-hover-color);
    }

    .mod-smartnav-drilldown.indicator-style-underline .smartnav-drilldown-menu > .smartnav-item > .smartnav-link .smartnav-active-indicator {
        position: absolute;
        bottom: 0;
        left: 16px;
        right: 16px;
        width: auto;
        height: 3px;
        background-color: var(--nav-active-color);
        border-radius: 3px 3px 0 0;
        margin: 0;
    }

    .mod-smartnav-drilldown.indicator-style-line-left .smartnav-drilldown-menu > .smartnav-item > .smartnav-link .smartnav-active-indicator {
        position: absolute;
        top: 12px;
        bottom: 12px;
        left: 0;
        width: 3px;
        height: auto;
        background-color: var(--nav-active-color);
        border-radius: 0 3px 3px 0;
        margin: 0;
    }

    .mod-smartnav-drilldown.indicator-style-bg-accent .smartnav-drilldown-menu > .smartnav-item.active > .smartnav-link,
    .mod-smartnav-drilldown.indicator-style-bg-accent .smartnav-drilldown-menu > .smartnav-item.current > .smartnav-link {
        background-color: var(--nav-hover-color);
        border-radius: 4px;
    }

    .mod-smartnav-drilldown.indicator-style-bg-accent .smartnav-active-indicator,
    .mod-smartnav-drilldown.indicator-style-none .smartnav-active-indicator {
        display: none !important;
    }

    .smartnav-btn-toggle {
        padding: 0 10px;
    }

    .smartnav-drilldown-submenu {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        width: auto;
        min-width: 240px;
        min-height: 0;
        background: var(--nav-bg-color);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        list-style: none;
        margin: 0;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: opacity var(--nav-transition-speed), transform var(--nav-transition-speed), visibility var(--nav-transition-speed);
        z-index: 1000;
        border: 1px solid var(--nav-border-color);
        border-radius: 4px;
    }

    .smartnav-drilldown-submenu .smartnav-drilldown-submenu {
        top: 0;
        right: 100%;
        left: auto;
        transform: translateX(-10px);
    }

    .smartnav-item.hover-open > .smartnav-drilldown-submenu {
        opacity: 1;
        visibility: visible;
        transform: translate(0, 0);
    }

    .smartnav-item.mega-cols-2 > .smartnav-drilldown-submenu,
    .smartnav-item.mega-cols-3 > .smartnav-drilldown-submenu {
        display: grid;
        gap: 0;
        padding: 8px 0;
    }

    .smartnav-item.mega-cols-2 > .smartnav-drilldown-submenu {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
        min-width: 440px;
    }

    .smartnav-item.mega-cols-3 > .smartnav-drilldown-submenu {
        grid-template-columns: repeat(3, minmax(200px, 1fr));
        min-width: 600px;
    }

    .smartnav-item[class*="mega-cols-"] > .smartnav-drilldown-submenu .smartnav-item {
        border-bottom: none;
        width: 100%;
    }

    .smartnav-back-item {
        display: none;
    }

    .smartnav-drilldown-submenu .smartnav-item {
        width: 100%;
        border-bottom: 1px solid var(--nav-border-color);
    }

    .smartnav-drilldown-submenu .smartnav-item:last-child {
        border-bottom: none;
    }

    .smartnav-drilldown-submenu .smartnav-link {
        width: 100%;
        justify-content: space-between;
        padding: 12px 20px;
    }

    .smartnav-drilldown-submenu .smartnav-active-indicator {
        position: static;
        display: inline-block;
        width: 6px;
        height: 16px;
        background-color: var(--nav-active-color);
        border-radius: 3px;
        margin-left: auto;
    }

    .smartnav-drilldown-submenu .smartnav-btn-toggle {
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
    }
}