body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 36px;
    color: #333;
}

.search-bar {
    margin-top: 10px;
    display: flex;
    align-items: center;
}

.search-bar input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ddd;
    margin-right: 10px;
}

.search-bar button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    background-color: #333;
    color: white;
    cursor: pointer;
    border-radius: 5px;
}

.search-bar button:hover {
    background-color: #555;
}

.main-content {
    display: flex;
    margin-top: 20px;
}

.categories {
    width: 200px;
    margin-right: 20px;
}

.categories h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.categories ul {
    list-style-type: none;
    padding: 0;
}

.categories ul li {
    margin-bottom: 10px;
    cursor: pointer;
    color: #555;
}

.categories ul li:hover {
    color: #333;
    font-weight: bold;
}

.books {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
}

.book-list {
   display: flex;
flex-wrap: wrap;
justify-content: flex-start;
gap: 29px;
}

.author{
	font-weight:600;
}
.book-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
    width: 200px;
    padding: 10px;
    text-align: center;
}

.book-item img {
    width: 100%; /* Full width of the container */
    height: 300px; /* Larger height for the book cover */
    border-radius: 5px;
    object-fit: cover; /* Ensures the image covers the container without distortion */
    display: block;
    margin-bottom: 10px;
}

.book-item h3 {
    font-size: 18px;
    color: #333;
    margin: 10px 0;
}

.book-item p {
    font-size: 14px;
    color: #777;
}

/* Category Section */
.categories {
    width: 200px;
    margin-right: 20px;
    overflow-x: auto; /* Enable horizontal scrolling */
}

.categories ul {
    list-style-type: none;
    padding: 0;
    display: flex; /* Display categories in a row */
    flex-direction: column; /* Default to column for larger screens */
}

.categories ul li {
    margin-bottom: 10px;
    cursor: pointer;
    color: #555;
    flex-shrink: 0; /* Prevent shrinking */
}

.categories ul li:hover {
    color: #333;
    font-weight: bold;
}

.categories #overviewBtn {
    margin-top: 20px;
    padding: 10px;
    width: 100%;
    font-size: 16px;
    border: none;
    background-color: #333;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    text-align: center;
}

.categories #overviewBtn:hover {
    background-color: #555;
}


/* Responsive Styles */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .categories {
        width: 100%;
        margin-bottom: 20px;
        overflow-x: auto; /* Enable horizontal scrolling on smaller screens */
    }

    .categories ul {
        flex-direction: row; /* Display categories left to right */
        white-space: nowrap; /* Prevent wrapping of list items */
    }

    .categories ul li {
        margin-right: 15px; /* Space between items */
        margin-bottom: 0; /* Remove bottom margin */
    }

    .books {
        justify-content: center;
    }

    .book-item {
        width: 100%; /* Full width on smaller screens */
    }
	
	.book-item img {
    width: 100%; /* Full width of the container */
    height: auto; /* Automatic height to maintain aspect ratio */
    border-radius: 5px;
    object-fit: cover;
    display: block;
    margin-bottom: 10px;
}
}

@media (max-width: 480px) {
    .book-item {
        width: 60%;
margin: auto;
    }

    .search-bar input[type="text"] {
        width: 80%;
    }
}
}


