/* Cart Template Overrides */

#cart-section {
    /* Main container styling, spacing is handled by pt-100 pb-100 */
    min-height: 600px;
}

#cart-section .woocommerce {
    margin: 0 auto;
    width: 100%;
}

/* --- EMPTY CART STYLES --- */
#cart-section .woocommerce-info, 
#cart-section .cart-empty {
    background-color: var(--color-white);
    border-top: 3px solid var(--color-accent);
    color: var(--color-text);
    font-family: var(--font-common);
    border-radius: 4px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

#cart-section .woocommerce-info::before {
    color: var(--color-accent);
}

#cart-section .return-to-shop {
    margin-top: 20px;
    display: flex;
    align-items: start;
}

#cart-section .woocommerce-cart-form{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-gray-light);
}


/* --- ACTIVE CART TABLE --- */
#cart-section .woocommerce-cart-form__contents {
    width: 100%;
    border-collapse: collapse;
    border: none;
}
#cart-section .woocommerce-cart-form__contents thead{
    background-color: var(--color-green-cream-light);
}
#cart-section .woocommerce-cart-form__contents th {
    font-family: var(--font-serif);
    color: var(--color-text);
    font-size: var(--text-regular);
    border-bottom: 1px solid var(--color-gray-light);
    text-transform: uppercase;
    text-align: left;
}

#cart-section .woocommerce-cart-form__contents td {
    vertical-align: middle;
    border-bottom: 1px solid var(--color-gray-light);
    color: var(--color-black-light);
    border-top: none; /* override Woo default */
}

#cart-section .product-thumbnail img {
    width: 60px;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
    aspect-ratio: 4 / 5;
}

#cart-section .product-name a {
    color: var(--color-text);
    font-weight: 500;
    font-size: var(--text-regular);
    text-decoration: none;
    transition: color 0.3s ease;
}
#cart-section .product-name a:hover {
    color: var(--color-accent);
}

#cart-section .product-remove a.remove {
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s;
    width: 21px;
    height: 21px;
    margin-top: -9px;
    line-height: 1;
}

#cart-section .quantity .qty {
    width: 60px;
    padding: 8px;
    border: 1px solid var(--color-gray-light);
    border-radius: 4px;
    text-align: center;
    font-family: var(--font-common);
    color: var(--color-text);
    background: transparent;
}

#cart-section .product-price,
#cart-section .product-subtotal {
    font-weight: 500;
    color: var(--color-accent);
}

/* Coupon & Actions */
#cart-section .actions {
    padding: 20px;
}
#cart-section .actions .button[name="update_cart"]{
    margin-left: auto;
}

#cart-section .coupon {
    display: flex;
    align-items: center;
    gap: 10px;
    float: left;
}

#cart-section .coupon .input-text {
    padding: 10px 15px;
    border: 1px solid var(--color-gray-light);
    border-radius: 4px;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-common);
    outline: none;
    min-width: 200px;
    height: 50px;
}
#cart-section .coupon .input-text:focus {
    border-color: var(--color-accent);
}




/* Cart Collaterals (Totals) */
#cart-section .cart-collaterals {
    display: flex;
    justify-content: flex-end;
    margin-top: 40px;
}


#cart-section .cart_totals{
    width: 100%;
    max-width: 400px;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-gray-light);
}
#cart-section .cart_totals table{
    border: unset;
}
#cart-section .cart_totals h2 {
    font-family: var(--font-common);
    font-size: var(--text-h3);
    color: var(--color-gray);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-gray-light);
    padding-bottom: 10px;
}

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

#cart-section .cart_totals th,
#cart-section .cart_totals td {
    padding: 15px 0;
    border-bottom: 1px solid var(--color-gray-light);
    color: var(--color-black-light);
}
#cart-section .cart_totals th {
    text-align: left;
    font-weight: 500;
}
#cart-section .cart_totals td {
    text-align: right;
}

#cart-section .cart_totals .order-total th,
#cart-section .cart_totals .order-total td {
    font-weight: bold;
    font-size: var(--text-regular);
    color: var(--color-text);
    border-bottom: none;
}
#cart-section .wc-proceed-to-checkout{
    padding: 0;
}
#cart-section .checkout-button {
    display: block;
    width: 100%;
    margin-top: 0;
    margin-bottom: 10px;
}

/* Responsive */
@media screen and (max-width: 768px) {

    #cart-section .woocommerce-cart-form__contents thead {
        display: none;
    }
    
    #cart-section .woocommerce-cart-form__contents tr.cart_item {
        display: block;
        margin-bottom: 20px;
        border: 1px solid var(--color-gray-light);
        border-radius: 8px;
        padding: 10px;
    }
    
    #cart-section .woocommerce-cart-form__contents td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 10px;
        font-size: var(--text-small);
    }
    #cart-section .product-name a{
        font-size: var(--text-small);
    }
    
    
    #cart-section .woocommerce-cart-form__contents td::before {
        content: attr(data-title);
        font-weight: bold;
        color: var(--color-gray-text);
        text-transform: uppercase;
        font-size: var(--text-small);
    }
    
    #cart-section .product-remove,
    #cart-section .product-thumbnail {
        justify-content: center;
        border-bottom: 1px solid var(--color-gray-light);
    }
    
    #cart-section .product-remove::before,
    #cart-section .product-thumbnail::before {
        display: none;
    }

    #cart-section .actions {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    #cart-section .coupon {
        width: 100%;
        flex-direction: column;
        float: none;
    }
    #cart-section .coupon .input-text,
    #cart-section .coupon .button {
        width: 100%;
    }
    #cart-section button[name="update_cart"] {
        width: 100%;
    }

    
}
