/* ============================================================================
   ONEEXISTS — Cart + Checkout (WooCommerce override, Phase 9)
   Style-only. Dormant during concept phase; ready for launch.
   Loaded on is_cart() / is_checkout() only.
   ============================================================================ */

/* Kill Astra sidebar + breadcrumb */
.woocommerce-cart .ast-breadcrumbs-wrapper,
.woocommerce-cart .astra-breadcrumbs,
.woocommerce-cart .entry-header,
.woocommerce-checkout .ast-breadcrumbs-wrapper,
.woocommerce-checkout .astra-breadcrumbs,
.woocommerce-checkout .entry-header { display: none !important; }

.woocommerce-cart #primary,
.woocommerce-checkout #primary {
  max-width: 100% !important;
  width: 100% !important;
  padding: 4rem 0 !important;
  background: rgb(var(--oe-bg)) !important;
  color: rgb(var(--oe-text)) !important;
}
.woocommerce-cart #secondary,
.woocommerce-checkout #secondary { display: none !important; }

/* ---------- Wrapper spacing ---------- */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
  max-width: 85rem;
  margin: 0 auto;
  padding: 0 var(--oe-gutter);
}

/* ---------- Page title ---------- */
.woocommerce-cart .entry-title,
.woocommerce-checkout .entry-title,
.woocommerce-cart h1.page-title,
.woocommerce-checkout h1.page-title,
.woocommerce-cart h1,
.woocommerce-checkout h1 {
  color: rgb(var(--oe-white)) !important;
  font-weight: 700 !important;
  font-size: var(--oe-fs-h1) !important;
  letter-spacing: var(--oe-ls-extra-tight);
  margin-bottom: 2.5rem;
}

/* ---------- Cart table ---------- */
.woocommerce-cart table.cart,
.woocommerce-cart table.shop_table,
.woocommerce-checkout table.shop_table {
  background: transparent !important;
  border: 1px solid rgb(var(--oe-hairline) / 0.15) !important;
  border-radius: 0 !important;
  width: 100% !important;
  border-collapse: collapse !important;
}
.woocommerce-cart table.cart th,
.woocommerce-cart table.shop_table th,
.woocommerce-checkout table.shop_table th {
  background: rgb(var(--oe-black)) !important;
  color: rgb(var(--oe-silver)) !important;
  font-family: var(--oe-font-mono);
  font-size: var(--oe-fs-caption);
  letter-spacing: var(--oe-ls-wide);
  text-transform: uppercase;
  font-weight: 500 !important;
  padding: 1rem !important;
  border-bottom: 1px solid rgb(var(--oe-hairline) / 0.15) !important;
}
.woocommerce-cart table.cart td,
.woocommerce-cart table.shop_table td,
.woocommerce-checkout table.shop_table td {
  color: rgb(var(--oe-white)) !important;
  border-top: 1px solid rgb(var(--oe-hairline) / 0.1) !important;
  padding: 1.25rem 1rem !important;
  background: transparent !important;
}
.woocommerce-cart .product-name a,
.woocommerce-checkout .product-name {
  color: rgb(var(--oe-white)) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}
.woocommerce-cart .product-thumbnail img {
  width: 80px !important;
  height: 80px !important;
  object-fit: cover;
  border-radius: 0;
  border: 1px solid rgb(var(--oe-hairline) / 0.2);
}
.woocommerce-cart .product-price,
.woocommerce-cart .product-subtotal,
.woocommerce-checkout .product-total,
.woocommerce-cart .product-quantity {
  color: rgb(var(--oe-white)) !important;
}
.woocommerce-cart .quantity input.qty {
  background: rgb(var(--oe-charcoal)) !important;
  color: rgb(var(--oe-white)) !important;
  border: 1px solid rgb(var(--oe-hairline) / 0.25) !important;
  width: 4rem;
  padding: 0.5rem;
  font-family: var(--oe-font-mono);
}

/* Remove item × */
.woocommerce-cart .product-remove a.remove {
  color: rgb(var(--oe-silver)) !important;
  background: transparent !important;
  font-size: 1.25rem;
}
.woocommerce-cart .product-remove a.remove:hover {
  color: rgb(var(--oe-white)) !important;
  background: transparent !important;
}

/* Coupon */
.woocommerce-cart .coupon input {
  background: rgb(var(--oe-charcoal)) !important;
  color: rgb(var(--oe-white)) !important;
  border: 1px solid rgb(var(--oe-hairline) / 0.25) !important;
  padding: 0.75rem 1rem !important;
}

/* Update cart / apply coupon buttons */
.woocommerce-cart button[name="update_cart"],
.woocommerce-cart button[name="apply_coupon"] {
  background: transparent !important;
  color: rgb(var(--oe-white)) !important;
  border: 1px solid rgb(var(--oe-white)) !important;
  padding: 0.75rem 1.5rem !important;
  font-family: var(--oe-font-body);
  font-size: var(--oe-fs-caption);
  letter-spacing: var(--oe-ls-wide);
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease;
}
.woocommerce-cart button[name="update_cart"]:hover,
.woocommerce-cart button[name="apply_coupon"]:hover {
  background: rgb(var(--oe-white)) !important;
  color: rgb(var(--oe-graphite)) !important;
}

/* Cart totals block */
.cart_totals, .cart-collaterals {
  background: rgb(var(--oe-charcoal)) !important;
  border: 1px solid rgb(var(--oe-hairline) / 0.15);
  padding: 2rem !important;
  margin-top: 2rem;
}
.cart_totals h2 {
  color: rgb(var(--oe-white)) !important;
  font-weight: 700 !important;
  font-size: var(--oe-fs-h3) !important;
  margin-bottom: 1.5rem;
}
.cart_totals table {
  border: none !important;
}
.cart_totals table td, .cart_totals table th {
  color: rgb(var(--oe-white)) !important;
  border-color: rgb(var(--oe-hairline) / 0.1) !important;
  padding: 0.75rem 0 !important;
}
.cart_totals .order-total .amount { font-weight: 700 !important; font-size: var(--oe-fs-h4); }

/* Checkout button */
.woocommerce-cart .wc-proceed-to-checkout .checkout-button,
.woocommerce-checkout #place_order {
  display: block !important;
  width: 100% !important;
  background: rgb(var(--oe-white)) !important;
  color: rgb(var(--oe-graphite)) !important;
  border: 1px solid rgb(var(--oe-white)) !important;
  padding: 1rem 2rem !important;
  font-family: var(--oe-font-body);
  font-size: var(--oe-fs-btn);
  font-weight: 600 !important;
  letter-spacing: var(--oe-ls-wide);
  text-transform: uppercase;
  transition: background .2s ease;
}
.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover,
.woocommerce-checkout #place_order:hover {
  background: rgb(var(--oe-silver)) !important;
  border-color: rgb(var(--oe-silver)) !important;
}

/* ---------- CHECKOUT layout ---------- */
.woocommerce-checkout form.checkout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 64rem) {
  .woocommerce-checkout form.checkout {
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
  }
  .woocommerce-checkout #customer_details { grid-column: 1; }
  .woocommerce-checkout .woocommerce-checkout-review-order { grid-column: 2; position: sticky; top: calc(var(--oe-header-h) + var(--oe-announcement-h) + 1rem); align-self: start; }
}

/* Checkout form labels + inputs */
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3 {
  color: rgb(var(--oe-white)) !important;
  font-weight: 700 !important;
  font-size: var(--oe-fs-h3) !important;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgb(var(--oe-hairline) / 0.15);
  margin-bottom: 1.5rem;
}
.woocommerce-checkout form .form-row label {
  color: rgb(var(--oe-silver)) !important;
  font-family: var(--oe-font-mono);
  font-size: var(--oe-fs-caption);
  letter-spacing: var(--oe-ls-wide);
  text-transform: uppercase;
  font-weight: 500 !important;
  margin-bottom: 0.4rem;
}
.woocommerce-checkout form .form-row input.input-text,
.woocommerce-checkout form .form-row textarea,
.woocommerce-checkout form .form-row select,
.woocommerce-checkout .select2-container .select2-selection--single {
  background: rgb(var(--oe-charcoal)) !important;
  color: rgb(var(--oe-white)) !important;
  border: 1px solid rgb(var(--oe-hairline) / 0.25) !important;
  padding: 0.85rem 1rem !important;
  border-radius: 0 !important;
  font-size: var(--oe-fs-body);
  min-height: auto !important;
  height: auto !important;
}
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: rgb(var(--oe-white)) !important;
  line-height: 1.4 !important;
  padding: 0 !important;
}
.woocommerce-checkout form .form-row input:focus,
.woocommerce-checkout form .form-row textarea:focus,
.woocommerce-checkout form .form-row select:focus {
  border-color: rgb(var(--oe-white)) !important;
  outline: none;
}

/* Review order box */
.woocommerce-checkout .woocommerce-checkout-review-order {
  background: rgb(var(--oe-charcoal)) !important;
  border: 1px solid rgb(var(--oe-hairline) / 0.15);
  padding: 2rem;
}
.woocommerce-checkout #order_review_heading {
  color: rgb(var(--oe-white)) !important;
  font-weight: 700 !important;
  font-size: var(--oe-fs-h3) !important;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgb(var(--oe-hairline) / 0.15);
  margin: 0 0 1.5rem !important;
}
.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table {
  border: none !important;
}
.woocommerce-checkout .payment_methods {
  background: transparent !important;
  border: none !important;
  margin: 1.5rem 0 !important;
  padding: 0 !important;
}
.woocommerce-checkout .payment_methods li {
  background: rgb(var(--oe-bg)) !important;
  border: 1px solid rgb(var(--oe-hairline) / 0.15) !important;
  padding: 1rem !important;
  margin-bottom: 0.75rem !important;
  color: rgb(var(--oe-white)) !important;
}
.woocommerce-checkout .payment_methods li label {
  color: rgb(var(--oe-white)) !important;
  font-weight: 500;
}

/* Terms + privacy */
.woocommerce-checkout .wc-terms-and-conditions,
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
  color: rgb(var(--oe-silver)) !important;
  font-size: var(--oe-fs-caption);
  margin: 1.5rem 0;
}

/* Woo notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  background: rgb(var(--oe-charcoal)) !important;
  color: rgb(var(--oe-white)) !important;
  border: 1px solid rgb(var(--oe-hairline) / 0.3) !important;
  border-left: 3px solid rgb(var(--oe-white)) !important;
  padding: 1rem 1.25rem !important;
  border-radius: 0 !important;
  margin-bottom: 1.5rem;
}
.woocommerce-message a,
.woocommerce-info a { color: rgb(var(--oe-white)) !important; text-decoration: underline; }

/* Empty-cart state */
.woocommerce-cart .cart-empty {
  color: rgb(var(--oe-white)) !important;
  font-size: var(--oe-fs-body-lg);
  text-align: center;
  padding: 4rem 1rem;
  background: transparent !important;
  border: none !important;
}
.woocommerce-cart .return-to-shop {
  text-align: center;
  padding: 2rem 0;
}
.woocommerce-cart .return-to-shop .button {
  background: rgb(var(--oe-white)) !important;
  color: rgb(var(--oe-graphite)) !important;
  padding: 0.9rem 2rem !important;
  border: 1px solid rgb(var(--oe-white)) !important;
  font-family: var(--oe-font-body);
  font-size: var(--oe-fs-btn);
  letter-spacing: var(--oe-ls-wide);
  text-transform: uppercase;
  font-weight: 600 !important;
}
