#page {
    padding: 1.5rem 0 3rem;

    .title {
        font-size: var(--heading-font-size);
        margin-bottom: 1.2rem;
    }
}

.page {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - var(--footer-height));

    .categories-nav {
        height: 3.2rem;
        display: flex;
        align-items: center;
        gap: 0.4rem;
        position: relative;

        /* Breaks out of the page's normal side margins on mobile so
           the category list starts exactly at the screen edge margin
           and scrolls all the way to the true edge, instead of being
           boxed in like the rest of the page content. */
        width: 100vw;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        padding-left: 3%;
        padding-right: 3%;

        .list-wrap {
            flex: 1;
            overflow-x: auto;
            overflow-y: hidden;
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;

            &::-webkit-scrollbar {
                display: none;
            }
        }

        .list {
            display: flex;
            flex-wrap: nowrap;
            gap: 1rem;
            
            a {
                font-size: var(--small-font-size);
                font-weight: 500;
                white-space: nowrap;
            }
        }

        .cat-prev,
        .cat-next {
            flex-shrink: 0;
            width: 1.8rem;
            height: 1.8rem;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: #f5f5f5;
            border: var(--border);
            border-radius: 50%;
            cursor: pointer;
            transition: opacity 0.15s;

            .icon {
                width: 1rem;
                height: 1rem;
                stroke: var(--txt-color);
            }
        }

        .cat-prev.hidden,
        .cat-next.hidden {
            visibility: hidden;
            opacity: 0;
        }
    }

    .results-msg {
        padding: 1rem 0;
        font-size: var(--small-font-size);

        .result {
            font-weight: 500;
            color: var(--title-color);
        }
    }

    .empty {
        padding: 2rem 0 1rem 0;
        text-align: center;
        font-size: var(--small-font-size);
        font-style: italic;
    }
}

.browse-trending-heading {
    margin: 1rem 0 1rem 0;
    font-size: var(--normal-font-size);
    font-weight: 600;
}

a.active {
    color: var(--primary-color);
}

.pagination {
    margin-bottom: 1.5rem;
    * {
        font-size: var(--small-font-size);
        padding: 0.5rem;
    }

    .prev, .next {
        padding: 0.5rem 0;
    }

    .nav-links {
        padding: 0;
        display: flex;
        gap: 0.5rem;
        align-items: center;

        span {
            padding: 0.5rem 1rem;
            color: #fff;
            background-color: var(--primary-color);
            border-radius: var(--bd-rad-sm);
        }
    }
}


@media only screen and (min-width: 770px) {
    
    .page {
        .categories-nav {
            width: auto;
            left: auto;
            right: auto;
            margin-left: 0;
            margin-right: 0;
            padding-left: 0;
            padding-right: 0;

            .list {
                gap: 1.5rem;
            }
        }
    }

    .pagination {
        .nav-links {
            gap: 1rem;
            justify-content: center;
        }
    }
}
/* Breadcrumb navigation */
.breadcrumbs {
    margin: 1.6rem 0 1rem 0;
}

@media only screen and (min-width: 640px) {
    .breadcrumbs {
        margin: 1rem 0;
    }
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: var(--very-small-font-size);
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs a {
    color: var(--txt-faded);
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs .sep {
    margin: 0 0.5rem;
    color: #bbb;
}

.breadcrumbs .current {
    color: var(--txt-color);
    font-weight: 500;
}
