/* cart.css — Modern WooCommerce Cart Styling */

/* The Container matches your Header width (1180px) */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px; /* Prevents touching edges on mobile */
    width: 100%;
    box-sizing: border-box;
}

/* =========================================
   1. LAYOUT GRID (Left: Items, Right: Totals)
   ========================================= */
.woocommerce-cart .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    align-items: flex-start;
}

/* Left Side: Product Table */
.woocommerce-cart .woocommerce-cart-form {
    flex: 1; /* Takes up remaining space */
    min-width: 60%;
}

/* Right Side: Cart Totals */
.woocommerce-cart .cart-collaterals {
    width: 35%;
    flex-shrink: 0;
}

/* =========================================
   2. CART TABLE STYLING
   ========================================= */
.shop_table.cart {
    border: none !important;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px; /* Spacing between rows */
}

/* Hide default borders */
.shop_table.cart th, 
.shop_table.cart td {
    border: none !important;
}

/* Header Row */
.shop_table.cart thead th {
    font-size: 14px;
    text-transform: uppercase;
    color: #777;
    font-weight: 700;
    padding-bottom: 10px;
}

/* Product Row (The White Box) */
.shop_table.cart tr.cart_item {
    background: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    border-radius: 12px;
}

.shop_table.cart td {
    padding: 20px;
    vertical-align: middle;
}

/* Rounded corners for the row items */
.shop_table.cart td:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.shop_table.cart td:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }

/* Product Image */
.shop_table.cart img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Product Name */
.shop_table.cart .product-name a {
    font-weight: 700;
    color: #071124;
    text-decoration: none;
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
}

/* Remove Item Link (Fixing the ugly teal box) */
.shop_table.cart a.remove {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #ffebee !important; /* Light Red */
    color: #ff6b6b !important;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s;
}
.shop_table.cart a.remove:hover {
    background: #ff6b6b !important;
    color: #fff !important;
}

/* Quantity Input Styling */
.shop_table.cart .quantity input {
    width: 50px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

/* =========================================
   3. CART TOTALS BOX (Right Side)
   ========================================= */
.cart_totals {
    background: #f8fafc; /* Light Grey/Blue bg */
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #eef2f6;
}

.cart_totals h2 {
    font-family: Georgia, serif;
    font-size: 24px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    color: #071124;
}

.cart_totals table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.cart_totals table th, 
.cart_totals table td {
    padding: 15px 0;
    border-bottom: 1px solid #e5e5e5;
    text-align: right;
}

.cart_totals table th {
    text-align: left;
    font-weight: 600;
    color: #555;
}

.cart_totals .order-total th, 
.cart_totals .order-total td {
    font-size: 20px;
    font-weight: 700;
    color: #071124;
    border-bottom: none;
    padding-top: 20px;
}

/* "Proceed to Checkout" Button */
.wc-proceed-to-checkout a.checkout-button {
    background-color: #008f8f !important; /* Brand Teal */
    color: #fff !important;
    display: block;
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wc-proceed-to-checkout a.checkout-button:hover {
    background-color: #006666 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 143, 143, 0.3);
}

/* =========================================
   4. RESPONSIVE (Mobile)
   ========================================= */
@media (max-width: 900px) {
    .woocommerce-cart .woocommerce {
        flex-direction: column;
    }
    
    .woocommerce-cart .woocommerce-cart-form,
    .woocommerce-cart .cart-collaterals {
        width: 100%;
        min-width: 100%;
    }
    
    /* Hide product thumbnails on very small screens if needed */
    .shop_table.cart img {
        width: 60px;
        height: 60px;
    }
}