body.cart-open{overflow:hidden}
body:not(.cart-open) .cart-form{display:none}

.cart-form{padding-bottom:20px}
.cart-controls{padding:10px 0;cursor:pointer}

body:not(.cart-open) .cart-controls .cart-hide{display:none}
.cart-open .cart-controls .cart-open{display:none}

.cart{
    position:fixed;
    right:0;
    bottom:0;
    left:0;
    overflow:auto;
    background:#fff;
    box-shadow:0 -5px 20px -10px #000;
    z-index:9999;
}

.cart-open .cart{height:70vh}

.cart [data-th="Product"]{width:auto}
.cart td:not([data-th="Product"]){white-space:nowrap}

.cart .table-condensed>thead>tr>th,
.cart .table-condensed>tbody>tr>td{padding:7px 15px}

.cart .table-condensed>tbody>tr>td{padding-top:9px;padding-bottom:9px}

.cart th:first-child,
.cart td:first-child{padding-left:0}

td.align-middle{vertical-align:middle!important}
.table-cart td.align-middle,
.table-cart th{vertical-align:middle!important}

.cart-options{
    margin-bottom:20px;
    padding:5px 15px;
    border-radius:5px;
}

.cart-options .column{padding:3px 15px}
.cart-options .column+.column{border-left:1px solid #fff}

.cart-total{line-height:34px}

.cart-options .checkbox{
    display:flex!important;
    align-items:center!important;
    gap:12px!important;
    margin:0!important;
}

.cart-options .checkbox input[type="checkbox"]{
    position:static!important;
    margin:0!important;
    flex:0 0 16px!important;
    width:16px!important;
    height:16px!important;
    transform:translateY(2px)!important;
}

.cart-options .checkbox label{
    padding:0!important;
    margin:0!important;
    line-height:1.25!important;
    display:block!important;
    font-weight:400;
}

.table-cart th:nth-child(6){width:96px;white-space:nowrap}
.table-cart td[data-th="Quantity"]{width:96px}
.table-cart td[data-th="Quantity"] input{min-width:78px;text-align:center}

.cart-btn{
    text-decoration:none!important;
    -webkit-tap-highlight-color:transparent;
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.cart-btn:hover,
.cart-btn:focus,
.cart-btn:active,
.cart-btn:visited{text-decoration:none!important;outline:none!important}

.cart-btn i{
    color:#d9534f;
    transition:transform .18s ease,color .18s ease,filter .18s ease;
}

.cart-btn.is-added i{color:#2e7d32}

@keyframes cartFlash{
    0%{transform:scale(1) rotate(0deg)}
    20%{transform:scale(1.25) rotate(-10deg)}
    45%{transform:scale(1.15) rotate(8deg)}
    70%{transform:scale(1.22) rotate(-6deg)}
    100%{transform:scale(1) rotate(0deg)}
}

@keyframes cartRing{
    0%{opacity:.9;transform:scale(.75)}
    100%{opacity:0;transform:scale(1.35)}
}

.cart-btn.is-flash:after{
    content:"";
    position:absolute;
    inset:-6px;
    border-radius:999px;
    border:2px solid rgba(46,125,50,.55);
    opacity:0;
    transform:scale(.8);
    animation:cartRing .45s ease-out;
}

.cart-btn.is-flash i{
    animation:cartFlash .45s ease-in-out;
    filter:drop-shadow(0 0 6px rgba(46,125,50,.45));
}

@media (min-width:768px){
    .cart .table-cart{table-layout:auto;width:100%}

    .cart th:nth-child(1),.cart td[data-th="Id"],
    .cart th:nth-child(2),.cart td[data-th="Product"],
    .cart th:nth-child(3),.cart td[data-th="Color"],
    .cart th:nth-child(4),.cart td[data-th="Params"]{text-align:left!important}

    .cart td[data-th="Id"],.cart th:nth-child(1){width:130px}
    .cart td[data-th="Product"],.cart th:nth-child(2){width:260px}
    .cart th:nth-child(2){white-space:nowrap!important}
    .cart td[data-th="Color"],.cart th:nth-child(3){width:110px}

    .cart td[data-th="Params"],.cart th:nth-child(4){
        width:100%;
        text-align:left!important;
        white-space:nowrap;
    }

    .cart td.actions,.cart th:last-child{width:56px}

    .cart .table-cart th:nth-child(2),
    .cart .table-cart td[data-th="Product"],
    .cart .table-cart th:nth-child(3),
    .cart .table-cart td[data-th="Color"],
    .cart .table-cart th:nth-child(4),
    .cart .table-cart td[data-th="Params"]{
        padding-left:22px!important;
        padding-right:22px!important;
    }

    .cart .table-cart th:nth-child(5),
    .cart .table-cart td[data-th="Price"],
    .cart .table-cart th:nth-child(6),
    .cart .table-cart td[data-th="Quantity"]{text-align:left!important}

    .cart .table-cart td[data-th="Quantity"]{justify-content:flex-start}
    .cart .table-cart td[data-th="Quantity"] input{
        display:inline-block;
        margin-left:0!important;
        margin-right:0!important;
        text-align:center;
    }
}

body.mobile .cart-controls{cursor:pointer}
body.mobile.cart-open{position:relative}
body.mobile.cart-open .cart{height:auto;top:0}

body.mobile .table-cart{display:block;overflow:hidden}
body.mobile .table-cart tbody{display:block}
body.mobile .table-cart tr{display:flex;flex-direction:column;border-top:1px solid #ddd}
body.mobile .table-cart td{display:flex;padding-left:100px;border:none!important}
body.mobile .table-cart tbody td:before{width:120px;flex-shrink:0;font-weight:bold}
body.mobile .table-cart tbody td:last-child{order:-1;justify-content:flex-end;position:relative;padding:0;height:0}
body.mobile .table-cart tbody td:last-child button{height:30px}

.table-cart td[data-th="Product"] .cw-brand{font-weight:700;font-size:16px;line-height:1.15}
.table-cart td[data-th="Product"] .cw-model{font-weight:400;font-size:14px;line-height:1.15}

@media (max-width:767px){
    a.cart-btn{
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        width:48px!important;
        height:48px!important;
        padding:0!important;
        margin:-12px!important;
        border-radius:999px!important;
        -webkit-tap-highlight-color:transparent;
        touch-action:manipulation;
    }
    a.cart-btn i{font-size:inherit!important;line-height:1!important}
}
