/* Cheriks – app-style mobile bottom navigation
   Path: public/frontend/assets/css/mobile-bottom-nav.css */
.ck-appnav {
    display: none;
}

@media (max-width: 991.98px) {
    :root {
        --ck-nav-h: 64px;
        --ck-safe-b: env(safe-area-inset-bottom, 0px);
    }

    /* keep page content (footer etc.) from hiding behind the bar */
    body {
        padding-bottom: calc(var(--ck-nav-h) + var(--ck-safe-b));
    }

    /* z-index 990: below the slide-in menu (1001), filter sheet (1000),
       search overlay (99999) and toasts, so those correctly cover the bar */
    .ck-appnav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 990;
        height: calc(var(--ck-nav-h) + var(--ck-safe-b));
        padding: 0 6px var(--ck-safe-b);
        background: #fff;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -6px 20px rgba(0, 0, 0, .12);
        -webkit-tap-highlight-color: transparent;
        transition: transform .25s ease;
    }

    .ck-appnav.is-hidden {
        transform: translateY(110%);
    }

    .ck-appnav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #7d7d7d;
        text-decoration: none;
        font-size: 11px;
        font-weight: 600;
        line-height: 1;
    }

    .ck-appnav .ck-ico {
        position: relative;
        width: 44px;
        height: 28px;
        display: grid;
        place-items: center;
        border-radius: 14px;
        transition: background .2s ease, transform .15s ease;
    }

    .ck-appnav svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .ck-appnav a.is-active {
        color: var(--red, #fc3335);
    }

    .ck-appnav a.is-active .ck-ico {
        background: var(--redSubtle, #fee7ed);
    }

    .ck-appnav a:active .ck-ico {
        transform: scale(.88);
    }

    .ck-appnav .ck-badge {
        position: absolute;
        top: -5px;
        right: 1px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        border-radius: 9px;
        background: var(--red, #fc3335);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        line-height: 17px;
        text-align: center;
        border: 2px solid #fff;
        box-sizing: content-box;
    }

    /* existing fixed/sticky elements that must sit ABOVE the new bar */
    .mobSummaryItem {
        bottom: calc(var(--ck-nav-h) + var(--ck-safe-b));
        z-index: 995;
    }

    .filterTrigger {
        bottom: calc(var(--ck-nav-h) + var(--ck-safe-b) + 12px);
    }
}
