.book-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-cover {
    transition: transform 0.3s ease;
    margin-bottom: 0;
    max-width: 12.4rem;
    z-index: 1;
}

.book-cover:hover {
    transform: translateY(-5px);
}

.book-shelf {
    width: calc(100% + 1.5rem);
    height: 40px;
    margin-top: -0.075rem;
    background-image: url('/images/v3/common/exhibition/bookshelf_bg.png');
    background-size: var(--bg-width, 100%) 100%; /* 寬度由 JS 動態設定 */
    background-repeat: no-repeat;
    background-position: var(--shelf-offset, 0) center;
}

.book-info {
    text-align: center;
    width: 100%;
}

.book-title {
    overflow: hidden;
    color: var(--Basic-90, #212121);
    text-align: center;
    font-feature-settings: 'palt' on;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "Noto Sans TC", sans-serif;
    font-size: 1rem;
    font-style: normal;
    font-weight: 700;
    line-height: 150%;
    text-transform: capitalize;
    margin-bottom: 0.25rem;
}

.book-author {
    color: var(--Basic-90, #212121);
    text-align: center;
    font-family: "Noto Sans TC", sans-serif;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.book-author i {
    color: var(--Basic-60, #666666);
    font-size: 1rem;
}

.bookshelf-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.bookshelf-error {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #d32f2f;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.5rem;
    row-gap: 1.5rem;
    padding: 0 0.75rem;
    background-color: transparent;
}

/* sm (≥ 576px) */
@media (min-width: 576px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* md (≥ 768px) */
@media (min-width: 768px) {
    
}

/* lg (≥ 992px) */
@media (min-width: 992px) {
    .books-grid {
        row-gap: 2rem;
        grid-template-columns: repeat(4, 1fr);
    }
}

/* xl (≥ 1200px) */
@media (min-width: 1200px) {
    .books-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}