/* Importing a cursive font for modern design */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap');

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* General Styles */
.books {
    padding: 20px;
    background-color: #f9f9f9; /* Light background for the section */
    animation: fadeInUp 1s ease-out; /* Animation on load */
}

.filter {
    text-align: center;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out 0.3s; /* Delayed animation for filter */
}

.filter-header {
    font-size: 1.6rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 10px;
}

.filter-capsules {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

}

.filter-capsule {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #cccccc;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    box-shadow: 8px 8px 4px rgba(0, 0, 0, 0.4); /* Enhanced shadow on hover */

}

.filter-capsule:hover {
    background-color: #000000;
    color: #ffffff;
    transform:scale(1.1px);
}

.book-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.6s; /* Delayed animation for book cards */
}

.book-card {
    background-color: #ffffff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Enhanced shadow */
    border-radius: 12px; /* Slightly larger border-radius for a softer look */
    overflow: hidden;
    width: fit-content; /* Increased width */
    height: fit-content; /* Increased height */
    text-align: center;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s; /* Smooth transition for hover effects */
    animation: fadeInUp 1s ease-out 0.9s; /* Delayed animation for each card */
}

.book-card:hover {
    transform: translateY(-10px); /* Lift the card up on hover */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4); /* Enhanced shadow on hover */
}

.book-image {
    width: 100%;
    height: 100%; /* Fixed height for images */
    object-fit: cover;
    border-bottom: 1px solid #cccccc;
    transition: transform 0.3s, filter 0.3s; /* Smooth transition for hover effects */
}

.book-image:hover {
    transform: scale(1.05); /* Zoom-in effect on hover */
    filter: brightness(0.9); /* Slightly darken the image on hover */
}

.book-title {
    font-size: 1.4rem; /* Increased font size */
    margin: 10px 0 5px;
    color: #000000;
    font-family: 'Dancing Script', cursive; /* Cursive font for title */
}

.book-author {
    font-size: 1.1rem; /* Increased font size */
    margin: 0 0 5px;
    color: #555555;
}

.book-price {
    font-size: 1.4rem; /* Increased font size */
    margin: 10px 0;
    color: #000000;
    font-family: 'Dancing Script', cursive; /* Cursive font for price */
}

.add-to-cart {
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 12px 20px; /* Increased padding for a larger button */
    border-radius: 4px;
    font-size: 1.1rem; /* Increased font size */
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s; /* Smooth transition for hover effects */
    animation: fadeInUp 1s ease-out 1.2s; /* Delayed animation for the button */
}

.add-to-cart:hover {
    background-color: #555555;
    transform: scale(1.05); /* Slightly enlarge the button on hover */
}

/* Media Queries for Responsiveness */
@media (max-width: 1200px) {
    .book-card {
        width: 100%; /* Make cards responsive */
    }
}

@media (max-width: 992px) {
    .filter-capsules {
        flex-direction: column; /* Stack capsules vertically */
    }

    .filter-capsule {
        margin-bottom: 10px; /* Space between capsules */
    }
}

@media (max-width: 768px) {
    .books {
        padding: 10px;
    }

    .filter-header {
        font-size: 1.4rem;
    }

    .book-card {
        width: 100%;
        padding: 15px;
    }

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

    .book-author {
        font-size: 1rem;
    }

    .book-price {
        font-size: 1.2rem;
    }

    .add-to-cart {
        font-size: 1rem;
        padding: 10px 15px;
    }
}

@media (max-width: 576px) {
    .filter-header {
        font-size: 1.2rem;
    }

    .filter-capsule {
        font-size: 0.9rem;
        padding: 8px 15px;
    }

    .book-title {
        font-size: 1rem;
    }

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

    .book-price {
        font-size: 1rem;
    }

    .add-to-cart {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}
