/* Modernize WooCommerce cart layout — respecting existing WooCommerce CSS */
.fl-woocommerce-cart > .woocommerce { display: flex; }
.woocommerce-cart .cart-collaterals {
  float: none;
  width: auto;
  clear: none;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 0;
}

/* Cart totals sidebar (on right) */
.woocommerce-cart .cart_totals {
  flex: 0 0 380px;
  max-width: 380px;
  margin-left: auto;
  float: none !important;
  width: 100% !important;
}
.woocommerce-cart .cart_totals h2 { display: none; }

#add_payment_method .cart-collaterals .cart_totals table th, .woocommerce-cart .cart-collaterals .cart_totals table th, .woocommerce-checkout .cart-collaterals .cart_totals table th { width: 30%; }

/* Cart items table area */
.woocommerce-cart .woocommerce-cart-form {
  flex: 1 1 0;
  min-width: 0;
}

/* Remove old float styling on cart-collaterals */
.woocommerce-cart .cart-collaterals:after {
  content: none;
  display: none;
  clear: none;
}

/* Modern card-style table rows */
.woocommerce-cart table.shop_table tbody tr {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.woocommerce-cart .cart_totals table.shop_table tbody tr { background: #f9f9f9; }

/* Remove old table borders */
.woocommerce-cart table.shop_table td,
.woocommerce-cart table.shop_table th {
  border: none;
}

/* Quantity input styling */
.woocommerce-cart table.shop_table input.qty {
  width: 60px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-align: center;
}

/* Checkout button styling */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  display: block;
  text-align: center;
  padding: 1em 0;
  border-radius: 20px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease;
}

/* Responsive — stack columns on small screens */
@media (max-width: 768px) {
  .fl-woocommerce-cart > .woocommerce, .woocommerce-cart .cart-collaterals {
    flex-direction: column;
  }

  .woocommerce-cart table.shop_table .product-remove { padding: 5px; float: right; }

  .woocommerce-cart .cart_totals {
    max-width: 100%;
    margin-left: 0;
  }
  .woocommerce ul#shipping_method { padding-left: 80px; }
}
