/* ---- Cart Container ---- */
.cart-container {
    max-width: 600px;                 /* Limit cart width for readability */
    margin: 40px auto;                /* Center horizontally, add vertical space */
    background: #fff;                 /* White background */
    border-radius: 12px;              /* Rounded corners */
    box-shadow: 0 2px 8px rgba(0,0,0,0.07); /* Soft shadow for depth */
    padding: 32px 24px;               /* Space inside the container */
    font-family: 'Segoe UI', Arial, sans-serif; /* Clean, modern font */
}

/* ---- Cart Title ---- */
.cart-container h2 {
    font-size: 1.7rem;
    margin-bottom: 24px;
    color: #222;
    text-align: left;
    border-bottom: 2px solid #e0e0e0; /* Subtle underline */
    padding-bottom: 8px;
}

/* ---- Cart Table Layout ---- */
.cart-table {
    width: 100%;
    margin-bottom: 24px;
}

/* Header and row layout using flexbox */
.cart-header, .cart-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
}

/* Header styling */
.cart-header {
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
}

/* Row styling */
.cart-row {
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
}

/* ---- Cart Columns ---- */
.cart-col {
    flex: 1;                  /* Each column takes equal space */
    text-align: left;
    padding: 0 8px;
}

/* Center and size for quantity, price, subtotal columns */
.cart-col.qty, .cart-col.price, .cart-col.subtotal {
    text-align: center;
    min-width: 80px;
}
/* Promo Center and size for type, discounts columns */
.cart-col.type, .cart-col.dis {
    text-align: center;
    min-width: 80px;
}
/* ---- Cart Summary ---- */
.cart-summary {
    margin-top: 16px;
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
}

/* Summary row layout */
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #444;
}

/* Highlight total row */
.cart-summary-row.total {
    font-weight: bold;
    font-size: 1.2rem;
    color: #1a8917;           /* Green for emphasis */
    margin-top: 12px;
}

#cart-discount {
    color: red;
}

/* ---- Remove Button ---- */
.remove-btn {
    background: none;
    border: none;
    color: #d32f2f;           /* Red for delete */
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    margin-left: 12px;
    transition: color 0.2s;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    line-height: 28px;
    text-align: center;
    outline: none;
}
.remove-btn:hover {
    background: #ffeaea;       /* Light red on hover */
    color: #b71c1c;
}

/* Fixed width for remove column */
.cart-col.remove {
    flex: 0 0 40px;
    text-align: center;
    padding: 0;
}

/* ---- Quantity Buttons ---- */
.qty-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    color: #333;
    font-size: 1.1rem;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    margin: 0 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    vertical-align: middle;
}
.qty-btn:hover {
    background: #e0e0e0;
    color: #1a8917;
}

/* Quantity display styling */
.qty-display {
    min-width: 24px;
    display: inline-block;
    text-align: center;
    font-weight: bold;
}

/* ---- Tip Section ---- */
.tip-section {
    margin-top: 24px;
    padding: 16px 0 0 0;
    border-top: 1px solid #e0e0e0;
}
.tip-section h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #333;
}
.tip-options {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.tip-btn {
    background: #f0f0f0;
    border: 1px solid #bbb;
    color: #333;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, border 0.2s;
}
.tip-btn.selected,
.tip-btn:hover {
    background: #1a8917;
    color: #fff;
    border-color: #1a8917;
}
.tip-custom {
    margin-top: 6px;
}
.tip-custom input[type="number"] {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 1rem;
}

/* ---- Cart Actions (e.g., Checkout Button) ---- */
.cart-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}
#payment-btn {
    background: #1a8917;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
#payment-btn:hover {
    background: #166d13;
}

/* ---- Responsive Design ---- */
@media (max-width: 700px) {
    .cart-container {
        padding: 18px 6px;
    }
    .cart-header, .cart-row {
        font-size: 0.95rem;
        padding: 7px 0;
    }
    .cart-col.qty, .cart-col.price, .cart-col.subtotal {
        min-width: 60px;
    }
}

@media (max-width: 500px) {
    .cart-header, .cart-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .cart-col {
        width: 100%;
        padding: 2px 0;
        text-align: left;
    }
    .cart-summary-row {
        font-size: 1rem;
    }
}
