/* 分类页（Tbox 风格） */

.page-category.main--category,
.page-category #main-content,
body.page-category {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: clip;
}

body.page-category {
    --main-max-width: 1600px;
}

.page-category #main-content.main--category {
    padding-top: 0;
    scroll-padding-top: var(--main-nav-hight, 80px);
}

.page-category .category-page {
    width: 100%;
    padding: 10px 10px 32px;
    max-width: var(--main-max-width, 1600px);
    margin: 0 auto;
    box-sizing: border-box;
}

/* 分类页无侧栏：顶栏/页脚与正文同宽 */
.page-home.page-category .header-inner.container,
.page-home.page-category .header-inner.container-header {
    max-width: var(--main-max-width);
}

.page-home.page-category .main-footer .tbox-footer-wrap.container-footer.container {
    max-width: var(--main-max-width) !important;
}

.page-category .category-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    grid-template-areas:
        "breadcrumb ."
        "main sidebar";
    gap: 16px 20px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.page-category .category-breadcrumbs {
    grid-area: breadcrumb;
}

.page-category .category-detail-main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.page-category .category-detail-aside {
    grid-area: sidebar;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.page-category .category-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    padding: 0 2px;
    font-size: 12px;
    color: var(--muted-color2, #66686b);
}

.page-category .category-breadcrumbs a {
    color: var(--muted-color2, #66686b);
}

.page-category .category-breadcrumbs a:hover {
    color: var(--focus-color, #f1404b);
}

.page-category .category-bc-sep {
    color: var(--muted-color3, #a5a8aa);
}

.page-category .category-bc-current {
    color: var(--main-color, #484b4f);
}

.page-category .content-card {
    background: var(--main-bg-color, #fff);
    border-radius: var(--main-radius, 12px);
    box-shadow: 0 5px 25px 0 var(--main-shadow, rgba(0, 0, 0, 0.08));
    padding: 20px 22px 24px;
}

.page-category .category-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.page-category .category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--main-color, #484b4f);
}

.page-category .category-icon {
    font-size: 1.2em;
    line-height: 1;
}

.page-category .category-lead {
    margin: 0;
    max-width: 720px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--muted-color2, #66686b);
}

.page-category .category-meta {
    flex-shrink: 0;
    white-space: nowrap;
    padding-top: 4px;
}

.page-category .category-body {
    min-width: 0;
}

.page-category .category-tabs-wrap {
    margin-bottom: 16px;
}

.page-category .category-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: var(--muted-bg-color, #e6e8ea);
    border-radius: var(--main-radius, 12px);
    max-width: 100%;
}

.page-category .category-tabs .tab-item {
    list-style: none;
    flex-shrink: 0;
}

.page-category .category-tab-link {
    display: inline-block;
    padding: 0;
    border-radius: 8px;
    font-size: 13px;
    color: var(--muted-color2, #66686b);
    white-space: nowrap;
    transition: color 0.2s, background-color 0.2s;
}

.page-category .category-tabs .tab-item.active .category-tab-link {
    color: #fff;
    background: var(--focus-color, #f1404b);
    font-weight: 600;
}

.page-category .category-tabs .tab-item:not(.active) .category-tab-link:hover {
    color: var(--main-color, #484b4f);
    background: rgba(255, 255, 255, 0.72);
}

.page-category .category-tool-grid {
    --home-card-padding: 10px;
    margin-left: calc(var(--home-card-padding) * -0.5);
    margin-right: calc(var(--home-card-padding) * -0.5);
}

.page-category .posts-item.sites-item.style-sites-max {
    flex-direction: column;
    background: var(--main-bg-color, #fff);
    border-radius: var(--main-radius, 12px);
    overflow: hidden;
}

.page-category .category-empty {
    margin: 0;
    padding: 24px 0;
    text-align: center;
    color: var(--muted-color2, #66686b);
    font-size: 14px;
}

.page-category .category-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.page-category .category-pagination nav {
    width: 100%;
    display: flex;
    justify-content: center;
}

.page-category .category-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-category .category-pagination li {
    list-style: none;
}

.page-category .category-pagination a,
.page-category .category-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--main-color, #484b4f);
    background: var(--muted-bg-color-l, #f1f2f4);
}

.page-category .category-pagination a:hover {
    color: var(--focus-color, #f1404b);
    background: rgba(241, 64, 75, 0.08);
}

.page-category .category-pagination .active span {
    color: #fff;
    background: var(--focus-color, #f1404b);
}

html.io-black-mode .page-category .content-card {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

html.io-black-mode .page-category .category-tabs {
    background: var(--muted-bg-color, #24262a);
}

@media (max-width: 767px) {
    .page-category .category-hero {
        flex-direction: column;
        gap: 8px;
    }

    .page-category .category-meta {
        padding-top: 0;
    }

    .page-category .content-card {
        padding: 16px 14px 18px;
    }
}

@media (max-width: 991px) {
    .page-category #main-content.main--category {
        padding-top: 0;
    }

    .page-category .category-detail-layout {
        max-width: 100%;
        grid-template-columns: 1fr;
        grid-template-areas:
            "breadcrumb"
            "main"
            "sidebar";
        gap: 14px;
    }
}
