/* 相关推荐 - 图书模块 */
.book-recommend-card {
    margin-top: 2rem;
}

.book-recommend-inner {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-top: 0.5rem;
}

.book-recommend-cover {
    flex-shrink: 0;
}

.book-recommend-cover img {
    width: 110px;
    height: auto;
    border-radius: 0.375rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.book-recommend-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.book-recommend-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.book-recommend-desc {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.6;
}

.book-recommend-links {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.book-store-item {
    position: relative;
}

.book-store-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: color 0.2s, background 0.2s;
}

.book-store-link:hover {
    color: #2563eb;
    background: #eff6ff;
    text-decoration: none;
}

.book-store-item--taobao .book-store-link:hover {
    color: #ff5000;
    background: #fff7ed;
}

.book-store-item--jd .book-store-link:hover {
    color: #c8161d;
    background: #fef2f2;
}

.book-qr-popup {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    right: 0;
    width: 180px;
    height: 240px;
    padding: 0.5rem;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 20;
    pointer-events: none;
    overflow: hidden;
}

.book-store-item:hover .book-qr-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.book-qr-popup img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 480px) {
    .book-recommend-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .book-recommend-links {
        justify-content: center;
        width: 100%;
    }

    .book-qr-popup {
        right: 50%;
        transform: translateX(50%) translateY(6px);
    }

    .book-store-item:hover .book-qr-popup {
        transform: translateX(50%) translateY(0);
    }
}
