:root {
    --backgroundColour: #f5f1ea;
    --textColour: #2b2b2b;
    --headingColour: #1f1812;
    --accentColour1: #2f5d50;
    --accentColour2: #b38b59;
}

* {
    margin: 0;
    padding: 0;
}

html {
    background-color: var(--backgroundColour);
}

/* Navigation + Header */

nav {
    display: flex;
    justify-content: center;
}
@media only screen and (max-width: 700px) {
    nav {
        display: none;
    }

    nav.active {
        display: flex;
    }
}

nav ul {
    display: flex;
    justify-content: space-around;
    width: 90%;
    list-style-type: none;
    border-bottom: var(--accentColour2) solid 1px;
    padding-bottom: 1rem;
}
@media only screen and (max-width: 700px) {
    nav ul {
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        width: 30%;
    }
}

nav li {
    padding: 1rem 0;
    width: 10rem;
    text-align: center;
    color: var(--textColour);
    font-family: "Cormorant Garamond", serif;
    font-weight: 700;
    font-size: 1.5rem;
}
@media only screen and (max-width: 700px) {
    nav li {
        padding: 0.5rem 2rem;
        margin: 0;
    }
}
nav li:hover {
    color: var(--accentColour1);
}

#currentScreen {
    color: var(--accentColour1);
    border-bottom: 2px solid var(--accentColour2);
}
@media only screen and (max-width: 700px) {
    #currentScreen {
        border: none;
    }
}

.header {
    display: flex;
    width: 80%;
    justify-content: space-between;
    justify-self: center;
    align-items: center;
    margin: 0 10%;
    padding: 1rem 0;
    height: 4rem;
}
@media only screen and (max-width: 700px) {
    .header {
        margin: 0 5%;
    }
}

h1 {
    display: flex;
    justify-content: center;
    margin: 2rem;
    text-align: center;
    color: var(--headingColour);
    width: 80%;
    font-size: 4rem;
    font-family: "Cormorant Garamond", serif;
    font-weight: 700;
}
/* Slightly different size as the title overflowed early */
@media only screen and (max-width: 900px) {
    h1 {
        width: 90%;
        font-size: 1.8rem;
    }
}

.header a {
    width: fit-content;
    max-width: 4rem;
}

.header #menuIcon {
    display: none;
}
@media only screen and (max-width: 700px) {
    .header #bookIcon {
        display: none;
    }
    
    .header #menuIcon {
        display: block;
    }
}

#headerDecoration {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 20%;
    justify-self: center;
}

.lineDecoration {
    height: 2px;
    width: 100%;
    min-width: 80px;
    background-color: var(--accentColour2);
}

/* Main Page */

#mainPage {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.bookListing {
    display: flex;
    flex-direction: row;
    width: 40%;
    min-width: 530px;
    max-width: 600px;
    max-height: 20rem;
    flex-shrink: 1;
    margin: 3rem 2rem 2rem 2rem;
    padding: 1rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
@media only screen and (max-width: 700px) {
    .bookListing {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin: 3rem 1rem 1rem 1rem;
        width: 30%;
        max-height: none;
        min-width: 250px;
    }
}

.desc {
    display: flex;
    flex-direction: column;
    width: calc(100% - 220px);
}
@media only screen and (max-width: 700px) {
    .desc {
        width: 100%;
    }
}

.cover {
    box-sizing: border-box;
    width: 220px;
    flex-shrink: 0;
    flex-grow: 0;
}

.blurb {
    height: 80%;
    box-sizing: border-box;
    padding: 0 1rem;
    margin: 1rem 0;
}
@media only screen and (max-width: 700px) {
    .blurb {
        height: 50%;
    }
}

.blurb h3 {
    color: var(--headingColour);
    font-size: 1.5rem;
    font-weight: 700;
    font-family: "Cormorant Garamond", serif;
}

.authorName {
    color: var(--accentColour2);
}

.blurb p {
    height: 70%;
    overflow: scroll;
    overflow-x: hidden;
    scrollbar-color: var(--accentColour2) #e9e6df;
    padding-right: 1rem;
    color: var(--textColour);
    font-weight: 600;
    font-family: "Cormorant Garamond";
}
@media only screen and (max-width: 700px) {
    .blurb p {
        display: none;
    }
}

.pay {
    display: flex;
    align-items: center;
    width: 100%;
    height: 20%;
    padding: 0 1rem;
    box-sizing: border-box;
    align-self: center;
    color: var(--textColour);
}

.pay p {
    margin-right: 1rem;
    color: var(--accentColour2);
    font-weight: 700;
    font-size: 1.5rem;
    font-family: "Cormorant Garamond";
}

.pay button {
    width: 50%;
    height: 100%;
    padding: 0 1rem;
    background-color: var(--accentColour1);
    color: var(--backgroundColour);
    font-weight: 700;
    font-size: 1.1rem;
    font-family: "Cormorant Garamond";
    border-radius: 5px;
    border: none;
}
@media only screen and (max-width: 700px) {
    .pay button {
        width: 75%;
        height: 100%;
    }
}

/* Payment Page */

#paymentPage {
    display: flex;
    flex-direction: column;
    width: 90%;
    margin-left: calc((100% - 90%) / 2);
    padding-bottom: 5rem;
}

hr {
    margin: 25px 0;
    border: 1px solid var(--accentColour2);
}

#paymentPage h2 {
    color: var(--headingColour);
    font-size: 2rem;
    font-weight: 700;
    font-family: "Cormorant Garamond", serif;
}
@media only screen and (max-width: 700px) {
    #paymentPage h2 {
        font-size: 1.5rem;
    }
}

#basketContainer {
    display: flex;
    flex-direction: column;
    align-self: center;
    width: 60%;
}
@media only screen and (max-width: 700px) {
    #basketContainer {
        width: 80%;
    }
}

#basketItems {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    background-color: var(--backgroundColour);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    padding: 1rem;
    margin-bottom: 4rem;
}

#basketList {
    display: flex;
    flex-direction: column;
    align-items: center;
    list-style-type: none;
}

#basketList li {
    font-family: "Cormorant Garamond", serif;
    font-weight: 400;
    font-size: 1.4rem;
}

#clearBasket {
    width: 45%;
    max-width: 220px;
    margin-top: 1rem;
    justify-self: end;
    height: 2rem;
    background-color: var(--accentColour1);
    color: var(--backgroundColour);
    font-weight: 700;
    font-size: 1.1rem;
    font-family: "Cormorant Garamond";
    border-radius: 5px;
    border: none;
}

#detailsContainer {
    display: flex;
    flex-direction: column;
    align-self: center;
    width: 60%;
}
@media only screen and (max-width: 700px) {
    #detailsContainer {
        width: 80%;
    }
}

#cardTypes {
    display: flex;
    justify-content: space-around;
    align-items: center;
    align-self: center;
    flex-wrap: wrap;
    width: 80%;
    margin-bottom: 1rem;
}
@media only screen and (max-width: 700px) {
    #cardTypes {
        width: 100%;
        justify-content: center;
    }
}

#cardIcons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
}

#cardIcons img {
    height: clamp(60px, 6vw, 90px);
    width: auto;
    object-fit: contain;
}

#cardTypes p {
    width: 25%;
    min-width: 160px;
    font-weight: 600;
    font-size: 1.2rem;
    font-family: "Cormorant Garamond", serif;
}

#cardDetails {
    background-color: var(--backgroundColour);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    padding: 1rem;
}

#cardDetails form {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 2rem;
}

#cardDetails form label {
    font-weight: 700;
    font-size: 1.2rem;
    font-family: "Cormorant Garamond";
    padding-right: 1rem;
}

#dateSelection {
    display: inline-block;
}

#cardDetails form #secDetails {
    font-family: "Cormorant Garamond";
}

#cardDetails input,
#cardDetails select {
    background-color: #e9e6df;
    font-weight: 400;
    font-family: "Source Sans 3", serif;
}

#cardDetails form button {
    width: 30%;
    max-width: 220px;
    align-self: center;
    margin-top: 1rem;
    height: 2rem;
    background-color: var(--accentColour1);
    color: var(--backgroundColour);
    font-weight: 700;
    font-size: 1.1rem;
    font-family: "Cormorant Garamond";
    border-radius: 5px;
    border: none;
}

/* Success Page (Most styles shared with payment page) */

#successfulCardType {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 20%;
    min-width: 220px;
}

#cardSuccess {
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    width: 80%;
    margin-bottom: 1rem;
    gap: 1rem;
    font-weight: 700;
    font-family: "Cormorant Garamond", serif;
    text-align: center;
}
@media only screen and (max-width: 700px) {
    #cardSuccess {
        flex-direction: column;
    }
}

#cardSuccess img {
    max-height: 50px;
}

#cardEnd {
    font-weight: 400;
    font-family: "Source Sans 3";
}