/* ==============================================================
   Avento Premium WooCommerce Styling
   ============================================================== */

/* --- Cart Page Layout (Flexbox) --- */
.woocommerce-cart .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: flex-start;
    justify-content: space-between;
}
.woocommerce-cart .woocommerce::before,
.woocommerce-cart .woocommerce::after {
    display: none !important; /* Remove WC float clears */
}

/* Cart Items Area */
.woocommerce-cart .woocommerce-cart-form {
    flex: 999 1 600px;
    width: 100%;
}

/* Cart Totals Area (ملخص الطلب) */
.woocommerce-cart .cart-collaterals {
    flex: 1 1 350px;
    max-width: 450px;
    width: 100%;
    background-color: #fcfcfc;
    padding: 40px;
    border-radius: 0;
    margin-top: 0 !important;
    border: 1px solid #eaeaea;
}

/* Responsive Cart */
@media (max-width: 992px) {
    .woocommerce-cart .woocommerce {
        flex-direction: column;
    }
    .woocommerce-cart .woocommerce-cart-form,
    .woocommerce-cart .cart-collaterals {
        flex: 1 1 100%;
    }
}

/* --- Cart Table Styling --- */
.woocommerce table.shop_table {
    border: none !important;
    border-radius: 0 !important;
    margin-bottom: 20px;
}
.woocommerce table.shop_table thead {
    display: none; /* Hide table headers for a cleaner look */
}
.woocommerce table.shop_table td {
    border: none !important;
    border-bottom: 1px solid #eee !important;
    padding: 30px 10px !important;
    vertical-align: top;
}

/* Product Image */
.woocommerce table.cart .product-thumbnail img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
}

/* Product Name & Category */
.woocommerce table.cart .product-name a {
    color: #000;
    font-weight: 800;
    font-size: 20px;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}
.woocommerce table.cart .product-name {
    padding-top: 30px !important;
}

/* Product Price */
.woocommerce table.cart .product-price {
    font-weight: 700;
    font-size: 20px;
    color: #000;
    padding-top: 30px !important;
}

/* Custom Remove Button (إزالة) */
.woocommerce table.shop_table a.remove {
    font-size: 0 !important; /* Hide original X */
    display: inline-flex;
    align-items: center;
    color: #d9534f !important;
    background: transparent !important;
    border: none;
    width: auto;
    height: auto;
    margin-top: 15px;
}
.woocommerce table.shop_table a.remove:hover {
    background: transparent !important;
    color: #c9302c !important;
}
.woocommerce table.shop_table a.remove::before {
    content: '\e872'; /* Material Symbol Trash */
    font-family: 'Material Symbols Outlined';
    font-size: 20px;
    margin-left: 5px;
}
.woocommerce table.shop_table a.remove::after {
    content: 'إزالة';
    font-size: 16px;
    font-weight: 600;
}

/* --- Cart Totals Box --- */
.woocommerce .cart-collaterals .cart_totals h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 30px;
    border-bottom: 2px solid #000;
    padding-bottom: 15px;
    color: #000;
}
.woocommerce .cart-collaterals .cart_totals table.shop_table {
    width: 100%;
}
.woocommerce .cart-collaterals .cart_totals table.shop_table th,
.woocommerce .cart-collaterals .cart_totals table.shop_table td {
    border: none !important;
    padding: 15px 0 !important;
    font-size: 16px;
    color: #333;
}
.woocommerce .cart-collaterals .cart_totals table.shop_table tr.order-total th,
.woocommerce .cart-collaterals .cart_totals table.shop_table tr.order-total td {
    font-size: 24px;
    font-weight: 800;
    color: #000;
    border-top: 1px solid #ddd !important;
    padding-top: 25px !important;
}

/* --- Global WC Buttons --- */
.woocommerce #respond input#submit, 
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button {
    background-color: #000;
    color: #fff;
    border: 1px solid #000;
    border-radius: 0;
    padding: 15px 30px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
.woocommerce #respond input#submit:hover, 
.woocommerce a.button:hover, 
.woocommerce button.button:hover, 
.woocommerce input.button:hover {
    background-color: #fff;
    color: #000;
}

/* Checkout / Primary Buttons */
.woocommerce .cart-collaterals .checkout-button,
.woocommerce-checkout #place_order {
    width: 100%;
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
    padding: 20px !important;
    white-space: normal; /* Fix squished text */
    word-break: break-word;
}

/* --- Forms & Inputs --- */
.woocommerce form .form-row input.input-text, 
.woocommerce form .form-row textarea {
    border: 1px solid #ddd;
    border-radius: 0;
    padding: 15px;
    background: #fff;
    box-shadow: none;
    font-size: 16px;
}
.woocommerce form .form-row input.input-text:focus, 
.woocommerce form .form-row textarea:focus {
    border-color: #000;
    outline: none;
}

/* Coupon Box */
.woocommerce-cart .coupon {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.woocommerce-cart .coupon input.input-text {
    flex: 1;
    margin: 0 !important;
}
.woocommerce-cart .coupon button.button {
    flex: 0 0 auto;
    border-color: #ddd;
    background: #f9f9f9;
    color: #000;
}
.woocommerce-cart .coupon button.button:hover {
    background: #eee;
}
