/* ==========================================================
   JONGEN MOBILE NAVIGATION
   Premium Floating Dock for OXID Apex
   ========================================================== */

@media (max-width: 991.98px) {
    body {
        padding-bottom: calc(102px + env(safe-area-inset-bottom));
        background: #474c58;
    }

    .mobile-nav {
        --jmn-blue: #062c4d;
        --jmn-blue-light: #0c456f;
        --jmn-red: #063f69;
        --jmn-white: #ffffff;
        --jmn-muted: #b9cad8;

        position: fixed;
        right: 12px;
        bottom: 12px;
        left: 12px;
        z-index: 1050;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: stretch;
        width: auto;
        min-height: 78px;
        padding: 7px 7px calc(7px + env(safe-area-inset-bottom));
        overflow: visible;
        background: linear-gradient(145deg, rgba(12, 63, 101, .98), rgba(5, 37, 64, .99));
        border: 1px solid rgba(255, 255, 255, .12);
        border-radius: 22px;
        box-shadow: 0 20px 45px rgba(0, 24, 45, .28),
                    0 5px 14px rgba(0, 24, 45, .18),
                    inset 0 1px 0 rgba(255, 255, 255, .07);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
    }

    .mobile-nav::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        width: 64px;
        height: 3px;
        background: var(--jmn-red);
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 12px rgba(6, 63, 105, .45);
        transform: translateX(-50%);
    }

    .mobile-nav > .mobile-nav__item,
    .mobile-nav__basket,
    .mobile-nav__basket > * {
        min-width: 0;
    }

    .mobile-nav > .mobile-nav__item,
    .mobile-nav__basket .btn-minibasket {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 100%;
        min-width: 0;
        min-height: 64px;
        margin: 0;
        padding: 5px 2px;
        color: var(--jmn-muted);
        text-decoration: none;
        background: transparent;
        border: 0;
        border-radius: 15px;
        box-shadow: none;
        transition: color .18s ease, background-color .18s ease, transform .18s ease;
    }

    .mobile-nav__basket {
        display: flex;
        align-items: stretch;
        justify-content: stretch;
        margin: 0;
        padding: 0;
    }

    .mobile-nav__basket > * {
        display: flex;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .mobile-nav__icon {
        position: relative;
        display: flex;
        flex: 0 0 37px;
        align-items: center;
        justify-content: center;
        width: 37px;
        height: 37px;
        color: var(--jmn-white);
        background: rgba(255, 255, 255, .075);
        border: 1px solid rgba(255, 255, 255, .09);
        border-radius: 12px;
        transition: color .18s ease, background-color .18s ease,
                    border-color .18s ease, transform .18s ease;
    }

    /* Modernes Mega-Menue-Symbol aus vier Kacheln */
    .mobile-nav__menu-icon {
        display: grid;
        grid-template-columns: repeat(2, 7px);
        grid-template-rows: repeat(2, 7px);
        gap: 3px;
        width: 17px;
        height: 17px;
    }

    .mobile-nav__menu-icon span {
        display: block;
        width: 7px;
        height: 7px;
        background: currentColor;
        border-radius: 2px;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
        transition: border-radius .18s ease, transform .18s ease;
    }



    .mobile-nav__menu .mobile-nav__icon {
        background: rgba(255, 255, 255, .1);
        border-color: rgba(255, 255, 255, .13);
    }

    .mobile-nav__icon svg,
    .mobile-nav__basket .btn-minibasket > svg {
        display: block;
        width: 21px;
        height: 21px;
        color: currentColor;
        fill: currentColor;
    }

    .mobile-nav__basket .btn-minibasket > svg {
        box-sizing: content-box;
        padding: 7px;
        color: var(--jmn-white);
        background: rgba(255, 255, 255, .075);
        border: 1px solid rgba(255, 255, 255, .09);
        border-radius: 12px;
    }

    .mobile-nav .btn-text {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        color: inherit;
        font-size: .66rem;
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: .01em;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-nav .badge,
    .mobile-nav__badge {
        position: absolute;
        top: -6px;
        right: -7px;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 19px;
        height: 19px;
        margin: 0;
        padding: 0 5px;
        color: #fff;
        font-size: .61rem;
        font-weight: 800;
        line-height: 1;
        background: var(--jmn-red);
        border: 2px solid var(--jmn-blue);
        border-radius: 999px;
        box-shadow: 0 3px 8px rgba(6, 63, 105, .42);
    }

    .mobile-nav__basket .btn-minibasket {
        position: relative;
    }

    .mobile-nav__basket .btn-minibasket .badge {
        top: 2px;
        right: calc(50% - 25px);
    }

    .mobile-nav .mobile-nav__item[aria-expanded="true"] {
        color: #fff;
        background: rgba(255, 255, 255, .08);
    }

    .mobile-nav .mobile-nav__item[aria-expanded="true"] .mobile-nav__icon {
        color: #fff;
        background: var(--jmn-red);
        border-color: rgba(255, 255, 255, .2);
        box-shadow: 0 7px 16px rgba(6, 63, 105, .3),
                    inset 0 1px 0 rgba(255, 255, 255, .2);
    }


    .mobile-nav__menu[aria-expanded="true"] .mobile-nav__menu-icon span {
        border-radius: 50%;
        transform: scale(.84);
    }

    /* Nur explizit als aktiv markierte Links hervorheben. */
    .mobile-nav .mobile-nav__item.active,
    .mobile-nav .mobile-nav__item[aria-current="page"] {
        color: #fff;
        background: rgba(255, 255, 255, .08);
    }

    .mobile-nav .mobile-nav__item.active .mobile-nav__icon,
    .mobile-nav .mobile-nav__item[aria-current="page"] .mobile-nav__icon {
        color: #fff;
        background: var(--jmn-red);
        border-color: rgba(255, 255, 255, .2);
        box-shadow: 0 7px 16px rgba(6, 63, 105, .3),
                    inset 0 1px 0 rgba(255, 255, 255, .2);
    }

    .mobile-nav .mobile-nav__item:focus-visible,
    .mobile-nav__basket .btn-minibasket:focus-visible {
        color: #fff;
        outline: 2px solid rgba(255, 255, 255, .85);
        outline-offset: -3px;
        box-shadow: none;
    }

    .mobile-nav .mobile-nav__item:active,
    .mobile-nav__basket .btn-minibasket:active {
        transform: scale(.96);
    }
}

@media (max-width: 991.98px) and (hover: hover) and (pointer: fine) {
    .mobile-nav .mobile-nav__item:hover,
    .mobile-nav__basket .btn-minibasket:hover {
        color: #fff;
        background: rgba(255, 255, 255, .065);
    }

    .mobile-nav .mobile-nav__item:hover .mobile-nav__icon {
        color: #fff;
        background: rgba(255, 255, 255, .14);
        border-color: rgba(255, 255, 255, .18);
        transform: translateY(-2px);
    }
}

@media (max-width: 389.98px) {
    body {
        padding-bottom: calc(94px + env(safe-area-inset-bottom));
    }

    .mobile-nav {
        right: 6px;
        bottom: 6px;
        left: 6px;
        min-height: 72px;
        padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
        border-radius: 18px;
    }

    .mobile-nav > .mobile-nav__item,
    .mobile-nav__basket .btn-minibasket {
        min-height: 60px;
        padding-right: 1px;
        padding-left: 1px;
    }

    .mobile-nav__icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }



    .mobile-nav__menu .mobile-nav__icon {
        background: rgba(255, 255, 255, .1);
        border-color: rgba(255, 255, 255, .13);
    }

    .mobile-nav__icon svg,
    .mobile-nav__basket .btn-minibasket > svg {
        width: 19px;
        height: 19px;
    }

    .mobile-nav__basket .btn-minibasket > svg {
        padding: 6px;
    }

    .mobile-nav .btn-text {
        font-size: .59rem;
        letter-spacing: 0;
    }
}

/* FINAL: MOBILE NAVIGATION EINHEITLICH BLAU */
@media (max-width: 991.98px) {
    .mobile-nav {
        --jmn-blue: #063f69;
        --jmn-blue-light: #0c527f;
        --jmn-red: #063f69;
        background: linear-gradient(145deg, rgba(6,63,105,.98), rgba(3,29,51,.99));
    }
    .mobile-nav::before {
        background: #063f69;
        box-shadow: 0 4px 12px rgba(6,63,105,.38);
    }
    .mobile-nav .badge,
    .mobile-nav__badge {
        background: #063f69;
        border-color: #031d33;
        box-shadow: 0 3px 8px rgba(6,63,105,.38);
    }
    .mobile-nav .mobile-nav__item[aria-expanded="true"] .mobile-nav__icon,
    .mobile-nav .mobile-nav__item.active .mobile-nav__icon,
    .mobile-nav .mobile-nav__item[aria-current="page"] .mobile-nav__icon {
        background: #063f69;
        box-shadow: 0 7px 16px rgba(6,63,105,.3), inset 0 1px 0 rgba(255,255,255,.2);
    }
}

