/* Side cart styles */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

input[type='number'],
input[type="number"]:hover,
input[type="number"]:focus {
    -webkit-appearance: none;
    appearance: none;
    -moz-appearance: textfield;
}




/* layout */
.cart__wrapper {
    position: fixed;
    top: 0;
    right: -100%;
    background: #fff;
    padding: 20px;
    width: 100%;
    height: 100%;
    max-width: 500px;
    -webkit-transition: .5s;
    -o-transition: .5s;
    transition: .5s;
    z-index: 1000;
}

.cart._active .cart__wrapper {
    right: 0;
}

.cart._active .background-overlay {
    opacity: .5;
    visibility: visible;
}






/* loading */
.cart__wrapper.loading:before {
    content: "";
    position: absolute;
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--main-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    z-index: 5;
    top: calc(50% - 25px);
    left: calc(50% - 25px);
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.cart__wrapper.loading:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: .5;
}






/* cart body */
.cart__body {
    height: calc(100vh - 50px - 120px - 70px - 20px);
}

.cart-items {
    overflow-y: auto;
    height: calc(100vh - 50px - 120px - 70px - 60px - 15px);
    padding-right: 10px;
    margin: 30px 0 15px;
}

.cart-items::-webkit-scrollbar {
    width: 4px;
    background-color: #f9f9fd;
    border-radius: 2px;
}

.cart-items::-webkit-scrollbar-thumb {
    border-radius: 2px;
    background-color: var(--main-color);
}

.cart-items::-webkit-scrollbar-track {
    background-color: #ccc;
    border-radius: 2px;
}










/* cart close */
.cart__close {
    width: 30px;
    height: 30px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.cart__close:after,
.cart__close:before {
    content: "";
    position: absolute;
    height: 2.5px;
    border-radius: 2px;
    width: 30px;
    background: var(--text-color);
    -webkit-transition: .2s ease-out;
    -o-transition: .2s ease-out;
    transition: .2s ease-out;
}

.cart__close:after {
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.cart__close:before {
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

.cart__close:hover:after,
.cart__close:hover:before {
    background: var(--main-color);
}







/* cart header */
.cart__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(246, 247, 251, 0.6);
    padding: 10px;
    border-radius: 5px;
}

.cart__title {
    text-align: center;
    font-size: 22px;
    color: #000;
    font-weight: 700;
}





/* cart item */
.cart-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    padding: 16px;
    align-items: center;
    column-gap: 10px;
    position: relative;
}

.cart-item__body {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    place-content: space-between;
    row-gap: 5px;
}

.cart-item__footer{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.cart-item:last-of-type {
    margin: 0;
}





/* image */
.cart-item__image {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.cart-item__image img {
    width: 70px;
    height: 70px;
    -o-object-fit: contain;
    object-fit: contain;
}


/* title */
.cart-item__title {
    -webkit-transition: .2s ease-out;
    -o-transition: .2s ease-out;
    transition: .2s ease-out;
    display: block;
    -ms-grid-column: 1;
    -ms-grid-column-span: 2;
    grid-column: 1/3;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    color: #000;
}




/* price */
.cart-item__price {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 50%;
    flex: 0 0 50%;
}

.cart-item__del {
    width: 40px;
    height: 40px;
    border-radius: 2px;
    background: var(--white-color);
    box-shadow: 0px 0px 15px 0px rgba(18, 18, 115, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item__footer .cart-item__del{
    width: 30px;
    height: 30px;
}
.cart-item__footer .cart-item__del svg{
    width: 24px;
    height: 24px;
}
.cart-item__del path{
    transition: .2s;
}
.cart-item__del:hover path{
    stroke: var(--green-color);
}
.rtl .cart-item__del {
    right: auto;
    left: 20px;
}






/* qty */
.quantity{
    display: flex;
    column-gap: 13.5px;
    align-items: center;
}

.qty{
    background: none;
    border: none;
    max-width: 30px;
    text-align: center;
    font-size: 18px;
    line-height: 27px;
    font-weight: 600;
    cursor: none;
}

.quantity button{
    width: 30px;
    height: 30px;
    border-radius: 2px;
    background: var(--white-color);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    box-shadow: 0px 0px 15px 0px rgba(18, 18, 115, 0.10);
}

.quantity button:after,
.quantity button:before{
    content: "";
    width: 16.5px;
    height: 2px;
    border-radius: 2px;
    background: var(--text-color);
    position: absolute;
    transition: .2s;
}

.quantity button:before{
    transform: rotate(90deg);
}

.quantity .minus:before,
.quantity .minus-cart:before{
    display: none;
}

.quantity button:hover:after,
.quantity button:hover:before{
    background: var(--green-color);
}






/* total */
.cart__wrapper .cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #000;
}

.cart-subtotal__sum {
    text-align: left;
}





/* cart footer */
.cart__footer {
    margin-top: 15px;
}

.cart__action {
    display: -ms-grid;
    display: grid;
    grid-template-columns: 100%;
    gap: 20px;
    justify-content: center;
}

.cart__action .btn {
    margin: 0;
    padding: 10px 0;
    min-height: 50px;
}




/* empty cart */
.empty-cart-message {
    text-align: center;
    font-size: 18px;
    padding-top: 60px;
}







/* adaptive */
@media screen and (max-width: 1025px) {
    
}

@media screen and (max-width: 768px) {
    .cart__wrapper {
        padding: 20px 15px;
    }

    .cart-item {
        padding: 10px;
    }

    .cart-item__del {
        width: 30px;
        height: 30px;
    }
    .cart-item__del svg{
        width: 24px;
        height: 24px;
    }
    .rtl .cart-item__del {
        right: auto;
        left: 10px;
    }

    .cart-item__body {
        -ms-grid-columns: 100px 1fr;
        grid-template-columns: 100px 1fr;
    }

    .cart-item__price,
    .cart-item__quantity {
        -ms-flex-item-align: center;
        -ms-grid-row-align: center;
        align-self: center;
    }
}

@media screen and (max-width: 550px) {
    .cart-item {
        -webkit-column-gap: 10px;
        -moz-column-gap: 10px;
        column-gap: 10px;
    }

    .cart-item__body {
        -ms-grid-columns: 80px 1fr;
        grid-template-columns: 80px 1fr;
        row-gap: 5px;
    }

    .cart-item__title {
        font-size: 14px;
        line-height: 14px;
    }

    .quantity-cart .qty {
        width: 30px;
        font-size: 12px;
        line-height: 24px;
        height: 30px;
    }

    .quantity{
        column-gap: 7.5px;
    }

    .cart-item__quantity button {
        width: 30px;
        height: 30px;
    }
}

@media screen and (max-width: 400px) {
    .cart-item{
        column-gap: 5px;
        padding: 8px;
    }

    .cart-action {
        left: 40px;
    }
}