.cart-page {
    width: var(--content-width);
    margin: auto;
    padding: 45px 0 75px;
}

.cart-table {
    --select-width: 5%;
    --image-width: 18%;
    --description-width: auto;
    --makes-width: 26%;
    --quantity-width: 12%;
    border: 1px solid var(--line);
    border-radius: 4px;
    width: 100%;
    table-layout: fixed;
}

.cart-table-head,.cart-row {
    vertical-align: middle;
}

.cart-table-head {
    background: var(--paper);
    font-weight: 600;
    padding: 15px 0;
}

.cart-row {
    padding: 25px 0;
    border-top: 1px solid var(--line);
}

.cart-cell {
    padding: 25px 12px;
    min-width: 0;
    text-align: left;
    overflow-wrap: anywhere;
}

.cart-table-head .cart-cell {
    padding: 15px 12px;
}

.cart-select-cell > label > span {
    display: none;
}

.cart-select-cell {
    width: var(--select-width);
    text-align: left;
}

.cart-table .cart-select-cell {
    padding-left: 24px;
}

.cart-image-cell {
    width: var(--image-width);
    text-align: center;
}

.cart-description-cell {
    width: var(--description-width);
}

.cart-makes-cell {
    width: var(--makes-width);
}

.cart-quantity-cell {
    width: var(--quantity-width);
}

.cart-image-cell img {
    max-width: 100%;
    max-height: 120px;
    width: auto;
    margin: auto;
}

.cart-image-cell a:hover img {
    opacity: 0.8;
}

.cart-table input[type=checkbox] {
    appearance: none;
    width: 18px;
    height: 18px;
    display: inline-block;
    border: 1px solid #9ba7ae;
    background: white;
    border-radius: 3px;
    vertical-align: middle;
    position: relative;
    cursor: pointer;
}

.cart-table input[type=checkbox]:checked,.cart-table input[type=checkbox]:indeterminate {
    background: var(--brand);
    border-color: var(--brand);
}

.cart-table input[type=checkbox]:checked::after {
    content: '';
    display: block;
    position: absolute;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    left: 5px;
    top: 2px;
}

.cart-table input[type=checkbox]:indeterminate::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 2px;
    background: white;
    top: 7px;
    left: 4px;
}

.cart-product-number {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.cart-product-number > span {
    color: var(--brand);
    font-size: 13px;
}

.cart-product-number:hover {
    color: var(--brand);
}

.cart-description-cell h3 {
    font-size: 15px;
    font-weight: 400;
    margin: 7px 0;
}

.cart-description-cell p {
    white-space: pre-line;
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.cart-row .cart-makes-cell {
    font-size: 12px;
    color: var(--muted);
}

.cart-quantity-label {
    font-size: 0;
}

.cart-quantity {
    width: 80px;
    max-width: 100%;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-size: 14px;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
}

.cart-actions-left {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cart-actions button {
    padding: 11px 20px;
    border: 1px solid var(--line);
    background: white;
    border-radius: 3px;
    transition: background 160ms, color 160ms, border-color 160ms;
}

.cart-actions-left button:hover,
.cart-actions-left button:focus-visible {
    background: var(--brand);
    border-color: var(--brand);
    color: white;
}

.cart-actions .cart-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: var(--brand);
    color: white;
    border-color: var(--brand);
}

.cart-actions .cart-submit:hover {
    background: var(--ink);
}

.cart-empty {
    text-align: center;
    padding: 65px 20px;
    background: var(--paper);
}

.cart-empty h2 {
    font-size: 25px;
    margin-bottom: 25px;
}

#cart-feedback {
    color: var(--danger);
    margin-top: 20px;
}

@media(max-width:900px) {
    .cart-page {
        padding: 35px 0 55px;
    }
    .cart-table {
        --makes-width: 20%;
        --quantity-width: 14%;
    }
}

@media(max-width:700px) {
    .cart-table,.cart-table thead,.cart-table tbody {
        display: block;
    }
    .cart-page {
        padding: 28px 0 45px;
    }
    .cart-table-head {
        display: block;
        padding: 0;
    }
    .cart-table-head .cart-cell:not(.cart-select-cell) {
        display: none;
    }
    .cart-table-head .cart-select-cell {
        display: block;
        width: 100%;
    }
    .cart-select-cell > label > span {
        display: inline;
        margin-left: 10px;
    }
    .cart-row {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        padding: 22px 12px 22px 24px;
        gap: 15px 0;
        position: relative;
    }
    .cart-row:first-child {
        border: 0;
    }
    .cart-row .cart-select-cell {
        flex: 0 0 8%;
        width: auto;
        padding: 0;
    }
    .cart-image-cell {
        flex: 0 0 30%;
        width: auto;
        padding: 0 10px;
    }
    .cart-description-cell {
        flex: 0 0 62%;
        width: auto;
        padding: 0 5px;
    }
    .cart-makes-cell {
        flex: 1;
        width: auto;
        padding-top: 0;
        padding-bottom: 0;
        padding-left: 8%;
    }
    .cart-quantity-cell {
        flex: 0 0 120px;
        width: auto;
        padding-top: 0;
        padding-bottom: 0;
    }
    .cart-quantity-label {
        display: flex;
        flex-direction: column;
        font-size: 12px;
        gap: 5px;
    }
    .cart-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .cart-actions-left {
        justify-content: space-between;
    }
    .cart-product-number {
        font-size: 16px;
    }
    .cart-quantity {
        width: 100%;
    }
}
