/* ---------------------------------------------------------------------------
   The cart page.

   WooCommerce's table, laid out as flex rows: picture, details, quantity
   pill, line total, bin. The totals table becomes the grey summary panel on
   the right, with the checkout button, the payment marks and the secure line
   under it. Everything is flex; nothing is a copied template.
   --------------------------------------------------------------------------- */

body.bs-cart-page .bs-container--text { max-width: none; }
body.bs-cart-page .woocommerce { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 48px; }
body.bs-cart-page .woocommerce-notices-wrapper { flex: 0 0 100%; }
body.bs-cart-page .woocommerce-notices-wrapper:empty { display: none; }
body.bs-cart-page .woocommerce-cart-form { flex: 1 1 560px; min-width: 0; }
body.bs-cart-page .cart-collaterals { flex: 0 1 420px; }
/* A flex item is as wide as its content unless told otherwise; the rail's
   content is eight cards, so without min-width: 0 it widened the page. */
body.bs-cart-page .bs-cart__recs { flex: 0 0 100%; width: 100%; min-width: 0; margin-top: 24px; }

/* ---------- Items ---------- */

body.bs-cart-page table.shop_table.cart { display: flex; flex-direction: column; margin: 0; border: 0; }
body.bs-cart-page table.shop_table.cart thead { display: none; }
body.bs-cart-page table.shop_table.cart tbody { display: flex; flex-direction: column; }
body.bs-cart-page table.shop_table.cart tr.cart_item { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px 24px; padding: 24px 0; border-bottom: 1px solid var(--bs-gray-light); }
body.bs-cart-page .woocommerce table.shop_table_responsive tr td,
body.bs-cart-page table.shop_table.cart td { display: block; min-width: 0; padding: 0; border: 0; background: none; line-height: 1.5; text-align: left; overflow-wrap: anywhere; }
body.bs-cart-page .woocommerce table.shop_table_responsive tr td::before,
body.bs-cart-page table.shop_table.cart td::before { display: none; }

body.bs-cart-page td.product-thumbnail { flex: 0 0 96px; order: 1; }
body.bs-cart-page td.product-thumbnail img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
body.bs-cart-page td.product-name { flex: 1 1 220px; order: 2; min-width: 180px; }
body.bs-cart-page td.product-name > a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--bs-black); font-size: 18px; font-weight: 600; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
body.bs-cart-page td.product-name > a:hover { text-decoration: underline; }
body.bs-cart-page .bs-cart__desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 6px 0 0; color: var(--bs-gray); font-size: 14px; }
body.bs-cart-page .bs-cart__sku { margin: 10px 0 0; color: var(--bs-black); font-size: 13px; font-weight: 600; }
body.bs-cart-page .bs-cart__sku span { color: var(--bs-gray); font-weight: 400; }
body.bs-cart-page .bs-cart__unit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 14px 0 0; }
body.bs-cart-page .bs-cart__now { font-size: 18px; font-weight: 600; }
body.bs-cart-page .bs-cart__was { color: var(--bs-gray); font-size: 14px; }
body.bs-cart-page .bs-cart__coupon { position: static; font-size: 12px; }
/* WooCommerce's responsive sheet sets every cell to block; this must outrank it. */
body.bs-cart-page .woocommerce table.shop_table_responsive tr td.product-price,
body.bs-cart-page table.shop_table.cart td.product-price { display: none; }
body.bs-cart-page td.product-quantity { flex: 0 0 140px; order: 3; }
body.bs-cart-page .woocommerce table.shop_table_responsive tr td.product-subtotal,
body.bs-cart-page td.product-subtotal { flex: 0 0 130px; order: 4; font-size: 20px; font-weight: 600; text-align: right; }
body.bs-cart-page td.product-remove { flex: 0 0 24px; order: 5; }
body.bs-cart-page td.product-remove a.remove { display: flex; width: 24px; height: 24px; color: var(--bs-black); font-size: 0; }
body.bs-cart-page td.product-remove a.remove:hover { color: var(--bs-red-discount); background: none; }

@media only screen and (min-width: 990px) {
  body.bs-cart-page td.product-thumbnail { flex-basis: 120px; }
  body.bs-cart-page table.shop_table.cart tr.cart_item { flex-wrap: nowrap; }
}

/* The reference's 236px picture needs the reference's width. */
@media only screen and (min-width: 1700px) {
  body.bs-cart-page td.product-thumbnail { flex-basis: 140px; }
  body.bs-cart-page td.product-quantity { flex-basis: 160px; }
  body.bs-cart-page td.product-subtotal { flex-basis: 150px; }
  body.bs-cart-page .cart-collaterals { flex-basis: 620px; }
}

/* The pill stepper, shared look with the product page. */
body.bs-cart-page .quantity.bs-cart__qty { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 8px; border: 1px solid var(--bs-black); border-radius: 28px; }
body.bs-cart-page .quantity.bs-cart__qty input.qty { width: 44px; height: 50px; padding: 0; border: 0; background: none; color: var(--bs-black); font-family: var(--bs-font); font-size: 18px; text-align: center; appearance: textfield; }
body.bs-cart-page .quantity.bs-cart__qty input.qty::-webkit-outer-spin-button,
body.bs-cart-page .quantity.bs-cart__qty input.qty::-webkit-inner-spin-button { appearance: none; margin: 0; }

/* Coupon and the update button (WooCommerce shows the latter only after a change). */
body.bs-cart-page table.shop_table.cart tr:not(.cart_item) { display: flex; }
body.bs-cart-page table.shop_table.cart td.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 24px 0 0; }
body.bs-cart-page td.actions .coupon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
body.bs-cart-page td.actions .coupon label { color: var(--bs-gray); font-size: 14px; }
body.bs-cart-page td.actions .coupon input.input-text { height: 44px; padding: 0 16px; border: 1px solid var(--bs-gray-light); border-radius: 22px; font: inherit; font-size: 14px; }
body.bs-cart-page td.actions .button { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border: 1px solid var(--bs-black); border-radius: 22px; background: var(--bs-white); color: var(--bs-black); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
body.bs-cart-page td.actions .button:hover { background: var(--bs-black); color: var(--bs-white); }
body.bs-cart-page td.actions .button:disabled { display: none; }

body.bs-cart-page .bs-cart__continue { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; color: var(--bs-black); font-size: 16px; text-decoration: none; }
body.bs-cart-page .bs-cart__continue:hover { text-decoration: underline; }

/* ---------- Summary ---------- */

/* WooCommerce floats the totals at 48% of the collaterals; here they are the whole panel. */
body.bs-cart-page .woocommerce .cart-collaterals .cart_totals,
body.bs-cart-page .cart_totals { float: none; width: 100%; display: flex; flex-direction: column; padding: 32px; background: var(--bs-gray-ultra-light); }
body.bs-cart-page .cart_totals h2 { margin: 0 0 20px; font-size: 24px; font-weight: 700; line-height: 1.2; }
body.bs-cart-page .cart_totals table.shop_table { display: flex; flex-direction: column; margin: 0; border: 0; }
body.bs-cart-page .cart_totals tbody { display: flex; flex-direction: column; }
body.bs-cart-page .cart_totals tr { display: flex; flex-wrap: nowrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding: 10px 0; }
body.bs-cart-page .cart_totals th, body.bs-cart-page .cart_totals td { padding: 0; border: 0; background: none; font-weight: 400; font-size: 16px; line-height: 1.5; }
body.bs-cart-page .cart_totals td::before { display: none; }
body.bs-cart-page .cart_totals th { flex: 1 1 auto; min-width: 0; color: var(--bs-black); }
body.bs-cart-page .cart_totals .shop_table_responsive tr td,
body.bs-cart-page .cart_totals td { flex: 0 1 auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
body.bs-cart-page .cart_totals tr.cart-discount td { color: var(--bs-black); }
body.bs-cart-page .cart_totals tr.cart-discount .woocommerce-Price-amount::before { content: "- "; }
body.bs-cart-page .cart_totals tr.cart-discount .woocommerce-remove-coupon { display: block; color: var(--bs-gray); font-size: 12px; }
body.bs-cart-page .cart_totals tr.shipping, body.bs-cart-page .cart_totals tr.woocommerce-shipping-totals { display: none; }
body.bs-cart-page .cart_totals tr.bs-cart__ship { flex-direction: column; align-items: stretch; gap: 4px; }
body.bs-cart-page .cart_totals tr.bs-cart__ship th, body.bs-cart-page .cart_totals tr.bs-cart__ship td { flex: 0 0 auto; width: 100%; }
body.bs-cart-page .cart_totals tr.bs-cart__ship td { color: var(--bs-gray); font-size: 14px; text-align: left; }
body.bs-cart-page .cart_totals tr.order-total { margin-top: 16px; padding-top: 24px; border-top: 1px solid var(--bs-gray-medium); }
body.bs-cart-page .cart_totals tr.order-total th { font-size: 18px; }
body.bs-cart-page .cart_totals tr.order-total td { font-size: 26px; font-weight: 700; }
body.bs-cart-page .cart_totals tr.bs-cart__vat { padding-top: 0; }
body.bs-cart-page .cart_totals tr.bs-cart__vat td { color: var(--bs-gray); font-size: 14px; }
body.bs-cart-page .cart_totals tr.tax-rate, body.bs-cart-page .cart_totals tr.tax-total { font-size: 14px; color: var(--bs-gray); }

body.bs-cart-page .wc-proceed-to-checkout { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; padding: 0; }
body.bs-cart-page .wc-proceed-to-checkout a.checkout-button { display: flex; align-items: center; justify-content: center; min-height: 56px; margin: 0; padding: 14px 24px; border-radius: 28px; background: var(--bs-black); color: var(--bs-white); font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: .06em; text-align: center; text-transform: uppercase; text-decoration: none; transition: background var(--bs-dur) var(--bs-ease); }
body.bs-cart-page .wc-proceed-to-checkout a.checkout-button:hover { background: var(--bs-black-light); }
body.bs-cart-page .wc-proceed-to-checkout .bs-product__payments { margin-top: 0; }
body.bs-cart-page .bs-cart__secure { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--bs-black); font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Empty cart ---------- */

body.bs-cart-page .cart-empty { flex: 0 0 100%; margin: 0; padding: 32px 0; border: 0; background: none; color: var(--bs-gray); font-size: 18px; }
body.bs-cart-page .cart-empty::before { display: none; }
body.bs-cart-page .return-to-shop { flex: 0 0 100%; }
body.bs-cart-page .return-to-shop .button { display: inline-flex; align-items: center; height: 48px; padding: 0 24px; border-radius: 24px; background: var(--bs-black); color: var(--bs-white); font: inherit; font-weight: 500; text-decoration: none; }
