/* =========================================================
   Noble Shine — Cart
   ========================================================= */

.ns-cart {
    position: relative;

    min-height: 100vh;

    padding: 70px 0 120px;

    background:
        radial-gradient(
            circle at 82% 20%,
            rgba(45, 112, 154, .12),
            transparent 34%
        ),
        radial-gradient(
            circle at 12% 75%,
            rgba(38, 101, 143, .1),
            transparent 32%
        ),
        #0d263d;

    color: #fff;
}


/* =========================================================
   Header
   ========================================================= */

.ns-cart__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 52px;
}

.ns-cart__title {
    margin: 0;

    color: #fff;

    font-size: clamp(44px, 5vw, 76px);
    line-height: .98;
    font-weight: 400;

    letter-spacing: -.035em;
}

.ns-cart__count {
    padding-bottom: 8px;

    color: rgba(255,255,255,.48);

    font-size: 14px;
}


/* =========================================================
   Layout
   ========================================================= */

.ns-cart__layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        360px;

    gap: 56px;

    align-items: start;
}


/* =========================================================
   Items
   ========================================================= */

.ns-cart__items {
    display: flex;
    flex-direction: column;
}


/* =========================================================
   Item
   ========================================================= */

.ns-cart-item {
    position: relative;

    display: grid;

    grid-template-columns:
        150px
        minmax(0, 1fr)
        auto
        155px
        44px;

    gap: 28px;

    align-items: center;

    padding: 28px 0;

    border-top:
        1px solid rgba(255,255,255,.12);
}

.ns-cart-item:last-child {
    border-bottom:
        1px solid rgba(255,255,255,.12);
}


/* =========================================================
   Image
   ========================================================= */

.ns-cart-item__image {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 150px;
    height: 170px;

    padding: 16px;

    overflow: hidden;

    border-radius: 28px;

    background: #1d5174;

    text-decoration: none;
}

.ns-cart-item__image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    transition: transform .3s ease;
}

.ns-cart-item__image:hover img {
    transform: scale(1.035);
}

.ns-cart-item__image
.ns-cart-item__placeholder {
    width: 65%;
    height: auto;

    opacity: .28;
}


/* =========================================================
   Product information
   ========================================================= */

.ns-cart-item__content {
    min-width: 0;
}

.ns-cart-item__name {
    display: inline-block;

    max-width: 520px;

    color: #fff;

    font-size: clamp(19px, 1.6vw, 27px);
    line-height: 1.2;
    font-weight: 400;

    text-decoration: none;

    transition: color .2s ease;
}

.ns-cart-item__name:hover {
    color: #70acd2;
}

.ns-cart-item__price {
    margin-top: 14px;

    color: rgba(255,255,255,.5);

    font-size: 14px;
}


/* =========================================================
   Quantity
   ========================================================= */

.ns-cart-item__quantity {
    display: grid;

    grid-template-columns:
        44px
        48px
        44px;

    align-items: center;

    height: 48px;

    border:
        1px solid rgba(73,145,191,.55);
}

.ns-cart-item__qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 46px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #fff;

    font: inherit;
    font-size: 23px;
    font-weight: 300;

    cursor: pointer;

    transition:
        background-color .2s ease,
        color .2s ease;
}

.ns-cart-item__qty-btn:hover {
    background:
        rgba(69,143,188,.18);

    color: #6ab2df;
}

.ns-cart-item__qty {
    width: 48px;
    height: 46px;

    padding: 0;

    border: 0;
    outline: 0;

    background: transparent;

    color: #fff;

    font: inherit;
    font-size: 15px;

    text-align: center;

    -moz-appearance: textfield;
}

.ns-cart-item__qty::-webkit-inner-spin-button,
.ns-cart-item__qty::-webkit-outer-spin-button {
    margin: 0;

    -webkit-appearance: none;
}


/* =========================================================
   Item total
   ========================================================= */

.ns-cart-item__total {
    min-width: 150px;

    color: #fff;

    font-size: 22px;
    line-height: 1;
    font-weight: 600;

    text-align: right;

    white-space: nowrap;
}


/* =========================================================
   Remove
   ========================================================= */

.ns-cart-item__remove {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;

    border:
        1px solid rgba(255,255,255,.17);
    border-radius: 50%;

    background: transparent;

    color: rgba(255,255,255,.55);

    font: inherit;
    font-size: 25px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transition:
        border-color .2s ease,
        color .2s ease,
        background-color .2s ease,
        transform .2s ease;
}

.ns-cart-item__remove:hover {
    border-color: #f57832;

    background:
        rgba(245,120,50,.08);

    color: #f57832;

    transform: rotate(5deg);
}


/* =========================================================
   Summary
   ========================================================= */

.ns-cart-summary {
    position: sticky;
    top: 130px;

    padding: 32px;

    border:
        1px solid rgba(70,143,188,.42);

    background:
        rgba(13,38,61,.72);

    backdrop-filter: blur(8px);
}

.ns-cart-summary__label {
    margin-bottom: 30px;

    color: #4a95c5;

    font-size: 12px;
    line-height: 1;

    letter-spacing: .16em;

    text-transform: uppercase;
}

.ns-cart-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding-bottom: 24px;

    border-bottom:
        1px solid rgba(255,255,255,.11);

    color: rgba(255,255,255,.58);

    font-size: 14px;
}

.ns-cart-summary__row span:last-child {
    color: #fff;

    white-space: nowrap;
}


/* =========================================================
   Total
   ========================================================= */

.ns-cart-summary__total {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    padding: 28px 0 32px;

    color: #fff;
}

.ns-cart-summary__total > span {
    font-size: 18px;
}

.ns-cart-summary__total strong {
    font-size: 28px;
    line-height: 1;

    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   Checkout
   ========================================================= */

.ns-cart-summary__checkout {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 60px;

    padding: 0 24px;

    border:
        1px solid #f57832;

    background: #f57832;

    color: #fff;

    font-size: 15px;

    text-decoration: none;

    transition:
        background-color .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.ns-cart-summary__checkout:hover {
    background: #ff8341;
    border-color: #ff8341;

    color: #fff;

    transform: translateY(-2px);
}


/* =========================================================
   Continue shopping
   ========================================================= */

.ns-cart-summary__continue {
    display: flex;
    justify-content: center;

    margin-top: 19px;

    color: rgba(255,255,255,.55);

    font-size: 13px;

    text-decoration: none;

    transition: color .2s ease;
}

.ns-cart-summary__continue:hover {
    color: #69acd4;
}


/* =========================================================
   Empty cart
   ========================================================= */

.ns-cart-empty {
    max-width: 780px;

    padding: 70px 0 100px;
}

.ns-cart-empty__eyebrow {
    margin-bottom: 18px;

    color: #478fbd;

    font-size: 12px;
    line-height: 1;

    letter-spacing: .18em;
}

.ns-cart-empty h2 {
    max-width: 700px;

    margin: 0;

    color: #fff;

    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.02;
    font-weight: 400;

    letter-spacing: -.03em;
}

.ns-cart-empty p {
    max-width: 520px;

    margin: 24px 0 0;

    color: rgba(255,255,255,.57);

    font-size: 17px;
    line-height: 1.55;
}

.ns-cart-empty > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 58px;

    margin-top: 35px;
    padding: 0 28px;

    background: #f57832;

    color: #fff;

    font-size: 14px;

    text-decoration: none;

    transition:
        background-color .2s ease,
        transform .2s ease;
}

.ns-cart-empty > a:hover {
    background: #ff8341;

    transform: translateY(-2px);
}


/* =========================================================
   Laptop
   ========================================================= */

@media (max-width: 1280px) {

    .ns-cart__layout {
        grid-template-columns:
            minmax(0, 1fr)
            320px;

        gap: 38px;
    }

    .ns-cart-item {
        grid-template-columns:
            125px
            minmax(0, 1fr)
            auto
            125px
            42px;

        gap: 20px;
    }

    .ns-cart-item__image {
        width: 125px;
        height: 145px;
    }

    .ns-cart-item__total {
        min-width: 120px;

        font-size: 19px;
    }

}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1024px) {

    .ns-cart__layout {
        grid-template-columns: 1fr;

        gap: 48px;
    }

    .ns-cart-summary {
        position: static;
    }

}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 720px) {

    .ns-cart {
        padding:
            45px
            0
            75px;
    }

    .ns-cart__head {
        align-items: flex-start;
        flex-direction: column;

        gap: 10px;

        margin-bottom: 34px;
    }

    .ns-cart__title {
        font-size: 46px;
    }

    .ns-cart__count {
        padding: 0;
    }


    /* item */

    .ns-cart-item {
        grid-template-columns:
            105px
            minmax(0, 1fr)
            40px;

        gap: 18px;

        padding: 22px 0;
    }

    .ns-cart-item__image {
        grid-row: 1 / span 2;

        width: 105px;
        height: 125px;

        border-radius: 22px;
    }

    .ns-cart-item__content {
        grid-column: 2;
    }

    .ns-cart-item__remove {
        grid-column: 3;
        grid-row: 1;

        width: 38px;
        height: 38px;

        font-size: 22px;
    }

    .ns-cart-item__quantity {
        grid-column: 2;
        grid-row: 2;

        justify-self: start;
    }

    .ns-cart-item__total {
        grid-column: 1 / -1;

        min-width: 0;

        margin-top: 2px;

        text-align: right;

        font-size: 20px;
    }

    .ns-cart-item__name {
        font-size: 19px;
    }


    /* summary */

    .ns-cart-summary {
        padding: 26px 22px;
    }

    .ns-cart-summary__total strong {
        font-size: 25px;
    }

}


/* =========================================================
   Small mobile
   ========================================================= */

@media (max-width: 420px) {

    .ns-cart-item {
        grid-template-columns:
            88px
            minmax(0, 1fr)
            36px;

        gap: 14px;
    }

    .ns-cart-item__image {
        width: 88px;
        height: 108px;

        padding: 11px;
        border-radius: 19px;
    }

    .ns-cart-item__quantity {
        grid-template-columns:
            38px
            42px
            38px;

        height: 44px;
    }

    .ns-cart-item__qty-btn {
        width: 38px;
        height: 42px;
    }

    .ns-cart-item__qty {
        width: 42px;
        height: 42px;
    }

}