* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Mono', monospace;
    background: #fff;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 80px auto;
    background: #fff;
    padding: 30px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.header a {
    color: #000;
    text-decoration: underline;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.empty-cart {
    text-align: center;
    padding: 40px 0;
    font-size: 1.2rem;
}

.error-msg {
    color: #d9534f;
    font-weight: bold;
    margin-bottom: 15px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.cart-table th,
.cart-table td {
    border: 1px solid #000;
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}

.cart-table th {
    background: #f1f1f1;
    font-weight: 500;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #000;
}

.cart-item-name {
    font-weight: bold;
}

.cart-item-price {
    font-weight: bold;
}

.cart-item-qty input {
    width: 60px;
    padding: 4px;
    font-family: 'DM Mono', monospace;
    border: 1px solid #000;
    background: #fff;
    text-align: center;
}

.btn {
    background: #000;
    color: #fff;
    padding: 6px 12px;
    border: none;
    cursor: pointer;
    font-family: 'DM Mono', monospace;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn:hover {
    background: #333;
}

.btn-remove {
    background: #fff;
    color: #000;
    border: 1px solid #000;
}

.btn-remove:hover {
    background: #000;
    color: #fff;
}

.cart-summary {
    border-top: 1px solid #000;
    padding-top: 15px;
    text-align: right;
}

.cart-summary p {
    margin: 5px 0;
}

.cart-summary .total {
    font-size: 1.4rem;
    font-weight: bold;
}

.checkout-btn {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 12px 30px;
    border: none;
    cursor: pointer;
    font-family: 'DM Mono', monospace;
    font-size: 1.2rem;
    margin-top: 10px;
    text-decoration: none;
    transition: background 0.2s;
}

.checkout-btn:hover {
    background: #333;
}

.actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Mobile card layout */
@media (max-width: 700px) {
    .container {
        padding: 15px;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        border: 1px solid #000;
        margin-bottom: 15px;
        padding: 10px;
        position: relative;
    }

    .cart-table td {
        border: none;
        padding: 6px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #eee;
    }

    .cart-table td:last-child {
        border-bottom: none;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: bold;
        width: 40%;
        flex-shrink: 0;
    }

    .cart-item-image {
        width: 50px;
        height: 50px;
    }

    .cart-item-qty input {
        width: 50px;
    }

    .cart-item-qty {
        flex-wrap: wrap;
        gap: 5px;
    }

    .cart-item-qty form {
        display: flex;
        align-items: center;
        gap: 5px;
        flex-wrap: wrap;
    }

    .cart-item-qty .btn {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    .cart-table td:last-child .btn-remove {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    .cart-summary {
        text-align: left;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.cart-header {
    width: 100%;
    height: 70px;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #000;
    z-index: 1000;
    padding-left: 20px;
    padding-right: 20px;
    border-bottom: 1px solid #f5f5f5;
}

.cart-header a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.cart-header a span {
    text-transform: capitalize;
}