/* General body styling */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    background-color: #ffffff;
    color: #333;
}

/* Header section with the black background */
.book-header {
    background-color: #000;
    color: #fff;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.book-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 2px;
}

.book-header .author-name {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0;
}

/* Main content wrapper for padding and max-width */
.book-content-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 5%;
}

/* Flex container for book cover and description */
.book-details {
    display: flex;
    gap: 40px;
    /* align-items: flex-start; is removed to allow items to stretch to equal height */
}

/* Book cover image styling */
.book-cover {
    flex: 0 0 300px; /* Do not grow, do not shrink, base width of 300px */
}

.book-cover img {
    width: 100%;
    height: 100%; /* Set height to fill the container */
    object-fit: cover; /* Ensures the image covers the area without distortion */
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Book description text styling */
.book-description {
    flex: 1; /* Take up the remaining space */
}

.book-description p {
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
    margin-top: 0;
}

/* "BUY" button styling */
.buy-button {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 12px 35px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 1px;
    margin-top: 20px;
    transition: background-color 0.3s ease;
    text-decoration: none; /* Added for the <a> tag version of the button */
    display: inline-block; /* Added for the <a> tag version of the button */
    text-align: center;
}

.buy-button:hover {
    background-color: #333;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .book-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .book-details {
        flex-direction: column;
        align-items: center;
    }

    .book-cover {
        flex-basis: auto; /* Reset flex basis */
        width: 100%;
        max-width: 350px; /* Limit max width on mobile */
    }

    .book-cover img {
        height: auto; /* Revert on mobile to prevent extreme heights */
        width: 100%;
    }

    .book-description p {
        text-align: left;
    }

    .buy-button {
        width: 100%;
        box-sizing: border-box; /* Ensures padding is included in the width */
    }
}

/* Gallery Section */

.gallery-section {
    text-align: center;
    padding: 60px 0;
    background-color: #f4f4f4;
    margin-top: 60px; /* Added space between this and the previous section */
    
    /* Force the section to be full-width */
    box-sizing: border-box; /* Ensures padding is included in the width */
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.gallery-section h2 {
    font-size: 2rem;
    font-weight: 400;
    font-style: italic;
    color: #555;
    margin-bottom: 40px;
}

.image-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.image-grid img {
    max-width: 100%;
    width: 300px;
    height: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
}

