/* Flat bottom dock — no floating hub */

.sg-nav-bottom {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 850;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: stretch;
    min-height: var(--sg-nav-bottom-h);
    padding: 0.25rem 0.35rem calc(0.25rem + var(--sg-safe-bottom));
    background: #12181b;
    border-top: 1px solid rgba(245, 243, 238, 0.08);
}

.sg-nav-bottom__link,
.sg-nav-bottom__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 48px;
    padding: 0.25rem;
    border: 0;
    background: transparent;
    color: rgba(245, 243, 238, 0.5);
    font-size: 0.62rem;
    font-weight: 500;
    cursor: pointer;
}

.sg-nav-bottom__link i,
.sg-nav-bottom__btn i {
    font-size: 1rem;
}

.sg-nav-bottom__link.is-active,
.sg-nav-bottom__link:hover,
.sg-nav-bottom__btn:hover {
    color: var(--sg-malachite);
}

.sg-nav-bottom__form {
    margin: 0;
    display: contents;
}

@media (min-width: 992px) {
    .sg-nav-bottom {
        display: none;
    }

    body.sg-body {
        padding-bottom: 0;
    }

    :root {
        --sg-header-h: 52px;
    }
}

/* Category rail — compact chip strip */
.sg-rail {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0.45rem 0.75rem;
    background: #12181b;
    border-bottom: 1px solid rgba(245, 243, 238, 0.08);
}

.sg-rail::-webkit-scrollbar { display: none; }
.sg-rail__title { display: none; }

.sg-rail__plate {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 34px;
    padding: 0.25rem 0.7rem;
    border: 1px solid rgba(245, 243, 238, 0.12);
    background: transparent;
    color: rgba(245, 243, 238, 0.72);
    font-size: 0.8rem;
    font-weight: 550;
    cursor: pointer;
    white-space: nowrap;
}

.sg-rail__num {
    font-family: var(--sg-font-latin);
    font-size: 0.65rem;
    color: var(--sg-malachite);
}

.sg-rail__count {
    font-size: 0.68rem;
    color: rgba(245, 243, 238, 0.4);
}

.sg-rail__plate.is-active {
    border-color: var(--sg-malachite);
    color: #fff;
    background: rgba(11, 218, 81, 0.1);
}

.sg-rail__mark {
    width: 8px;
    height: 8px;
    background: var(--sg-malachite);
}

.sg-rail--mobile {
    position: sticky;
    top: var(--sg-header-h);
    z-index: 70;
}

.sg-rail--desktop { display: none; }

@media (min-width: 1100px) {
    .sg-rail--mobile { display: none; }

    .sg-rail--desktop {
        display: flex;
        flex-direction: column;
        position: sticky;
        top: calc(var(--sg-header-h) + 0.75rem);
        max-height: calc(100vh - var(--sg-header-h) - 1.5rem);
        overflow: auto;
        width: 200px;
        flex-shrink: 0;
        padding: 0.75rem;
        gap: 0.25rem;
        background: var(--sg-white);
        border: 1px solid var(--sg-border);
    }

    .sg-rail--desktop .sg-rail__title {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        margin-bottom: 0.4rem;
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--sg-charcoal);
    }

    .sg-rail--desktop .sg-rail__plate {
        width: 100%;
        justify-content: flex-start;
        color: var(--sg-text);
        border-color: transparent;
        background: transparent;
    }

    .sg-rail--desktop .sg-rail__plate.is-active {
        background: var(--sg-charcoal);
        color: #fff;
        border-color: transparent;
    }

    .sg-rail--desktop .sg-rail__count {
        color: inherit;
        opacity: 0.55;
        margin-inline-start: auto;
    }
}
