/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Big+Shoulders+Text:wght@100..900&display=swap");

/** Css Reset*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

/**Root*/
:root {
    --main-color: #273ea1;
    --text-color: #000;
    --bg-color: #fff;
    --container-color: #1e1e2a;
    --header-color: #f2f0f1;
}

body {
    font-family: "Big Shoulders Text", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.container {
    max-width: 1070px;
    width: 100%;
    margin: auto;
}

/**Header*/
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-color);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 0;
}

#menu-icon {
    font-size: 28px;
    color: var(--main-color);
    cursor: pointer;
    display: none;
}

.logo {
    font-size: 24px;
    color: var(--main-color);
    font-weight: 700;
}

.navbar {
    display: flex;
    align-items: center;
    column-gap: 16px;
}

.nav-link {
    color: var(--main-color);
    font-size: 17px;
    font-weight: 700;
}

#cart-icon {
    font-size: 29px;
    color: var(--main-color);
    cursor: pointer;
    position: relative;
}

.bxs-shopping-bag {
    position: relative;
}

.bxs-shopping-bag::after {
    content: attr(data-quantity);
    position: absolute;
    top: 0;
    right: -11px;
    background-color: var(--main-color);
    color: var(--bg-color);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
}

/*Footer*/
footer {
    background-color: var(--main-color);
    margin-top: 50px;
    padding: 40px 10px;
}

.footer-c {
    display: grid;
    grid-template-columns: 60% 20% 20%;
    gap: 16px;
}

.footer-box {
    display: flex;
    flex-direction: column;
}

.footer-box h2 {
    font-size: 128px;
    color: var(--bg-color);
}

.social {
    display: flex;
    align-items: center;
    column-gap: 16px;
}

.social i {
    background-color: var(--bg-color);
    font-size: 20px;
    padding: 10px;
    color: var(--main-color);
    border-radius: 50%;
}

.footer-box h3 {
    color: var(--bg-color);
}

.footer-box a,
.copyright {
    color: var(--bg-color);
    padding-top: 30px;
}

/*! Home Page */
/* *Home */
.home {
    position: relative;
    background-color: var(--header-color);
    min-height: 700px;
}

.home-img {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%);
    display: flex;
    justify-content: center;
}

.home-img img {
    width: 70%;
    max-height: 700px;
}

.home-img::before {
    content: "Coloring Styles";
    text-transform: uppercase;
    font-size: 144px;
    text-align: center;
    position: absolute;
    top: -28px;
    z-index: -1;
    color: var(--main-color);
    font-weight: 900;
}

/** Product */
.heading {
    text-align: center;
    font-size: 64px;
    font-weight: 900;
    margin-top: 20px;
}

.product-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.product-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-color);
    margin: 12px 0 8px;
}

.product-price {
    font-size: 19px;
    font-weight: 400;
    color: var(--main-color);
}

.add-to-cart {
    background-color: var(--main-color);
    color: var(--bg-color);
    font-weight: 600;
    padding: 10px;
    text-align: center;
    letter-spacing: 1px;
    margin-top: 45px;
    cursor: pointer;
    border: none;
    outline: none;
}

/*!Cart Page */
.cart-container {
    margin-top: 115px !important;
}

.back-to-home {
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.back-to-home i {
    font-size: 24px;
}

.back-to-home span {
    font-size: 16px;
    font-weight: 600;
}

.shopping-cart {
    margin-top: 32px;
}

.cart-box {
    display: grid;
    grid-template-columns: 80% 20%;
    margin-top: 40px;
    gap: 16px;
}

#cartItems {
    display: grid;
    row-gap: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 0.5fr 1fr 0.5fr 0.5fr;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgb(227, 227, 227);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center;
}

.cart-item-title {
    font-size: 25px;
}

.cart-item-quantity {
    border: 1px solid var(--text-color);
    outline: none;
    width: 40px;
    text-align: center;
    font-size: 18px;
    border-radius: 5px;
    margin-top: 10px;
    cursor: pointer;
}

.cart-item-price {
    font-size: 18px;
}

.remove-from-cart {
    max-width: 80px;
    font-weight: 600;
    border: none;
    outline: none;
    padding: 8px;
    background-color: crimson;
    color: var(--bg-color);
    cursor: pointer;
}

.cart-t {
    display: flex;
    flex-direction: column;
}

#cartTotal {
    font-size: 32px;
    font-weight: 700;
    white-space: nowrap;
}

.checkout-btn {
    margin-top: 32px;
    background-color: var(--main-color);
    padding: 10px;
    color: var(--bg-color);
    max-width: 150px;
    font-weight: 600;
    letter-spacing: 1.7;
    text-align: center;
}

/**Responsive Design*/
@media(max-width: 1200px) {
    .container {
        width: 90%;
        margin: 0 auto;
    }

    .home-img::before {
        top: -35px;
        font-size: 128px;
    }

    .product-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width: 910px) {
    .nav {
        padding: 18px 0;
    }

    .home-img::before {
        font-size: 96px;
        top: -35px;
    }
}

@media(max-width: 720px) {
    .home {
        min-width: 620px;
    }

    .home-img::before {
        font-size: 80px;
        top: -40px;
    }

    .cart-box {
        grid-template-columns: 1fr;
    }

    .footer-c {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 550px) {
    .home {
        min-width: 520px;
    }

    #menu-icon {
        display: initial;
    }

    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        background-color: var(--header-color);
        row-gap: 8px;
        padding: 10px 0;
        text-align: center;
        box-shadow: 0 20px 20px rgba(237, 237, 237, 0.45);
        clip-path: circle(0% at 0% 0%);
        transition: all 0.5s;
    }

    /**CSS'de clip-path özelliği, bir HTML öğesinin sadece belirli bir kısmını görünür kılmak icin kullanilir*/
    .nav-link {
        display: block;
        padding: 15px;
    }

    .navbar.open-menu {
        clip-path: circle(144% at 0% 0%);
    }

    .product-container {
        grid-template-columns: repeat(2, 1fr);
    }
}