/* --- The Card --- */

.card {
    /* Set dimensions and layout */
    max-width: 350px;
    width: 100%;
    
    /* Material Design appearance */
    background-color: #ffffff;
    border-radius: 8px; /* Rounded corners */
    overflow: hidden; /* Clips the image to the card's rounded corners */
    
    /* Material shadow for elevation */
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),  /* Umbra (closer, sharper shadow) */
        0 3px 6px rgba(0, 0, 0, 0.15); /* Penumbra (further, softer shadow) */
    
    /* Smooth transition for the hover effect */
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* Add a subtle lift effect on hover */
.card:hover {
    transform: translateY(-5px); /* Lifts the card up slightly */
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.2);
}

/* --- Card Image --- */

.card-image {
    width: 100%;
    height: 200px; /* Fixed height for the image area */
    overflow: hidden; /* Hide parts of the image that don't fit */
}

.card-image-full {
    width: 100%;
    overflow: hidden; /* Hide parts of the image that don't fit */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Scales the image to fill the container, cropping if necessary */
    display: block; /* Removes any bottom spacing on the image */
}

/* --- Card Content --- */

.card-content {
    padding: 24px; /* Standard material padding */
}

/* --- Card Heading --- */

.card-heading {
    /* Typography */
    font-size: 1.5rem;  /* 24px */
    font-weight: 500;   /* Medium weight for titles */
    color: #212121;     /* Dark text color */
    
    /* Spacing */
    margin-top: 0;
    margin-bottom: 12px;
}

/* --- Card Body Text --- */

.card-body {
    /* Typography */
    font-size: 0.9rem; /* 14.4px */
    color: #757575;   /* Lighter grey for body text */
    line-height: 1.5;
    
    /* Spacing */
    margin: 0;
}

.card-grid {
    display: grid;
    
    /* This is the magic part for responsiveness */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    
    gap: 24px; /* Space between the cards */
}

.book-card{
  border: 1px solid #ddd;
  border-radius: 5px;
  max-width: 200px;
  width: 100%;
  margin: 10px;
  text-align: center;
  transition: box-shadow 0.3s ease;
}

.book-card-image{
  width: 100%;
  overflow: hidden;
}