/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/


/* Container Layout - 3 Across */
.book-genre-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Individual Card Styling */
.book-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Container for the image */
.book-image-wrapper {
    width: 100%;
    height: 280px; /* Set this to your desired uniform height */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa; /* Optional: A very light background color so the 3-across cards look uniform even if the image is narrow */
    border-bottom: 1px solid #e2e8f0;
}

/* The Image Itself */
.book-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* The magic property that shows the whole image */
    display: block;
    padding: 10px; /* Optional: Gives the image a little breathing room inside the box */
}
/* 1. Make the link tag fill the wrapper completely */
.book-image-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
}

/* 2. Add overflow: hidden to the wrapper to clip any bleed */
.book-image-wrapper {
    overflow: hidden; 
}
/* Typography and Spacing */
.book-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-title {
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.book-title a {
    text-decoration: none;
    color: #1a202c;
}

.book-excerpt {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.5;
}

.book-pagination {
    margin-top: 2rem;
    text-align: center;
}

/* Make it responsive for smaller screens */
@media (max-width: 900px) {
    .book-genre-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .book-genre-grid {
        grid-template-columns: 1fr;
    }
}

