/* Book Grid Layout */
.book-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 20px 0;
}

/* Book Card */
.book-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Top Section - Image + Info (Horizontal Layout) */
.book-top {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

/* Book Cover - 1/3 width */
.book-cover {
    flex: 0 0 calc(33.333% - 10px);
    aspect-ratio: 2/3;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

/* Book Info - 2/3 width */
.book-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Book Title */
.book-title {
    font-size: 1.4em;
    font-weight: bold;
    line-height: 1.3;
    margin: 0;
    color: #333333;
}

/* Book Author */
.book-author {
    font-size: 1em;
    font-weight: 500;
    color: #666666;
    font-style: italic;
    margin: 0;
}

/* Book Rating */
.book-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.rating-star {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

/* Book ISBN */
.book-isbn {
    font-size: 0.85em;
    font-weight: 500;
    color: #999999;
    margin: 0;
    font-family: monospace;
}

/* Book Description - Inside book-info */
.book-description {
    font-size: 0.95em;
    line-height: 1.6;
    color: #555555;
    margin: 0;
    margin-top: 8px;
}

/* Responsive Design */

/* Tablets */
@media (max-width: 768px) {
    .book-grid {
        gap: 25px;
    }

    .book-top {
        gap: 15px;
    }

    .book-cover {
        flex: 0 0 calc(35% - 8px);
    }

    .book-title {
        font-size: 1.2em;
    }

    .book-author {
        font-size: 0.95em;
    }

    .rating-star {
        width: 16px !important;
        height: 16px !important;
        max-width: 16px !important;
        max-height: 16px !important;
    }

    .book-isbn {
        font-size: 0.8em;
    }

    .book-description {
        font-size: 0.9em;
    }
}

/* Mobile - Stack vertically */
@media (max-width: 480px) {
    .book-grid {
        gap: 20px;
    }

    .book-card {
        padding: 15px;
    }

    .book-top {
        flex-direction: column;
        gap: 15px;
    }

    .book-cover {
        flex: 0 0 auto;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    .book-info {
        gap: 6px;
    }

    .book-title {
        font-size: 1.15em;
    }

    .book-author {
        font-size: 0.9em;
    }

    .rating-star {
        width: 14px !important;
        height: 14px !important;
        max-width: 14px !important;
        max-height: 14px !important;
    }

    .book-isbn {
        font-size: 0.75em;
    }

    .book-description {
        font-size: 0.85em;
    }
}
