.container{
    min-height: 60vh;
    height: auto;
}

.cart-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    margin: 20px;
}

h1 {
    margin: 30px 40px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    table-layout: auto;
}

.cart-table thead {
    background: white;
    font-weight: 700;
    color: #333;
}

.cart-table th,
.cart-table td {
    padding: 16px 18px;
    border-bottom: 1px solid white;
    vertical-align: middle;
}

.cart-table thead th {
    text-align: left;
}

.product-col {
    display: flex;
    align-items: center;
    gap: 14px;
}

.remove-col {
    text-align: center;
    width: 88px;
    min-width: 70px;
    white-space: nowrap;
}

.cart-table th.remove-col,
.cart-table td.remove-col {
    width: 88px;
    text-align: center;
}

.remove-col .remove-link {
    background: transparent;
    border: 1px solid white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: red;
    border: 1px solid black;
}

.product-col .item-thumb img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
}

.product-col .item-info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.product-col h4 {
    margin: 0 0 4px 0;
    font-size: 17px;
    color: black;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
}

.product-col .variant {
    font-size: 13px;
    color: gray;
    margin-top: 6px;
}

.product-col .remove-link {
    border: none;
    cursor: pointer;
    margin-top: 8px;
    font-size: 13px;
}

.price-col {
    color: black;
    font-weight: 700;
    text-align: left;
}

.cart-table th.price-col,
.cart-table td.price-col {
    min-width: 120px;
    width: 120px;
    white-space: nowrap;
    text-align: center;
}

.cart-table th.qty-col,
.cart-table td.qty-col {
    min-width: 110px;
    width: 110px;
    text-align: center;
    white-space: nowrap;
}

.cart-table th.total-col,
.cart-table td.total-col {
    min-width: 140px;
    width: 140px;
    white-space: nowrap;
    text-align: center;
}

.qty-col .qty-control {
    display: inline-flex;
    align-items: center;
    background: transparent;
    border-radius: 8px;
}

.qty-control .qty-btn {
    background: rgb(179, 226, 131);
    padding: 5px 10px;
    text-decoration: none;
    color: black;
    border-radius: 4px;
    font-weight: bold;
}

.qty-control .qty-btn:hover {
    background: rgb(158, 206, 110);
}

.qty-control input {
    width: 40px;
    text-align: center;
    padding: 8px;
    border: 1px solid white;
    border-radius: 6px;
    margin: 0 8px;
}

.total-col {
    font-weight: bold;
    color: black;
    text-align: center;
}

.cart-table thead th {
    background: white;
    font-weight: 700;
    color: #333;
}

.cart-summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid black;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: fit-content;
    align-self: start;
    position: sticky;
    top: 20px;

}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed white;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 18px;
    font-weight: 700;
    font-size: 18px;
}

.checkout-btn {
    background: rgb(179, 226, 131);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    width: fit-content;
    margin-top: 20px;
    align-self: center;
}

.checkout-btn:hover{
    background: rgb(125, 180, 70);
}

@media (max-width:980px) {
    .cart-container {
        grid-template-columns: 1fr
    }

    .cart-table {
        display: block;
        overflow-x: auto;
    }

    .cart-table th,
    .cart-table td {
        white-space: normal;
    }

    .product-col .item-thumb img {
        width: 72px;
        height: 72px;
    }

    .cart-table th.price-col,
    .cart-table td.price-col,
    .cart-table th.qty-col,
    .cart-table td.qty-col,
    .cart-table th.total-col,
    .cart-table td.total-col,
    .cart-table th.remove-col,
    .cart-table td.remove-col {
        min-width: initial;
        width: auto;
    }

    .checkout-btn {
        width: 100%;
        margin-left: 0
    }
}