/* 🔹 Fix Uneven Thumbnails in Top Viewed Books */
.top-viewed-books {
    margin: 40px auto;
    text-align: center;
}

.top-viewed-books .section-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.top-viewed-books .section-title::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 3px;
    background: #0073aa;
    left: 0;
    bottom: -5px;
    border-radius: 2px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    justify-content: center;
}

/* 🔸 Uniform book card */
.book-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 320px; /* fixed height for alignment */
    overflow: hidden;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 🔸 Fix image height and center crop */
.book-card img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* crop image to fit nicely */
    border-radius: 8px;
    flex-shrink: 0;
}

.book-card h3 {
    font-size: 0.95rem;
    margin-top: 10px;
    color: #333;
    flex-grow: 0;
}

.views-count {
    margin-top: auto; /* push to bottom */
    font-size: 0.85rem;
    color: #666;
}
 
/* Rehmani Book Library plugin helpers */
.rbl-no-cover{width:100%;height:280px;background:#f0f0f0;display:flex;align-items:center;justify-content:center;color:#999;}
