/* Basic Reset */
body, html {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    scroll-behavior: smooth; /* Enable smooth scrolling for the author links */
}


body {
    background-color: #ddd;
    display: flex; /* Keep flex for centering the container */
    justify-content: center;
    min-height: 100vh;
    box-sizing: border-box;
    flex-direction: column; /* Stack topnav and container */
    align-items: center; /* Center the container */
    position: relative; /* Needed for absolute positioning of the drawer */
    padding-top: 91px; /* Height of topnav (51px) + author links (40px) */
}

/* Top Navigation Bar */
.topnav {
    background-color: #1a374d;
    color: white;
    width: 100%;
    padding: 15px 0;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    z-index: 20; /* Ensure it's on top of everything */
    position: fixed;
    top: 0;
    left: 0;
}


.topnav-brand {
    font-weight: bold;
    margin-left: 20px;
    margin-right: auto;
}

.topnav-links {
    list-style: none;
    padding: 0;
    margin: 0 20px;
    display: flex;
}

.topnav-links li {
    margin-left: 20px;
}

.topnav-links a {
    color: white;
    text-decoration: none;
}


/* Author Link Farm Styles */
.author-links {
    width: 100%;
    padding: 10px 0;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
    background-color: white; /* Add a background color for better visibility when sticky */
    z-index: 15; /* Ensure it's above the main content */
    position: fixed;
    top: 48px; /* Position it below the topnav */
    left: 0;
}

.author-links a {
    margin: 0 10px;
    text-decoration: none;
    color: #333;
    cursor: pointer;
}

.author-links a:hover {
    color: #1a374d;
} 


/* Main Container */
.container {
    width: 80%;
    background-color: white;
    margin: 20px auto;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0px 15px 20px #000;
    /* Remove the transition and the drawer-open class styles */
}

/* ... Book Cards ... */

.book-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}


.book-cover-container {
    width: 160px; /* Fixed width for each card */
    height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px #ddd;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    padding-top: 10px;
	background-color: #efefef;
}

.book-cover-link {
    display: flex; /* Use flex to center the image */
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 180px;
    margin-bottom: 5px; /* Space between image and title */
}

.book-cover {
    width: 90px;
    height: 130px;
    object-fit: contain;
}

.book-title-under {
    font-size: 0.9em;
    word-break: break-word;
    padding: 0 5px;
    margin-bottom: 5px;
    margin-top: auto; /* Push the title to the bottom */
}

/* ... other CSS ... */


/* Sliding Drawer (Initially Hidden) */

.drawer {
    position: fixed;
    top: auto;
    right: -420px;
    width: 400px;
    height: calc(100% - 91px); /* Adjust height to account for fixed navs */
    background-color: white;
    box-shadow: -5px 0 10px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-in-out;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    top: 91px; /* Position it below both fixed navs */
    z-index: 5; /* Ensure it's above the main content */
}

.drawer.open {
    right: 0;
}


.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}
    

.drawer-content {
    /* Styles for content inside the drawer */
}

.drawer-title {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.drawer-author {
    font-style: italic;
    margin-bottom: 5px;
}

.drawer-price {
    font-weight: bold;
    margin-bottom: 15px;
}

.drawer-book-details {
    margin-bottom: 15px;
    overflow: auto; /* Helps contain floats and prevents overflow */
}


.drawer-cover-large {
    width: 150px;
    height: auto;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px #ddd;
    float: left; /* Float the image to the left */
    margin-right: 15px;
    margin-bottom: 10px;
}

.drawer-summary {
    text-align: left;
}

.paypal-button, .amazon-button {
    padding: 10px 15px;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

.paypal-button {
    background-color: #1a374d; /* Example PayPal color */
    color: #fff;
}

.amazon-button {
    background-color: #ff9900; /* Example Amazon color */
}

/*
.drawer-book-details {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-direction: row; 
    align-items: flex-start; 
} */
/*
.drawer-cover-large {
    width: 150px;
    height: auto;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px #ddd;
    margin-right: 15px;
    margin-bottom: 10px;
    flex-shrink: 0; /* Prevent the image from shrinking */
/*}

.drawer-summary {
    text-align: left;
    flex-grow: 1; /* Allow the text to take up remaining space */
/*}

.paypal-button, .amazon-button {
    padding: 10px 15px;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}
*/