:root {
    --nav-height: 74px;
}

body {
    padding-bottom: calc(var(--nav-height) + 28px);
}

.bottom-nav {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    display: flex;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 14px 36px rgba(0,0,0,.18);
    padding: 10px;
    gap: 6px;
    width: min(680px, calc(100% - 32px));
    justify-content: space-between;
}

    .bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 14px 10px;
        border-radius: 40px;
        font-size: 16px;
        font-weight: 800;
        color: #000;
        transition: background .25s ease, color .25s ease;
        flex: 1;
    }

    .bottom-nav a i { display: none; }

        .bottom-nav a.active, .bottom-nav a:hover {
            background: var(--lp-primary);
            color: #fff;
        }

@media (max-width: 700px) {
    :root { --nav-height: 68px; }
    body { padding-bottom: calc(var(--nav-height) + 22px); }
    .bottom-nav {
        bottom: max(8px, env(safe-area-inset-bottom));
        width: calc(100% - 16px);
        min-height: var(--nav-height);
        padding: 5px;
        display: flex !important;
        z-index: 9999;
        gap: 2px;
        border: 1px solid #e7ded4;
        border-radius: 20px;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 10px 30px rgba(52, 30, 20, .18) !important;
    }
    .bottom-nav a { min-width: 0; gap: 3px; padding: 7px 2px; font-size: 10px; line-height: 1; }
    .bottom-nav a i { display: block; font-size: 18px; line-height: 1; }
    .bottom-nav a span { display: block; overflow: hidden; max-width: 100%; text-overflow: ellipsis; }
    .bottom-nav a.active, .bottom-nav a:hover { background: var(--lp-primary); color: #fff; }
}

/* Keep customer navigation floating above every mobile page, including wider phones. */
@media (max-width: 900px) {
    body {
        padding-bottom: calc(var(--nav-height) + 32px);
    }

    .bottom-nav {
        position: fixed !important;
        right: auto;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 9999 !important;
    }
}
