/* =========================================================
   TopiaryTree — Cart + Checkout (cart.css)
   Loaded on is_cart() / is_checkout(). Editorial styling and a
   reliable stacked cart layout (parent's flex wrapper squeezed the
   table and overlapped the totals box).
   ========================================================= */

.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce{font-family:var(--tt-sans);color:var(--tt-ink);}

/* Cart/checkout need width: lift the 770px page-content measure (theme.css). */
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content{max-width:1140px !important;margin:0 auto !important;}
.woocommerce-cart .entry-content > .woocommerce,
.woocommerce-checkout .entry-content > .woocommerce{max-width:100% !important;width:100% !important;}

/* ---------------- CART: unstack the broken side-by-side ---------------- */
.woocommerce-cart .woocommerce-cart-wrapper{display:block !important;width:100% !important;max-width:100% !important;}
.woocommerce-cart .woocommerce-cart-form{width:100% !important;max-width:100% !important;flex:none !important;float:none !important;margin:0 0 44px !important;}
.woocommerce-cart .cart-collaterals{width:100% !important;max-width:100% !important;flex:none !important;float:none !important;display:block !important;}
.woocommerce-cart .cart-collaterals .cross-sells{width:100% !important;margin-bottom:40px;}
.woocommerce-cart .cart_totals{width:100% !important;max-width:440px !important;margin-left:auto !important;float:none !important;}

/* ---------------- CART TABLE (clean, airy — no shaded cells) ---------------- */
.woocommerce-cart table.shop_table{border:0 !important;border-collapse:collapse !important;
  width:100% !important;font-family:var(--tt-sans);background:transparent !important;}
.woocommerce-cart table.shop_table thead th{background:transparent !important;font-family:var(--tt-sans);
  font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;font-weight:600;color:var(--tt-ink);
  padding:0 16px 16px;border:0;border-bottom:1px solid var(--tt-line);text-align:left;}
.woocommerce-cart table.shop_table td{padding:22px 16px;border:0;border-bottom:1px solid var(--tt-line);
  vertical-align:middle;background:transparent !important;}
.woocommerce-cart table.shop_table td.product-thumbnail img,
.woocommerce-cart table.shop_table td.product-thumbnail a{width:78px;height:78px;display:block;}
.woocommerce-cart table.shop_table td.product-thumbnail img{object-fit:cover;border-radius:4px;}
.woocommerce-cart table.shop_table td.product-name a{font-family:var(--tt-sans);font-weight:500;
  font-size:.98rem;color:var(--tt-ink) !important;text-decoration:none;line-height:1.4;}
.woocommerce-cart table.shop_table td.product-name a:hover{color:var(--tt-green-700) !important;}
.woocommerce-cart table.shop_table td.product-price,
.woocommerce-cart table.shop_table td.product-subtotal{font-size:.96rem;color:var(--tt-ink);font-weight:500;}

/* Quantity stepper */
.woocommerce-cart .quantity input.qty,
.woocommerce .quantity input.qty{border:1px solid var(--tt-line) !important;border-radius:3px;height:44px;width:64px;
  font-family:var(--tt-sans);text-align:center;color:var(--tt-ink);background:#fff;}

/* Remove — keep the theme's single icon (::before), hide the duplicate × text */
.woocommerce-cart table.shop_table td.product-remove a.remove{
  font-size:0 !important;background:none !important;border:0 !important;width:auto;height:auto;line-height:1;}
.woocommerce-cart table.shop_table td.product-remove a.remove::before{
  font-size:20px !important;color:var(--tt-muted) !important;}
.woocommerce-cart table.shop_table td.product-remove a.remove:hover::before{color:var(--tt-green-900) !important;}

/* Coupon + actions row */
.woocommerce-cart .cart .actions{padding:20px 0 0;}
.woocommerce-cart .cart .actions .coupon input#coupon_code{border:1px solid var(--tt-line) !important;
  border-radius:3px;height:48px;padding:0 14px;font-family:var(--tt-sans);min-width:200px;}

/* ---------------- CART TOTALS CARD (clean rows) ---------------- */
.woocommerce-cart .cart_totals{border:1px solid var(--tt-line);border-radius:6px;background:#fff;padding:28px 30px 30px;}
.woocommerce-cart .cart_totals h2{font-family:var(--tt-serif) !important;font-weight:600;font-size:1.5rem;
  color:var(--tt-ink) !important;margin:0 0 14px;}
.woocommerce-cart .cart_totals table.shop_table,
.woocommerce-cart .cart_totals table.shop_table tr{border:0 !important;width:100% !important;background:transparent !important;}
.woocommerce-cart .cart_totals table.shop_table th,
.woocommerce-cart .cart_totals table.shop_table td{background:transparent !important;border:0 !important;
  border-bottom:1px solid var(--tt-line) !important;padding:16px 0 !important;vertical-align:top;}
.woocommerce-cart .cart_totals table.shop_table th{font-family:var(--tt-sans);font-weight:500;
  color:var(--tt-muted);text-align:left;width:auto;}
.woocommerce-cart .cart_totals table.shop_table td{text-align:right;color:var(--tt-ink);font-weight:600;}
.woocommerce-cart .cart_totals tr.order-total th{color:var(--tt-ink);font-weight:700;font-size:1.05rem;}
.woocommerce-cart .cart_totals tr.order-total td{color:var(--tt-green-700);font-weight:700;font-size:1.2rem;}
.woocommerce-cart .cart_totals tr.order-total th,
.woocommerce-cart .cart_totals tr.order-total td{border-bottom:0 !important;}

/* ---------------- BUTTONS (cart + checkout) ---------------- */
.woocommerce-cart .wc-proceed-to-checkout{padding:20px 0 0;}
.woocommerce-cart a.checkout-button,
.woocommerce-cart .button,
.woocommerce-checkout #place_order,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt{
  font-family:var(--tt-sans) !important;font-size:.82rem !important;letter-spacing:.08em !important;
  text-transform:uppercase !important;font-weight:600 !important;background:var(--tt-green-900) !important;
  color:#fff !important;border:0 !important;border-radius:3px !important;padding:15px 28px !important;
  box-shadow:none !important;transition:background .15s ease !important;}
.woocommerce-cart a.checkout-button:hover,
.woocommerce-checkout #place_order:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover{background:var(--tt-brass) !important;}
.woocommerce-cart a.checkout-button{display:block;text-align:center;font-size:.9rem !important;padding:17px 28px !important;}
/* Secondary buttons (update cart, apply coupon) */
.woocommerce-cart button[name="update_cart"],
.woocommerce-cart .coupon button.button{background:transparent !important;color:var(--tt-green-900) !important;
  border:1px solid var(--tt-green-900) !important;}
.woocommerce-cart button[name="update_cart"]:hover,
.woocommerce-cart .coupon button.button:hover{background:var(--tt-green-900) !important;color:#fff !important;}

/* ---------------- CHECKOUT ---------------- */
.woocommerce-checkout h3,
.woocommerce-checkout #order_review_heading{font-family:var(--tt-serif) !important;font-weight:600 !important;
  font-size:1.4rem !important;color:var(--tt-ink) !important;margin-bottom:18px !important;}
.woocommerce-checkout .form-row label{font-family:var(--tt-sans);font-size:.84rem;font-weight:500;color:var(--tt-green-700);}
.woocommerce-checkout .input-text,
.woocommerce-checkout input[type=text],
.woocommerce-checkout input[type=email],
.woocommerce-checkout input[type=tel],
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.woocommerce-checkout .select2-selection{
  border:1px solid var(--tt-line) !important;border-radius:3px !important;background:#fff !important;
  font-family:var(--tt-sans) !important;color:var(--tt-ink) !important;min-height:48px !important;padding:11px 14px !important;box-shadow:none !important;}
.woocommerce-checkout .input-text:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout select:focus{border-color:var(--tt-brass) !important;outline:none !important;
  box-shadow:0 0 0 3px rgba(169,133,79,.14) !important;}

/* Order review — the theme already wraps this in `.order-review-inner`
   (border + padding); don't add a second box around it. */
.woocommerce-checkout #order_review{background:transparent !important;border:0 !important;border-radius:0 !important;padding:0 !important;}
.woocommerce-checkout #order_review table.shop_table,
.woocommerce-checkout #order_review table.shop_table th,
.woocommerce-checkout #order_review table.shop_table td,
.woocommerce-checkout #order_review table.shop_table tr{background:transparent !important;border:0 !important;}
.woocommerce-checkout #order_review table.shop_table th,
.woocommerce-checkout #order_review table.shop_table td{padding:14px 0 !important;border-bottom:1px solid var(--tt-line) !important;
  font-family:var(--tt-sans);vertical-align:top;}
.woocommerce-checkout #order_review table.shop_table thead th{font-size:.7rem;letter-spacing:.12em;
  text-transform:uppercase;font-weight:600;color:var(--tt-ink);}
.woocommerce-checkout #order_review table.shop_table td{text-align:right;color:var(--tt-ink);}
.woocommerce-checkout #order_review table.shop_table td.product-name,
.woocommerce-checkout #order_review table.shop_table th.product-name{text-align:left;color:var(--tt-ink);font-weight:500;}
.woocommerce-checkout #order_review tr.order-total th{font-weight:700;color:var(--tt-ink);font-size:1.05rem;border-bottom:0 !important;}
.woocommerce-checkout #order_review tr.order-total td{color:var(--tt-green-700);font-weight:700;font-size:1.2rem;border-bottom:0 !important;}
.woocommerce-checkout #payment{background:var(--tt-bg) !important;border-radius:5px;}
.woocommerce-checkout #payment ul.payment_methods{border-bottom:1px solid var(--tt-line);}

/* Empty cart message */
.woocommerce-cart .cart-empty,
.cart-empty.woocommerce-info{font-family:var(--tt-serif);font-size:1.2rem;color:var(--tt-muted);
  background:var(--tt-bg-alt) !important;border:0 !important;border-radius:6px;padding:28px;}
.woocommerce-cart .return-to-shop a.button{background:var(--tt-green-900) !important;color:#fff !important;}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width:600px){
  .woocommerce-cart .cart_totals{max-width:100% !important;}
  .woocommerce-cart table.shop_table td{padding:14px 12px;}
}
