@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;700&display=swap');

/* ======================================= */
/* ============= MAIN LAYOUT ============= */
/* ======================================= */

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

.clearfix::after {
    content: "";
    clear: both;
    display: block;
}

* {
    font-family: 'Nunito Sans', sans-serif;
}

html, body {
    height: 100%;
}

body {
    /*background-color: #232f3e;
    color: #fff;*/
    background-color: #eaeded;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none;
}

main {
    display: flex;
    width: 100%;
    padding: 2em;
    flex: 1 0 auto;
}

.block {
    background: #fff;
    padding: 1em 3em;
    margin: 1em;
    border-radius: 20px;
    align-self: flex-start;
}

.btn {
    display: block;
    font-size: 1em;
    font-weight: bold;
    background-color: #fff;
    color: #22466e;
    border: 2px dotted #22466e;
    border-radius: 1.5em;
    cursor: pointer;
    transition: 0.25s;
    line-height: 1.75em;
    text-align: center;
    text-decoration: none;
    padding: 0 1em;
    outline: none;
}

.btn:hover {
    background: #22466e;
    color: #fff;
}

h1 {
    line-height: 2em;
}

@media only screen and (max-width: 1024px) {
    main {
        display: block;
    }
}

@media only screen and (max-width: 768px) {
    body {
        background-color: #fff;
    }

    main {
        display: block;
        padding: 0;
        background-color: #fff;
        width: 100%;
    }
}


/* ================================== */
/* ============= HEADER ============= */
/* ================================== */

header {
    /*background-color: #131921;*/
    background-image: linear-gradient(135deg, #131921, #232f3e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-items: center;
    height: 100px;
    flex: 0 0 auto; /* fix for safari */
}

header .logo {
    padding: 1em 2em;
    display: inline-block;
    text-align: center;
    width: 20%;
}

header .logo img {
    width: 100%;
    max-width: 193px;
}

.search {
    display: flex;
    flex-grow: 1;
}

.search-input {
    border: none;
    outline: none;
    height: 3rem;
    padding: 0 1.5rem;
    font-size: 1rem;
    border-radius: 1.5rem 0 0 1.5rem;
    flex-grow: 1;
}

.search-btn {
    border: none;
    outline: none;
    border-radius: 0 1.5rem 1.5rem 0;
    width: 4rem;
    height: 3rem;
    vertical-align: middle;
    cursor: pointer;
    background: #fff url(../images/icons/magnifying-glass.svg) center center no-repeat;
    background-size: 1.5rem;
    transition: background-color 0.15s;
}

.search-btn:hover {
    background-color: #c3eaff;
}

nav {
    display: inline-block;
    height: 100%;
    text-align: center;
    margin: 0 2em;
}

nav a {
    text-decoration: none;
    color: #fff;
    line-height: 100px;
    text-align: center;
    /*padding: 1em 1.5em;*/
    padding: 1em 1em;
    margin: 0 0.5em;
    border-radius: 5px;
    transition: background-color 0.25s;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-text {
    font-size: 1.5em;
    vertical-align: middle;
}

.nav-icon {
    display: inline-block;
    width: 32px;
    height: 100px;
    background: center center no-repeat;
    vertical-align: middle;
}

#nav-account .nav-icon {
    background-image: url(../images/icons/account.svg);
}

#nav-orders .nav-icon {
    background-image: url(../images/icons/package.svg);
}

#nav-cart .nav-icon {
    background-image: url(../images/icons/shopping-cart.svg);
    color: #00a5ff;
    font-weight: bold;
}

#cart-count {
    display: inline-block;
    margin-left: 10px;
    line-height: 0.5em;
    vertical-align: text-top;
}

@media only screen and (max-width: 1024px) {
    header {
        height: auto;
        flex-wrap: wrap;
    }

    header .logo {
        padding-right: 0;
    }

    .search {
        margin: 0 2em;
    }

    nav {
        display: flex;
        width: 100%;
        height: 65px;
        margin: 0;
    }

    nav a {
        line-height: 65px;
        display: inline-block;
        padding: 0;
        height: 65px;
        flex-grow: 1;
        margin: 0;
    }

    .nav-icon {
        height: 65px;
    }
}

@media only screen and (max-width: 768px) {
    header {
        display: block;
    }

    header .logo {
        display: block;
        margin: 0 auto;
        width: 100%;
    }

    .nav-text {
        font-size: calc(0.5em + 3vw);
    }
}





/* ================================== */
/* ============= FOOTER ============= */
/* ================================== */

/*footer {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
}*/

.footer-waves {
    margin-bottom: -15px;
}

.footer-content {
    padding: 3em 2em;
    background-color: #22466e;
    color: #fff;
    text-align: center;
}

.footer-content a {
    font-weight: bold;
    color: #fff;
    /*text-decoration: underline dashed #00a5ff;*/
    text-decoration: none;
    transition: 0.15s;
}

.footer-content a:hover {
    color: #7ed2ff;
}





/* ================================ */
/* ============= CART ============= */
/* ================================ */

.cart {
    width: 75%;
}

.cart th span {
    display: block;
    color: #22466e;

    padding: 0 1em;
    width: calc(100% - 1em);
}

.cart thead {
    border-bottom: 3px solid #22466e;
}

.cart table {
    text-align: center;
    border: 0;
    border-spacing: 0;
}

.cart tbody tr {
    transition: 0.25s;
}

.cart tbody tr:hover {
    background-color: #eaeded;
}

.cart td {
    padding: 1em 0;
}

.cart-image {
    max-width: 100px;
    max-height: 100px;
}

.cart .cart-name-text {
    text-align: left;
    padding: 0 0.5em;
}

.qty-inc-btn, .qty-dec-btn {
    width: 2em;
    padding: 0;
    margin: 0 auto;
}

.qty-edit-btn {
    display: inline-block;
    vertical-align: middle;
}

.quantity span {
    display: inline-block;
    width: 2em;
    height: 2em;
    line-height: 2em;
    border-radius: 5px;
    margin: 0.25em;
    background-color: #ddd;
    cursor: pointer;
    transition: 0.25s;
}

.quantity span:hover {
    background-color: #bbb;
}

.cart-total {
    width: 25%;
    text-align: center;
}

.cart-total-text h1, #checkout-cart-count {
    color: #22466e;
}

.checkout-btn {
    font-size: calc(1em + 0.5vw);
    padding: 0.25em 0;
}

@media only screen and (max-width: 1024px) {
    .cart, .cart-total {
        margin: 1em 0;
    }

    .cart {
        width: 100%;
    }

    .cart-total {
        width: 50%;
        margin: 0 auto;
        display: flex;
    }

    .cart-total-text {
        width: 50%;
    }

    .checkout-btn {
        width: 50%;
        font-size: 1.25em;
        line-height: 3.5em;
        height: 3.5em;
        border-radius: 0.5em;
        padding: 0;
    }
}

@media only screen and (max-width: 768px) {
    .cart-image {
        max-width: 75px;
        max-height: 75px;
    }

    .cart {
        margin: 0;
        padding: 1em;
        width: 100%;
        overflow: auto;
    }

    .cart table {
        width: calc(768px - 2em);
    }

    .cart-total {
        width: 100%;
        padding: 1em 2em;
        text-align: center;
    }
}





/* ==================================== */
/* ============= CHECKOUT ============= */
/* ==================================== */

.checkout {
    /*width: 50%;*/
    margin: 1em auto;
    line-height: 2em;
}

.checkout h3 {
    display: block;
    width: fit-content;
    width: -moz-fit-content;
    color: #22466e;
    border-bottom: 2px dotted #22466e;
    margin: 0.25em 0;
}

.checkout div {
    margin-bottom: 1em;
}

.checkout ul {
    list-style-position: inside;
    list-style-type: square;
}

.checkout ul li {
    max-width: 500px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.checkout ul li::marker {
    color: #00a5ff;
}

.checkout ul li span.quantity {
    font-weight: bold;
    margin-right: 0.5em;
}

.checkout-price-text {
    font-size: 1.25em;
    color: #22466e;
}

.checkout label, .checkout input[type=text] {
    display: block;
    line-height: 2em;
    height: 2em;
    font-size: 1em;
    margin: 0.5em 0;
    padding: 0 0.5em;
}

.checkout div {
    display: inline-block;
}

.checkout label {
    font-weight: bold;
    text-align: right;
}

.checkout label::before {
    content: '* ';
    color: #00a5ff;
    font-weight: normal;
}

#submit-btn {
    margin: 0 auto;
    margin-bottom: 0.5em;
    font-size: 1.25em;
    padding: 0.5em 1.5em;
}

@media only screen and (max-width: 1024px) {
    .checkout ul li {
        max-width: calc(100vw - 10em);
    }
}

@media only screen and (max-width: 768px) {
    .checkout {
        margin: 0;
        padding: 1em;
        width: 100%;
    }

    .checkout ul {
        overflow: auto;
    }

    .checkout ul li {
        max-width: calc(100vw - 2em);
        overflow: initial;
        text-overflow: initial;
    }

    .checkout label, .checkout input[type=text] {
        font-size: calc(0.75em + 0.65vw);
        padding: 0 0.25em;
    }
}





/* ================================== */
/* ============= ORDERS ============= */
/* ================================== */

.orders {
    width: 100%;
}

.order {
    margin-bottom: 1em;
}

.order-header {
    cursor: pointer;
    border-radius: 10px 10px 0 0;
    padding: 1.25em 2em;
    background-color: #22466e;
    color: #fff;
    transition: border-radius 0.25s;
}

.order.collapsed .order-header {
    border-radius: 10px;
}

.order-date, .order-total {
    display: inline-block;
}

.order-date {
    width: 65%;
}

.order-total {
    width: 35%;
    text-align: right;
}

.order-body {
    border: 1px solid #22466e;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 2em;
    padding-top: 1em;
    transition: max-height 0.25s, padding 0.25s, opacity 0.25s;
    /*max-height: 9999px;*/
    overflow: hidden;
}

.order.collapsed .order-body {
    max-height: 0 !important;
    opacity: 0;
    padding: 0 2em;
}

.order-body ul {
    list-style: none;
}

.order-body ul li .img-wrapper {
    display: inline-block;
    width: 100px;
    max-height: 100px;
    text-align: center;
    vertical-align: middle;
}

.order-body ul li img {
    max-width: 100px;
    max-height: 100px;
}

.order-body ul li p {
    display: inline-block;
    width: calc(100% - 100px);
    padding-left: 1em;
    vertical-align: middle;
}

.order-body ul li p .quantity {
    font-weight: bold;
    margin-right: 0.5em;
}

.clear-orders-btn {
    margin: 0 auto;
    padding: 0.5em 1.5em;
}

@media only screen and (max-width: 768px) {
    .orders {
        display: block;
        margin: 0;
        padding: 1em;
    }

    .order-date, .order-total {
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .order-body {
        padding: 0 1em;
    }

    .order-body ul li {
        margin: 1.5em 0;
    }

    .order-body ul li .img-wrapper {
        width: 75px;
        max-height: 75px;
    }

    .order-body ul li img {
        max-width: 75px;
        max-height: 75px;
    }
    
    .order-body ul li p {
        width: calc(100% - 75px);
    }
}





/* =================================== */
/* ============= ACCOUNT ============= */
/* =================================== */

.account {
    /*width: 50%;*/
    margin: 1em auto;
    line-height: 2em;
}

.account h3 {
    display: block;
    width: fit-content;
    width: -moz-fit-content;
    color: #22466e;
    border-bottom: 2px dotted #22466e;
    margin: 0.25em 0;
}

.account div {
    margin-bottom: 1em;
}

.account label, .account input[type=text], .account select {
    display: block;
    line-height: 2em;
    height: 2em;
    font-size: 1em;
    margin: 0.5em 0;
    padding: 0 0.5em;
}

.account input#city, .account select {
    width: 10em;
}

.account div {
    display: inline-block;
}

.account label {
    font-weight: bold;
    text-align: right;
}

.account label:not([for='add2'])::before {
    content: '* ';
    color: #00a5ff;
    font-weight: normal;
}

#submit-btn {
    margin: 0 auto;
    margin-bottom: 0.5em;
    font-size: 1.25em;
    padding: 0.5em 1.5em;
}

@media only screen and (max-width: 768px) {
    .account {
        margin: 0;
        padding: 1em;
        width: 100%;
    }

    .account label, .account input[type=text], .account select {
        font-size: calc(0.75em + 0.65vw);
        padding: 0 0.25em;
    }
}





/* ================================ */
/* ============= HOME ============= */
/* ================================ */

main.home {
    flex-wrap: wrap;
}

.welcome.block {
    width: calc(33.33% - 2em);
    min-height: 350px;
}

.welcome.block p {
    font-size: 1.25em;
    margin-bottom: 0.75em;
}

.item.block {
    width: calc(16.66% - 2em);
    height: 350px;
    padding: 1em;
}

.item.block .img-wrapper {
    margin: 0 auto;
}

.item.block img {
    display: block;
    max-width: 100%;
    max-height: 125px;
    margin: 0 auto;
}

/*.item.block .img-wrapper .add-to-cart-btn {
    display: inline;
    width: 2em;
    height: 2em;
    padding: 0;
}*/

.item.block .add-to-cart-btn {
    margin: 0 auto;
    height: 2em;
    overflow: hidden;
}

.item.block .add-to-cart-btn span {
    display: block;
}

.item.block .add-to-cart-btn .add-text {
    transition: margin-top 0.3s;
}

.item.block .add-to-cart-btn.added {
    background-color: #22466e;
    color: #fff;
    border-color: #22466e;
}

.item.block .add-to-cart-btn.added .add-text {
    margin-top: -1.75em;
}

.item.block p {
    max-height: 5.25em;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0.75em auto;
    text-align: center;
}

.item.block p.price {
    font-weight: bold;
    color: #22466e;
}

@media only screen and (max-width: 1800px) {
    .welcome.block {
        width: calc(40% - 2em);
    }

    .item.block {
        width: calc(20% - 2em);
    }
}

@media only screen and (max-width: 1500px) {
    .welcome.block {
        width: calc(50% - 2em);
    }

    .item.block {
        width: calc(25% - 2em);
    }
}

@media only screen and (max-width: 1024px) {
    main.home {
        display: flex;
    }

    .welcome.block {
        width: calc(66.66% - 2em);
    }

    .item.block {
        width: calc(33.33% - 2em);
    }
}

@media only screen and (max-width: 768px) {
    .welcome.block {
        width: 100%;
        padding: 1em;
        min-height: auto;
    }
    
    .welcome.block p {
        font-size: 1em;
        margin-bottom: 0.5em;
    }

    .item.block {
        padding: 0.5em;
        width: 33.33%;
        margin: 0;
    }
}

@media only screen and (max-width: 650px) {
    .item.block {
        width: 50%;
    }
}

/*@media only screen and (max-width: 480px) {
    .item.block {
        width: 100%;
    }
}*/

