/* Banner Section */

.banner-content h1 {
    font-size: 2.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.banner-content p {
    font-size: 1.2rem;
    font-family: 'Roboto', sans-serif;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Book Collection Section */
#book-collection-section {
    padding-bottom: 60px;
    background: #FFFFFF;
    min-height: calc(100vh - 80px - 300px - 300px); /* Adjust for header, banner, and footer */
}

.book-collection-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Section Header */
.book-collection-header {
    text-align: center;
    margin-bottom: 40px;
}

.book-collection-header h2 {
    font-size: 2rem;
    color: #4267b2;
    font-weight: 700;
    margin-bottom: 15px;
}

.book-collection-header p {
    font-size: 1rem;
    color: #000000;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Search and Filter */
.book-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.book-search {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.book-search input {
    width: 90%;
    padding: 10px 0 10px 15px;
    font-size: 0.9rem;
    border: 1px solid #4267b2;
    border-radius: 25px;
    font-family: 'Roboto', sans-serif;
    color: #333333;
    background-color: #ffffff;
}

.book-search input::placeholder {
    color: #999999;
}

.book-search input:focus {
    outline: 2px solid #5b7bd6;
    outline-offset: 2px;
}

.book-search i {
    position: absolute;
    right: 15px;
    top: 50%;
    left: 85%;
    transform: translateY(-50%);
    color: #4267b2;
    font-size: 1rem;
}

.book-filter select {
    padding: 10px 30px 10px 15px;
    font-size: 0.9rem;
    border: 1px solid #4267b2;
    border-radius: 25px;
    font-family: 'Roboto', sans-serif;
    color: #333333;
    background-color: #ffffff;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' width='12' height='12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%234267b2' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.book-filter select:focus {
    outline: 2px solid #5b7bd6;
    outline-offset: 2px;
}

/* Book Grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.book-card {
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.book-image {
    width: 100%;
    height: 380px; /* Increased height to display full cover */
    background-color: #f5f5f5; /* Light background for empty space */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Show full image without cropping */
    object-position: center;
    display: block;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.book-content {
    padding: 10px;
    text-align: center;
}

.book-content h3 {
    font-size: 1.1rem;
    color: #030303;
    font-weight: 600;
    margin: 5px 0;
    line-height: 1.4;
}

.book-content .author {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.book-content .category {
    font-size: 0.85rem;
    color: #4267b2;
    font-weight: 500;
    text-transform: uppercase;
}

/* Responsive Adjustments */
@media (max-width: 1000px) {
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .book-image {
        height: 300px;
    }

    #banner-section {
        height: 250px;
    }

    .banner-content h1 {
        font-size: 2rem;
    }

    .banner-content p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .book-collection-header h2 {
        font-size: 1.5rem;
    }

    .book-collection-header p {
        font-size: 0.9rem;
    }

    .book-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .book-search {
        max-width: 100%;
    }

    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .book-content h3 {
        font-size: 1rem;
    }

    .book-image {
        height: 280px;
    }

    #banner-section {
        height: 200px;
    }

    .banner-content h1 {
        font-size: 1.5rem;
    }

    .banner-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .book-image {
        height: 220px;
    }

    #banner-section {
        height: 180px;
    }

    .banner-content h1 {
        font-size: 1.2rem;
    }

    .banner-content p {
        font-size: 0.8rem;
    }
}



/* Book Details Section */
/* Banner Section */
.banner-section {
    position: relative;
    width: 100%;
    height: 400px;
    background-image: url('../images/background/book-section-background.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFFFFF;
}

.banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-content h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-content p {
    font-size: 1.2rem;
    font-family: 'Roboto', sans-serif;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .banner-section {
        height: 300px;
    }

    .banner-content h1 {
        font-size: 2.5rem;
    }

    .banner-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .banner-section {
        height: 250px;
    }

    .banner-content h1 {
        font-size: 2rem;
    }

    .banner-content p {
        font-size: 0.9rem;
    }
}

/* Book Details Section */
.book-details-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #F9FBFD 0%, #E6EDF5 100%);
}

.book-details-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

.book-details-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.book-details-image img {
    width: 60%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.book-details-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1rem;
    color: #333;
    line-height: 1.8;
}

.book-details-meta .meta-item {
    margin-bottom: 10px;
}

.book-details-meta .meta-label {
    font-weight: 700;
    color: #4267b2;
}

.book-details-meta .meta-value {
    margin-left: 5px;
}

.book-details-meta .meta-value a {
    color: #4267b2;
    text-decoration: none;
}

.book-details-meta .meta-value a:hover {
    text-decoration: underline;
}

.buy-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4267b2;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.buy-button:hover {
    background-color: #355a9c;
    transform: scale(1.05);
}

.book-details-content {
    font-size: 1rem;
    color: #333;
    line-height: 1.8;
}

.book-details-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.book-details-content h3 {
    font-size: 1.5rem;
    color: #4267b2;
    margin-top: 30px;
    margin-bottom: 10px;
}

/* Other Books Section */
.other-books-section {
    padding: 40px 0;
    background-color: #FFFFFF;
}

.other-books-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

.other-books-container h2 {
    font-size: 2rem;
    color: #4267b2;
    text-align: center;
    margin-bottom: 30px;
    margin-top: 0;
}

.other-books-carousel {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.other-books-carousel::-webkit-scrollbar {
    height: 8px;
}

.other-books-carousel::-webkit-scrollbar-thumb {
    background-color: #4267b2;
    border-radius: 10px;
}

.other-books-carousel::-webkit-scrollbar-track {
    background: #E0E0E0;
}

.other-book-card {
    flex: 0 0 160px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.other-book-card:hover {
    transform: rotate(2deg) scale(1.05);
}

.other-book-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.other-book-card .book-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px 10px 10px;
    text-align: center;
}

.other-book-card .book-title-overlay h3 {
    width: 90%;
    font-size: 0.8rem;
    color: #FFFFFF;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .book-details-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .book-details-image img {
        max-height: 300px;
        width: 20%;
    }

    .book-details-content {
        font-size: 0.95rem;
    }

    .other-book-card {
        flex: 0 0 140px;
    }

    .other-book-card img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .book-details-image img {
        max-height: 250px;
    }

    .book-details-content {
        font-size: 0.9rem;
    }

    .other-book-card {
        flex: 0 0 120px;
    }

    .other-book-card img {
        height: 180px;
    }

    .other-book-card .book-title-overlay h3 {
        font-size: 0.85rem;
    }
}