/* Presentation only. Keep native WooCommerce controls, tax/rate calculations,
   validation, and BOX NOW/Viva integration untouched. */
body:is(.woocommerce-cart, .woocommerce-checkout) .entry-content {
  --hcl-green: #123c2d;
  --hcl-line: #d9e6df;
  --hcl-soft: #f5f9f6;
  box-sizing: border-box;
  padding: clamp(20px, 3vw, 40px);
}

/* Storefront's alignwide offsets must not escape the padded page card. */
body:is(.woocommerce-cart, .woocommerce-checkout) .entry-content > :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0;
  float: none;
  box-sizing: border-box;
}

/* Native 65% + 35% columns overflow once a custom gap is added. */
body.woocommerce-cart .entry-content .wp-block-woocommerce-filled-cart-block,
body.woocommerce-checkout .entry-content .wp-block-woocommerce-checkout > .wc-block-components-sidebar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: start;
  gap: 32px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .entry-content .wc-block-components-sidebar-layout > :is(.wc-block-components-main, .wc-block-components-sidebar) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  float: none;
  box-sizing: border-box;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .entry-content .wc-block-components-sidebar-layout > .wc-block-components-sidebar {
  padding: 24px;
  border: 1px solid var(--hcl-line);
  border-radius: 20px;
  background: var(--hcl-soft);
  box-shadow: none;
  position: static;
  top: auto;
}

/* A compact introduction leaves the products visible sooner. */
body.woocommerce-cart .wsc-cart-intro {
  margin-bottom: 32px;
  padding: 28px 32px;
  background: var(--hcl-green);
  border-radius: 20px;
}
body.woocommerce-cart .wsc-cart-intro h1 {
  max-width: 27ch;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.12;
  letter-spacing: -.025em;
}
body.woocommerce-cart .wsc-cart-intro__facts { margin-top: 22px; padding-top: 18px; }
body.woocommerce-cart .wsc-cart-intro__facts span { font-size: 13px; line-height: 1.5; }

body:is(.woocommerce-cart, .woocommerce-checkout) .entry-content .wc-block-components-product-name {
  color: var(--hcl-green);
  font-weight: 650;
  font-size: 16px;
  line-height: 1.45;
  text-decoration: none;
  overflow-wrap: anywhere;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .entry-content a.wc-block-components-product-name:hover { text-decoration: underline; }
/* These are auto-truncated duplicate teasers; retain names and variation data. */
body:is(.woocommerce-cart, .woocommerce-checkout) .entry-content .wc-block-components-product-metadata__description { display: none; }
body:is(.woocommerce-cart, .woocommerce-checkout) .entry-content .wc-block-components-product-details { font-size: 13px; line-height: 1.6; }
body.woocommerce-cart .entry-content .wc-block-cart-items { width: 100%; margin: 0; border-collapse: separate; }
body.woocommerce-cart .entry-content .wc-block-cart-items .wc-block-cart-item__image { width: 96px; }
body.woocommerce-cart .entry-content .wc-block-cart-item__image img {
  display: block;
  width: 80px;
  max-width: 100%;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--hcl-soft);
}
body.woocommerce-cart .entry-content .wc-block-cart-item__total { white-space: nowrap; }
body.woocommerce-cart .entry-content .wc-block-cart-item__quantity { margin-top: 12px; }
body.woocommerce-cart .entry-content .wc-block-components-quantity-selector {
  min-height: 44px;
  border-radius: 10px;
  border-color: var(--hcl-line);
  background: #fff;
}

body.woocommerce-checkout .entry-header { margin-bottom: 24px; }
body.woocommerce-checkout .entry-title { font-size: clamp(30px, 4vw, 42px); }
body.woocommerce-checkout .entry-content .wc-block-components-title,
body.woocommerce-cart .entry-content .wc-block-cart__totals-title {
  color: var(--hcl-green);
  font-size: 21px;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -.015em;
  text-transform: none;
}
body.woocommerce-checkout .entry-content .wc-block-components-order-summary {
  border: 0;
  border-radius: 0;
  background: transparent;
}
body.woocommerce-checkout .entry-content .wc-block-components-order-summary-item__image img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
body.woocommerce-checkout .entry-content .wc-block-components-text-input input,
body.woocommerce-checkout .entry-content .wc-block-components-textarea,
body.woocommerce-checkout .entry-content .wc-block-components-combobox .wc-block-components-combobox-control input,
body.woocommerce-checkout .entry-content .wc-block-components-country-input select,
body.woocommerce-checkout .entry-content .wc-block-components-state-input select {
  border-color: #9cb2a6;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: none;
  font-size: 16px;
}
body.woocommerce-checkout .entry-content .wc-block-components-radio-control__option {
  border-radius: 10px;
  min-width: 0;
}
body.woocommerce-checkout .entry-content .wc-block-components-radio-control__label-group { min-width: 0; gap: 10px; }
body.woocommerce-checkout .entry-content .wc-block-components-radio-control__label { overflow-wrap: anywhere; }
body.woocommerce-checkout .entry-content .wc-block-components-radio-control__secondary-label { white-space: nowrap; }
body.woocommerce-checkout .entry-content .wc-block-components-radio-control__description { font-size: 14px; line-height: 1.6; }
body.woocommerce-checkout .entry-content .wc-block-checkout__terms { font-size: 14px; line-height: 1.65; }

/* Target our two primary CTAs, never BOX NOW's independently branded button. */
body.woocommerce-cart .entry-content .wc-block-cart__submit-button,
body.woocommerce-checkout .entry-content .wc-block-components-checkout-place-order-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 14px 20px;
  border: 1px solid var(--hcl-green);
  border-radius: 999px;
  background: var(--hcl-green);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
}
body.woocommerce-cart .entry-content .wc-block-cart__submit-button:hover,
body.woocommerce-checkout .entry-content .wc-block-components-checkout-place-order-button:hover { background: #1f5b44; border-color: #1f5b44; color: #fff; }
body.woocommerce-cart .entry-content .wc-block-cart__submit-button:focus-visible,
body.woocommerce-checkout .entry-content .wc-block-components-checkout-place-order-button:focus-visible { outline: 3px solid #509a76; outline-offset: 3px; }
body.woocommerce-checkout .entry-content .wc-block-components-checkout-place-order-button:disabled { opacity: .55; cursor: not-allowed; }
body.woocommerce-cart .entry-content .wc-block-cart__submit-container {
  display: block !important;
  position: static !important;
  width: 100%;
  padding: 0;
  background: transparent !important;
  box-shadow: none;
}
body.woocommerce-cart .entry-content .wc-block-cart__submit-container::before { display: none; }

@media (max-width: 960px) {
  body.woocommerce-cart .entry-content .wp-block-woocommerce-filled-cart-block,
  body.woocommerce-checkout .entry-content .wp-block-woocommerce-checkout > .wc-block-components-sidebar-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 600px) {
  body:is(.woocommerce-cart, .woocommerce-checkout) .entry-content { padding: 18px 14px; border-radius: 18px; }
  body:is(.woocommerce-cart, .woocommerce-checkout) .entry-content .wc-block-components-sidebar-layout > .wc-block-components-sidebar { padding: 18px 14px; border-radius: 16px; }
  body.woocommerce-cart .wsc-cart-intro { padding: 24px 20px; margin-bottom: 24px; border-radius: 16px; }
  body.woocommerce-cart .wsc-cart-intro h1 { font-size: 28px; }
  body.woocommerce-cart .wsc-cart-intro__facts { gap: 10px; }
  body.woocommerce-cart .entry-content .wc-block-cart-items .wc-block-cart-item__image { width: 64px; }
  body.woocommerce-cart .entry-content .wc-block-cart-item__image img { width: 56px; height: 64px; }
  body:is(.woocommerce-cart, .woocommerce-checkout) .entry-content .wc-block-components-product-name { font-size: 15px; }
  body.woocommerce-checkout .entry-content .wc-block-components-title,
  body.woocommerce-cart .entry-content .wc-block-cart__totals-title { font-size: 20px; }
  body.woocommerce-checkout .entry-content .wc-block-components-radio-control__label-group { font-size: 14px; gap: 8px; }
  body.woocommerce-checkout .entry-content .wc-block-checkout__actions_row { padding: 0; }
}
