.favorites-section {
    padding: 1rem 0;
}

/* 列表容器 */
.favorites-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

/* 列表单项卡片样式 */
.fav-item {
    display: flex;
    flex-direction: row;
    /* 水平布局 */
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: var(--transition);
    align-items: flex-start;
    /* 顶部对齐 */
    gap: 1.5rem;
    border: 1px solid transparent;
}

.fav-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--light-gray);
}

/* 1. 左侧：图书封面 */
.fav-cover {
    width: 100px;
    flex-shrink: 0;
    /* 防止压缩 */
    height: 140px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.fav-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2. 左二：图书基本信息 (索书号、作者、出版时间) */
.fav-info {
    width: 200px;
    /* 固定宽度或使用 flex: 0 0 200px */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fav-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.fav-meta-row {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fav-meta-row i {
    width: 16px;
    text-align: center;
    color: var(--mid-gray);
}

/* 3. 左三：图书简介 (占据中间剩余空间) */
.fav-intro {
    flex: 1;
    /* 占据剩余空间 */
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;

    /* 多行文本截断 */
    display: -webkit-box;
    -webkit-line-clamp: 5;
    /* 显示5行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fav-intro-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

/* 4. 左四：操作按钮 (右侧竖直排列) */
.fav-actions {
    width: 120px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    justify-content: center;
    height: 100%;
    padding-left: 0.5rem;
    border-left: 1px solid var(--light-gray);
}

.fav-btn {
    width: 100%;
    padding: 0.6rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

/* 取消收藏按钮样式 */
.btn-cancel-fav {
    background: white;
    border: 1px solid var(--error-red);
    color: var(--error-red);
}

.btn-cancel-fav:hover {
    background: var(--error-red);
    color: white;
}

/* 借阅按钮样式 */
.btn-borrow-fav {
    background: var(--primary-blue);
    color: white;
}

.btn-borrow-fav:hover {
    background: var(--secondary-blue);
}

.btn-borrow-fav:disabled {
    background: var(--light-gray);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* 响应式适配：手机端变回竖直堆叠 */
@media (max-width: 900px) {
    .fav-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .fav-cover {
        width: 120px;
        height: 170px;
    }

    .fav-info,
    .fav-actions {
        width: 100%;
        border-left: none;
        padding-left: 0;
    }

    .fav-actions {
        flex-direction: row;
        /* 手机端按钮横排 */
    }
}