* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 10px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-align: center;
    font-family: 'Source Sans Pro', sans-serif;
    background: #F6F6F6;
}

header {
    min-height: 5vh;
    border-bottom: 2px solid grey;
}

main {
    min-height: 30vh;
    display: flex;
    margin: 2rem 2rem;
    flex-grow: 1;
}

footer {
    border-top: 2px solid grey;
    min-height: 5vh;
}


.wrapper {
    width: 80%;
    margin: 0 auto;
    overflow: hidden;
}

h1 {
    font-size: 3rem;
    text-align: left;
    margin-left: 5rem;
    color: #495057;
    font-family: 'Source Sans Pro';
    padding-top: 1rem;
}

h1 a {
    text-decoration: none;
    color: #495057;
}



/* catalog */


.catalog {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 4fr));
    row-gap: 5rem;
    column-gap: 1.7rem;
}

.book {
    height: 400px;
    /* border: 2px solid #479152; */
    position: relative;

}

.book:hover {
   cursor: pointer;
   transform: scale(1.03);
   box-shadow: 0 0 10px rgba(0,0,0,0.5);
}



.book_wrapper {
    position: relative;
}

.book_wrapper:hover .book_image {
    opacity: 0.5;
}

.book_wrapper:hover .more__button {
    display: block;
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
}

.button {
    width: 100%;
    /* border-radius: 100px; */
    border: 2px solid #8add97;
    color: #fdfafa;
    font-family: Georgia;
    font-size: 1.5rem;
    line-height: 130%;
    letter-spacing: 0.06em;
    background: #8add97;
    padding: 7px 9px;
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0%;
}

.button:hover {
    cursor: pointer;
    background: #479152;
    border: 2px solid #479152;
}

.more__button {
    display: none;
}

.backet__button {
    display: flex;
    justify-content: center;
}

.book_image {
    height: 200px;
    padding-bottom: 1rem;
}

.book_title {
    padding-top: 1rem;
    padding-bottom: 2rem;
    font-family: 'Georgia';
    font-style: normal;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.5rem;
    letter-spacing: 0.06em;
}

.book_author {
    color: #9e866b;
    font-size: 1.3rem;
    padding-top: 1rem;
}

.book_price {
    font-size: 2rem;
    text-align: left;
    font-weight: bold;
    color: #495057;
}

.book_currency {
    font-size: 2rem;
}



/* basket */



.basket_wrapper {
    display: flex;
    width: 30%;
    background-color: #e6f7e9;
    color: #9e866b;
    font-size: 3rem;
    font-size: 2.5rem;
    margin-left: 1rem;

}

.basket {
    width: 100%;
}

.basket_title {
    text-align: center;
}

.basket_item {
    display: flex;
    width: 100%;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 2rem 1rem;
    border-bottom: 2px solid grey;
}

.child-active {
    align-self: flex-start;
}


.basket_item_part:first-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: space-between;
}

.quantity_input {
    width: 6rem;
    font-size: 2.3rem;
    text-align: center;
    margin-right: 3rem;
}

.basket_amount_remove {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.basket_item_title {
    font-size: 1.3rem;
}

.basket_item_author {
    font-size: 1.1rem;
    padding-bottom: 2rem;

}

.button_remove {
    border: 2px solid #dd6365;
    color: #fdfafa;
    font-family: Georgia;
    font-size: 1rem;
    line-height: 130%;
    letter-spacing: 0.06em;
    background: #dd6365;
    padding: 7px 9px;
}

.button_remove:hover {
    cursor: pointer;
    background: #f13034;
    border: 2px solid #f13034;
    ;
}


.basket_total {
    margin-top: 2rem;
    text-align: right;
}

.total_title {
    margin-right: 2rem;
    font-weight: bold;
}

.total_price {
    margin-right: 1rem;
}

.link_form {
    text-decoration: none;
}

.buy_button {
    display: none;
}

.buy_button.visible {
    display: block;
    border: 2px solid #8add97;
    color: #fdfafa;
    font-family: Georgia;
    font-size: 2rem;
    line-height: 130%;
    letter-spacing: 0.06em;
    background: #8add97;
    padding: 7px 9px;
    text-align: center;
    margin: 2rem 1rem;
}

.buy_button:hover {
    cursor: pointer;
    background: #479152;
    border: 2px solid #479152;
}




/* learn more  popup*/
#popup_more {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 125%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2;
    font-size: 2rem;
    text-align: center;
    color: #353a3f;
}

#popup_more.visible {
    display: flex;
    justify-content: center;
    align-items: center;
}

#more_content {
    margin-bottom: 40rem;
    width: 60rem;
    flex-direction: column;
    height: 30rem;
    background: white;
    border-radius: 5px;
    display: flex;
}

.close_result {
    margin-left: auto;
    margin-bottom: auto;
    font-size: 3rem;
}

.close_result:hover {
    cursor: pointer;
    color: #479152;
}

.description {
    padding: 7rem 2rem;
}


/* form */
.delivery_title {
    font-size: 3rem;
}

.form_delivery {
    width: 70%;
    margin: 2rem auto;
    border: 2px solid grey;
    padding: 20px;
    font-size: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.form_title {
    text-align: left;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.input {
    padding: 15px 20px;
    border: 2px solid #dfd;
    background-color: #dfd;
    border-radius: 10px;
    color: #42464a;

}

.input:invalid {
    border-color: #fdd;
    background-color: #fdd;
}

.input:focus {
    outline: none;
   
}

.input:focus::placeholder {
    opacity: 0;
}

.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus,
.input:-webkit-autofill:active {
    box-shadow: inset 0 0 0px 9999px #dfd;
    border: 2px solid #dfd;
}

.input:invalid:-webkit-autofill,
.input:invalid:-webkit-autofill:hover,
.input:invalid:-webkit-autofill:focus,
.input:invalid:-webkit-autofill:active {
    box-shadow: inset 0 0 0px 9999px #fdd;
    border: 2px solid #fdd;
}



.message {
    opacity: 0;
    margin: 5px 0 8px 10px;
    font-size: 1.2rem;
    text-align: left;
    color: red;
}


#submit {
    padding: 15px 10px;
    border: 2px solid #479152;
    border-radius: 6px;
    transition: background-color 300ms;
    margin-top: 10px;
    color: rgb(240, 235, 235);
    background-color: #479152;
    font-weight: bold;

    cursor: pointer;
    text-transform: uppercase;
}

#submit:disabled {
    background-color: #ccc;
}

#submit:disabled:hover {
    cursor: not-allowed;
    background-color: #ccc;
    color: #495057;
}


#submit:hover {
    background-color: #479152;
    color: rgb(240, 235, 235);
    cursor: pointer;
}


.non-valid:invalid {
    border-color: red;
}





/* gender */
.payment_method {
    z-index: 1;
}

.payment {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.payment label {
    user-select: none;
}

input[type="radio"] {
    display: none;
}

input[type="radio"]+label {
    z-index: 10;
    margin: 0 10px 10px 0;
    position: relative;
    color: #ced4da;
    /* text-shadow: 0 1px 0 rgba(255, 255, 255, 0.1); */
    font-weight: bold;
    background-color: #ffffff;
    border: 2px solid #ced4da;
    cursor: pointer;
    transition: all 200ms ease;
}

input[type="radio"]:checked+label {
    color: #495057;
    background-color: #ced4da;
}

input[type="radio"]+label {
    padding: 5px 20px;
    border-radius: 10px;
}




/* result delivery */
#popup_result {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 130%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2;
    font-size: 2rem;
    text-align: center;
}

#popup_result.visible {
    display: flex;
    justify-content: center;
    align-items: center;
}

#log-content {
    width: 60rem;
    flex-direction: column;
    height: 30rem;
    background: white;
    border-radius: 5px;
    display: flex;
    margin-bottom: 50rem;
    /* justify-content:center;
    align-items:center; */
}

#result1 {
    padding-top: 3rem;
}

#result3 {
    padding-bottom: 5rem;
}


.close_form {
    margin-left: auto;
    margin-bottom: auto;


}

.close_form:hover {
    cursor: pointer;
    color: #479152;
}


/* footer */