/* 2026-06-22 取消 container 私有覆盖，回归 common.css 全局 1120px */

/* ===== 页面布局 ===== */
.page-wrapper {
    display: flex;
    gap: 43px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== 分类模块（二级分类展示区） ===== */
.category-module {
    min-height: 161px;
    width: 100%;
    background: #FBFBFB;
    margin-top: 22px;
    margin-bottom: 12px;
    padding: 15px;
    box-sizing: border-box;
    /* 内容超出时撑高容器，不出滚动条 */
    overflow: hidden;
}

/* 行结构：左侧标签 + 右侧内容 */
.cat-row {
    display: flex;
    align-items: flex-start;
    gap: 65px;
}

/* 左侧标签列（固定宽度，与分组行名称对齐） */
.cat-label-col {
    flex-shrink: 0;
    width: 65px;
    font-size: 16px;
    color: #898989;
    line-height: 18px;
    white-space: nowrap;
}

.cat-label-col.cat-label-active {
    color: #008F98;
}

/* 右侧内容列 */
.cat-content-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 20px;
    row-gap: 13px;
    line-height: 18px;
}

/* 「全部」按钮 */
.cat-all {
    font-size: 16px;
    color: #898989;
    cursor: pointer;
    white-space: nowrap;
}

.cat-all:hover {
    color: #008F98;
}

.cat-all.active {
    color: #008F98;
    font-weight: 500;
}

/* 标签云标签 */
.cat-tags .cat-tag {
    font-size: 16px;
    color: #898989;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s;
}

.cat-tags .cat-tag:hover {
    color: #008F98;
}

.cat-tags .cat-tag.active {
    color: #008F98;
    font-weight: 500;
}

/* 标签云：距离右侧 152px 换行 */
.cat-tags {
    padding-right: 152px;
}

/* 展开行（缩进与标签区对齐） */
.cat-expand-row {
    margin-top: 20px;
}

/* 三级分类小标签 */
.cat-sub-tags {
    padding-right: 10px;
}

.cat-sub-tag {
    font-size: 16px;
    color: #898989;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s;
}

.cat-sub-tag:hover {
    color: #008F98;
}

.cat-sub-tag.active {
    color: #008F98;
}

/* block 展开区标题（左列，与"专业分类"垂直对齐） */
.cat-expand-title {
    font-size: 14px;
    color: #008F98;
    font-weight: 500;
    white-space: nowrap;
}

/* 展开行关闭按钮 */
.cat-expand-close {
    font-size: 18px;
    color: #999;
    cursor: pointer;
    margin-left: 8px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.cat-expand-close:hover {
    color: #008F98;
}

/* 旧样式清理（保留类名以防其他页面引用） */
.category-module .cat-label {
    font-size: 16px;
    color: #898989;
    margin-bottom: var(--space-sm);
}

.category-module .cat-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) 15px;
}

.category-module .cat-item {
    font-size: 16px;
    color: #898989;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.category-module .cat-item:hover {
    color: #008F98;
}

.category-module .cat-item.active {
    color: #008F98;
}

/* ===== 搜索结果文字 ===== */
.result-text {
    font-size: 16px;
    color: #898989;
    padding-left: 0;          /* 2026-06-11 取消左缩进，与标题左对齐 */
}

.result-text .kw {
    color: #008F98;
}

.result-text .count {
    color: #008F98;
}

/* ===== 搜索模块 ===== */
.search-module {
    width: 100%;
    flex-wrap: wrap;
}

/* ===== 图书封面 ===== */
.card-cover {
    width: 190px;
    height: 273px;
    border: 1px solid #E7E7E8;
    box-sizing: border-box;
    overflow: hidden;
    background-color: #F7F8F8;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== 卡片信息区（覆盖 common.css） ===== */
.card-info {
    width: 190px;
    padding: 7px 0 5px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ===== card-title 2行截断 + 锁定高度（保证 card-item 列对齐） ===== */
.card-title {
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(var(--font-size-base, 16px) * 1.4 * 2);
    color: inherit;
    text-decoration: none;
}

/* ===== 图书网格 ===== */
.book-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 39px;
    row-gap: 40px;
    margin-top: 22px;
    margin-bottom: var(--module-gap);
}

/* ===== 骨架屏 ===== */
.skeleton-card {
    width: 190px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.skeleton-cover {
    width: 190px;
    height: 273px;
    background: #E8E8E8;
    border-radius: 2px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-text {
    height: 14px;
    background: #E8E8E8;
    border-radius: 2px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-title {
    width: 90%;
}
.skeleton-meta {
    width: 60%;
}
@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 0;
}
.empty-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
}
.empty-text {
    font-size: 16px;
    color: #898989;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .page-wrapper {
        flex-direction: column;
    }

    .side-nav {
        width: 100%;
    }

    .link-btn {
        margin-left: 0;
        margin-top: var(--space-sm);
    }
}
