/**
 * Custom Cart Styles
 * - Move remove button to the right
 * - Style clear cart button
 */

/* Move remove button column to the right */
.woocommerce-cart-form__contents thead tr th.product-remove {
    text-align: right;
}

.woocommerce-cart-form__contents tbody tr td.product-remove {
    text-align: right;
}

/* Reorder table columns - remove button at the end */
.woocommerce table.shop_table_responsive.cart .product-remove {
    order: 5;
}

.woocommerce table.shop_table_responsive.cart .product-name {
    order: 1;
}

.woocommerce table.shop_table_responsive.cart .product-price {
    order: 2;
}

.woocommerce table.shop_table_responsive.cart .product-quantity {
    order: 3;
}

.woocommerce table.shop_table_responsive.cart .product-subtotal {
    order: 4;
}

/* Style for remove link */
.woocommerce a.remove {
    display: inline-block;
    font-size: 24px;
    line-height: 1;
    color: #e74c3c !important;
    text-decoration: none;
    font-weight: bold;
    width: 24px;
    height: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.woocommerce a.remove:hover {
    color: #c0392b !important;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 50%;
}

/* Clear cart button styling */
.woocommerce-cart-form .actions .homefort-empty-cart {
    float: right;
    margin-left: 10px;
}

.woocommerce-cart-form .actions .homefort-empty-cart.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hide default update cart button since we have auto-update */
.woocommerce-cart-form .actions button[name="update_cart"] {
    display: none !important;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .woocommerce-cart-form__contents thead {
        display: none;
    }
    
    .woocommerce-cart-form__contents tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e0e0e0;
        padding: 10px;
    }
    
    .woocommerce-cart-form__contents td {
        display: block;
        text-align: right;
        padding: 10px 0;
        border: none;
    }
    
    .woocommerce-cart-form__contents td:before {
        content: attr(data-title) ": ";
        float: left;
        font-weight: bold;
    }
    
    .woocommerce-cart-form__contents td.product-remove {
        text-align: right;
        border-top: 1px solid #e0e0e0;
        padding-top: 10px;
        margin-top: 10px;
    }
    
    .woocommerce-cart-form__contents td.product-remove:before {
        content: "";
    }
    
    .woocommerce-cart-form .actions .homefort-empty-cart {
        float: none;
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}
