body {
    margin: 0;
    background-color: whitesmoke;
    scrollbar-width: none;
    overflow-x: hidden;
}

h1, h3 {
    padding-top: 1%;
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: inline-block;
}

a:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease-in-out;
}

hr {
    color: crimson;
    margin-top: 1%;
    margin-bottom: 0;
}

.container {
    width: 100%;
    height: 5%;
    text-align: center;
    background: crimson;
    color: whitesmoke;
    padding: 0.5%;
}

.navbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    height: 100%;
}

.top-navbar {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    margin: 0.5% 2.5%;
    height: 35%;
    width: 100%;
    justify-content: space-between;
}

#logo {
    height: 70px;
    width: auto;
    margin: 0 5%;
}

.center-content {
    display: flex;
    align-items: center;
    min-width: 40%;
}

#search-bar, #search {
    display: inline-block;
    width: 100%;
    height: 50%;
    margin: 0 0 0 5%;
    border: 1px solid crimson;
    padding: 1%;
    box-sizing: border-box;
}

#search {
    margin: 0 5% 0 0;
    width: 7%;
    padding: 0.1%;
    background-color: crimson;
}

.right-content svg {
    height: 30px;
}

.right-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
}

.right-content span {
    margin: 5%;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
}

#acc-btn {
    border: none;
    color: crimson;
    background-color: rgba(245, 245, 245, 0);
    display: inline-block;
    transition: transform 0.3s ease-in-out;
}

#cart {
    border-left: 1px solid crimson;
    padding-left: 5%;
}

#cart-btn {
    border: none;
    color: crimson;
    background-color: rgba(245, 245, 245, 0);
}

.bottom-navbar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    margin: 0.5% 2%;
    justify-content: space-between;
}

.bottom-navbar span {
    padding: 0 2.5rem 0 1rem;
}

.bottom-navbar span:nth-of-type(1n):not(:last-child) {
    border-right: 1px solid crimson;
}

.img-banner-top, .img-banner-bottom {
    display: flex;
    background-color: crimson;
    font-size: 2rem;
    width: 100%;
    height: 6rem;
    color: whitesmoke;
    justify-content: center;
    align-items: center;
    margin: 0.2rem 0;
}

.img-banner-bottom {
    background-color: whitesmoke;
    height: 30rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.img-container {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.image {
    width: 100%;
    flex-shrink: 0;
}

.image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.manual-nav {
    display: flex;
    column-gap: 1rem;
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.manual-nav span {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: white;
    opacity: 0.5;
    transition: opacity ease 0.25s;
    cursor: pointer;
}

.manual-nav span:hover {
    opacity: 1;
}

.books {
    padding: 0 2%;
    position: relative;
}

.books-container {
    position: relative;
}

.pre-btn, .nxt-btn {
    position: absolute;
    font-size: 1.2rem;
    width: 2%;
    padding: 0;
    border: 1px solid crimson;
    border-radius: 5px;
    color: crimson;
    background-color: whitesmoke;
    top: 40%;
    transform: translateY(-50%);
    z-index: 10;
}

.nxt-btn {
    right: 1%;
}

.pre-btn {
    left: 1%;
}

.books-carousel {
    display: flex;
    background-color: WhiteSmoke;
    padding: 0 1% 1% 1%;
    color: black;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-align: start;
}

.book-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 2%;
}

.book-image {
    display: flex;
    align-items: center;
    flex-direction: column;
    height: auto;
    width: 100%;
    max-width: 200px;
}

.discount-tag {
    position: relative;
    padding: 5px;
    border-radius: 5px;
    background-color: crimson;
    color: whitesmoke;
    left: 2.25em;
    top: 2em;
    width: 3.75em;
}

.book-thumb {
    height: 225px;
    width: auto;
}

.card-btn, .add-to-cart {
    position: relative;
    width: 50%;
    padding: 2px;
    font-size: 0.7rem;
    border: none;
    border-radius: 5px;
    background-color: indianred;
    color: whitesmoke;
    margin-top: 5%;
    cursor: pointer;
}

.add-to-cart {
    width: 80%;
    font-size: 0.9rem;
    background-color: crimson;
}

.book-info {
    text-align: center;
}

.book-info p, h2, span {
    margin: 0;
}

.book-title {
    font-family: "Playfair Display", serif;
    margin: 0.1em;
}

.actual-price {
    text-decoration: line-through;
    color: dimgrey;
}

.price {
    color: crimson;
    font-weight: bold;
    font-size: larger;
}

footer, footer section {
    display: block;
    text-align: center;
    background-color: #eeecec;
}

.footer-nav {
    display: flex;
    justify-content: space-evenly;
}

.footer-nav div {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-nav ul {
    padding: 0;
    margin: 5% 0;
}

.footer-nav li {
    list-style: none;
}

.footer-nav li:first-child {
    color: crimson;
    text-decoration: underline;
    font-weight: bold;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 10%;
    margin: 0.1rem;
}

.footer-copyright {
    color: gray;
}

.login {
    text-align: center;
    position: absolute;
    background-color: whitesmoke;
    border: 1px solid crimson;
    border-radius: 1rem;
    top: 13%;
    right: 3%;
    padding: 0.7rem;
}

.login hr {
    width: 100%;
}

#login-btn, #buy-btn {
    width: 90%;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    background-color: crimson;
    color: whitesmoke;
    border: none;
    border-radius: 0.8rem;
}

#signup {
    color: crimson;
}

.login ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

.login li {
    list-style: none;
}

.description {
    position: fixed;
    background-color: whitesmoke;
    padding: 1.5rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid crimson;
    border-radius: 1rem;
}

.description h1 {
    margin: 0;
    text-align: center;
    text-decoration: underline;
}

.description p {
    margin: 0;
    padding: 2rem;
    text-align: justify;
}

#close-btn {
    width: 100%;
    cursor: pointer;
    text-align: right;
    border: none;
    font-size: 1.2rem;
    padding: 1rem;
    font-weight: bold;
    background-color: whitesmoke;
    border-radius: 1rem;
}

#close-btn:hover {
    color: dimgrey;
}

#shop {
    display: flex;
    justify-content: space-evenly;
}

#shop button {
    border: 1px solid crimson;
    background-color: crimson;
    color: whitesmoke;
    border-radius: 5px;
    display: inline-block;
    font-size: 1rem;
    padding: 1rem;
    cursor: pointer;
}

.shopping-cart {
    border: 1px solid crimson;
    position: absolute;
    text-align: center;
    padding: 0.3rem;
    min-height: 15%;
    width: 30%;
    background-color: whitesmoke;
    top: 14%;
    right: 1%;
    border-radius: 0.8rem;
}

.shopping-cart div {
    width: 50%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.shopping-cart div img {
    margin: 1rem;
}

.shopping-cart div span {
    margin: 0.5rem;
}

.shopping-cart div btn {
    background-color: crimson;
    color: whitesmoke;
    padding: 0.2rem;
    border-radius: 0.5rem;
    cursor: pointer;
}

#buy-btn {
    width: 60%;
    padding: 0.5rem;
    margin: 0.5rem;
    cursor: pointer;
}

.login-background {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('https://wallpapers.com/images/hd/library-filled-with-books-vyy56lqa9wji657j.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.5;
    z-index: -1;
}

#form-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

form {
    opacity: 1;
    display: flex;
    flex-direction: column;
}

.form-h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.form-label {
    margin-bottom: 0.5rem;
}

.form-input {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.form-button {
    background: #de3a3a;
    color: whitesmoke;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.form-button:hover {
    background: crimson;
}

#exception {
    margin-top: 0;
}

@media (max-width: 450px) {
    .top-navbar {
        padding: 1%;
    }

    #logo {
        height: 35px;
    }

    .acc-logo {
        display: none;
    }

    #search-bar {
        height: 50%;
        margin-right: 5%;
    }

    #search {
        display: none;
    }

    .bottom-navbar {
        display: none;
    }

    .img-banner-top {
        height: 3rem;
        font-size: 0.8rem;
    }

    .img-banner-bottom {
        height: 14rem;
    }

    .manual-nav {
        display: none;
    }

    .pre-btn, .nxt-btn {
        width: 5%;
        padding: 0;
    }

    .discount-tag {
        font-size: 0.8rem;
        padding: 3px;
        left: 1.8em;
    }

    .book-thumb {
        height: 150px;
    }

    .book-title {
        font-family: "Playfair Display", serif;
        margin: 0.1em;
        font-size: 1.1rem;
    }

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

    .add-to-cart {
        width: 70%;
        font-size: 0.7rem;
        background-color: crimson;
    }

    .footer-nav li {
        font-size: 0.7rem;
    }

    .footer-copyright {
        font-size: 0.6rem;
    }

    .login {
        width: 30%;
        top: 7%;
    }

    .shopping-cart {
        top: 8%;
    }

    .shopping-cart div img {
        margin: 5% 0 3% 0;
        height: 30px;
    }

    .shopping-cart div span {
        margin: 3%;
    }

    .shopping-cart div btn {
        font-size: 0.8rem;
        padding: 0.2rem;
    }

    #buy-btn {
        font-size: 0.8rem;
        padding: 0.2rem;
        margin: 0.2rem;
    }
}