/* Featured Books Section */
.featured-books {
    margin-top: 50px;
    text-align: left;
    color: #fff;
    padding: 30px;
}

/* Book Grid - Now Shows 4 Books in a Row */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));  
    gap: 20px;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto;
}

/* Book Card - Separate & Modern Look */
.book-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 250px;
    height: 420px;
    position: relative;
}

.book-card .book-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Book Image Container */
.book-card .image-container {
    position: relative;
    width: 160px;
    height: 220px;
    margin: 0 auto 15px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px;
}

.book-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-card img.loaded {
    opacity: 1;
}

.image-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #00bcd4;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Book Info */
.book-card h3 {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
    margin-bottom: 6px;
    height: 2.4em;
    display: -webkit-box;
    display: -moz-box;
    display: box;
    -webkit-line-clamp: 2;
    -moz-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
    text-align: center;
}

.book-card p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
    line-height: 1.2;
}

.book-card .price-text {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
    margin: 8px 0;
}

/* Wishlist Button - Long, Positioned Below Details */
.wishlist-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    width: calc(100% - 40px);
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid  rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}

/* Hover & Active States */
.wishlist-btn:hover {
    background: #00bcd4;
    color: #fff;
}

.wishlist-btn:active {
    transform: scale(0.98);
}

/* If Wishlisted, Change to Filled Heart */
.wishlist-btn.added {
    background: #00bcd4;
    border-color: #0097a7;
    color: white;
}