/* 分类聚合页 category.php */

.category-page {
    padding: 40px 0;
}

.cat-page-header {
    text-align: center;
    margin-bottom: 35px;
}

.cat-page-header h1 {
    color: #8b4513;
    font-size: 2.4rem;
    margin-bottom: 12px;
}

.cat-page-sub {
    color: #a0522d;
    font-size: 1.1rem;
}

.cat-page-sub strong {
    color: #d2691e;
    font-size: 1.25rem;
}

/* 分组 */
.cat-group {
    background: rgba(244, 241, 232, 0.9);
    border-radius: 20px;
    padding: 30px 35px;
    margin-bottom: 28px;
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.1);
}

.cat-group-title {
    color: #8b4513;
    font-size: 1.5rem;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid #d2691e;
}

.cat-group-title i {
    color: #d2691e;
    margin-right: 8px;
}

/* 部类卡片 */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.cat-tile {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px 20px;
    background: rgba(232, 220, 192, 0.45);
    border: 2px solid rgba(210, 105, 30, 0.35);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cat-tile:hover {
    background: rgba(210, 105, 30, 0.14);
    border-color: #d2691e;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.18);
}

.cat-tile.is-empty {
    opacity: 0.45;
}

.ct-name {
    color: #8b4513;
    font-size: 1.2rem;
    font-weight: bold;
}

.ct-desc {
    color: #8b7355;
    font-size: 0.88rem;
    line-height: 1.6;
    flex-grow: 1;
}

.ct-count {
    color: #d2691e;
    font-size: 0.9rem;
    font-weight: bold;
}

/* 年代 / 馆藏 标签 */
.cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: rgba(232, 220, 192, 0.5);
    border: 1px solid #cd853f;
    border-radius: 22px;
    color: #8b4513;
    text-decoration: none;
    font-size: 0.98rem;
    transition: all 0.25s ease;
}

.cat-chip:hover {
    background: linear-gradient(135deg, #d2691e, #cd853f);
    color: #f4f1e8;
    border-color: transparent;
}

.cat-chip span {
    font-size: 0.85rem;
    color: #8b7355;
    background: rgba(255, 255, 255, 0.55);
    padding: 1px 8px;
    border-radius: 11px;
}

.cat-chip:hover span {
    color: #f4f1e8;
    background: rgba(0, 0, 0, 0.18);
}

/* 筛选栏 */
.cat-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding: 14px 20px;
    background: rgba(232, 220, 192, 0.5);
    border-radius: 12px;
}

.cat-back {
    color: #8b4513;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: bold;
}

.cat-back:hover {
    color: #d2691e;
}

.cat-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.ftag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: #d2691e;
    color: #f4f1e8;
    border-radius: 16px;
    font-size: 0.88rem;
}

.ftag a {
    color: #f4f1e8;
    text-decoration: none;
    font-weight: bold;
    opacity: 0.8;
}

.ftag a:hover {
    opacity: 1;
}

/* 列表 */
.cat-list {
    background: rgba(244, 241, 232, 0.9);
    border-radius: 18px;
    padding: 12px 25px;
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.1);
}

.cat-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid rgba(139, 69, 19, 0.15);
}

.cat-item:last-child {
    border-bottom: none;
}

.ci-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #d2691e, #cd853f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ci-icon i {
    color: #f4f1e8;
    font-size: 17px;
}

.ci-body {
    flex: 1;
    min-width: 0;
}

.ci-title {
    margin: 0 0 7px;
    font-size: 1.05rem;
    line-height: 1.5;
    font-weight: bold;
}

.ci-title a {
    color: #8b4513;
    text-decoration: none;
    transition: color 0.25s ease;
}

.ci-title a:hover {
    color: #d2691e;
}

.ci-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.cm-tag {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(210, 105, 30, 0.12);
    border-radius: 11px;
    color: #a0522d;
    font-size: 0.82rem;
}

.cm-size {
    color: #8b7355;
    font-size: 0.85rem;
}

/* 空状态 */
.cat-empty {
    text-align: center;
    padding: 60px 20px;
    background: rgba(244, 241, 232, 0.9);
    border-radius: 18px;
    color: #8b7355;
}

.cat-empty i {
    font-size: 2.4rem;
    margin-bottom: 14px;
    display: block;
}

/* 分页 */
.cat-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

@media (max-width: 768px) {
    .cat-page-header h1 {
        font-size: 1.8rem;
    }

    .cat-group {
        padding: 22px 18px;
    }

    .cat-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .cat-list {
        padding: 10px 16px;
    }
}
