/* Classic cart/checkout presentation only; native AJAX, legal and payment markup stays intact. */
body.wgroup-shop-ui #content { background: var(--wgroup-soft); }
body.wgroup-shop-ui #content > .ast-container { width: 100%; max-width: 1440px; padding: 0 24px; }
body.wgroup-shop-ui #primary { width: 100%; margin: 0; padding: 42px 0 60px; border: 0; }
body.wgroup-shop-ui .ast-article-single { background: transparent; padding: 0; }
body.wgroup-shop-ui .entry-header { margin-bottom: 26px; }
body.wgroup-shop-ui .entry-title { color: var(--wgroup-ink); font-size: clamp(28px, 3vw, 40px); line-height: 1.18; font-weight: 700; letter-spacing: -.02em; }
body.wgroup-shop-ui .entry-content { color: var(--wgroup-ink); font-size: 16px; line-height: 1.6; }
body.wgroup-shop-ui .entry-content > .woocommerce { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }
body.wgroup-shop-ui .woocommerce :is(.woocommerce-info,.woocommerce-message,.woocommerce-error) { border-radius: 10px; background-color: #fff; box-shadow: none; }
body.wgroup-shop-ui .woocommerce .woocommerce-info { border-top-color: var(--wgroup-accent); }
body.wgroup-shop-ui .woocommerce .woocommerce-info::before { color: var(--wgroup-ink); }
body.wgroup-shop-ui .woocommerce :is(a.showcoupon,a.showlogin,a.shipping-calculator-button) { color: var(--wgroup-ink); text-decoration: underline; text-underline-offset: 3px; }
body.wgroup-shop-ui .woocommerce :is(a,button,input,select,textarea):focus-visible { outline: 3px solid var(--wgroup-focus); outline-offset: 3px; }

/* Only the native cart siblings become columns; every notice/attribution keeps a full-width row. */
body.wgroup-shop-ui.woocommerce-cart .entry-content > .woocommerce { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 35%); gap: 24px; align-items: start; }
body.wgroup-shop-ui.woocommerce-cart .entry-content > .woocommerce > * { grid-column: 1 / -1; min-width: 0; }
body.wgroup-shop-ui.woocommerce-cart .entry-content > .woocommerce > .woocommerce-cart-form { grid-column: 1; margin: 0; padding: 24px; border: 1px solid var(--wgroup-line); border-radius: 16px; background: #fff; }
body.wgroup-shop-ui.woocommerce-cart .entry-content > .woocommerce > .cart-collaterals { grid-column: 2; width: auto; margin: 0; padding: 24px; border: 1px solid var(--wgroup-line); border-radius: 16px; background: #fff; }
body.wgroup-shop-ui .cart-collaterals .cart_totals { width: 100%; float: none; margin: 0; padding: 0; border: 0; }
body.wgroup-shop-ui .cart-collaterals .cart_totals > h2 { margin: 0 0 16px; padding: 0; background: transparent; color: var(--wgroup-ink); font-size: 21px; line-height: 1.3; }
body.wgroup-shop-ui .woocommerce-cart-form table.shop_table { width: 100%; margin: 0 0 20px; border: 0; border-collapse: collapse; }
body.wgroup-shop-ui .woocommerce-cart-form table.shop_table :is(th,td) { border-color: var(--wgroup-line); padding: 16px 8px; vertical-align: middle; }
body.wgroup-shop-ui .woocommerce-cart-form table.shop_table th { color: var(--wgroup-muted); font-size: 12px; font-weight: 650; letter-spacing: .035em; }
body.wgroup-shop-ui .woocommerce-cart-form .product-remove { width: 24px; padding-left: 0; }
body.wgroup-shop-ui .woocommerce-cart-form .product-thumbnail { width: 88px; }
body.wgroup-shop-ui .woocommerce-cart-form .product-thumbnail img { width: 76px; max-width: 100%; height: 88px; object-fit: contain; border-radius: 8px; }
body.wgroup-shop-ui .woocommerce-cart-form .product-name { min-width: 0; overflow-wrap: anywhere; }
body.wgroup-shop-ui .woocommerce-cart-form .product-name > a { color: var(--wgroup-ink); font-size: 16px; line-height: 1.4; font-weight: 650; text-decoration: none; }
body.wgroup-shop-ui .woocommerce-cart-form :is(.product-price,.product-subtotal) { font-size: 14px; }
body.wgroup-shop-ui .woocommerce-cart-form .quantity .qty { width: 76px; min-height: 44px; padding: 8px; border: 1px solid var(--wgroup-line); border-radius: 7px; background: #fff; color: var(--wgroup-ink); font-size: 16px; }
body.wgroup-shop-ui .woocommerce-cart-form .coupon #coupon_code { min-height: 44px; border: 1px solid var(--wgroup-line); border-radius: 7px; padding: 8px 10px; font-size: 16px; }
body.wgroup-shop-ui .woocommerce-cart-form .actions .button { min-height: 44px; padding: 10px 14px; border-radius: 7px; background: var(--wgroup-ink); color: #fff; font-size: 14px; }
body.wgroup-shop-ui .cart_totals table.shop_table { width: 100%; border: 0; margin-bottom: 16px; font-size: 14px; }
body.wgroup-shop-ui .cart_totals table.shop_table :is(th,td) { padding: 14px 6px; border-color: var(--wgroup-line); vertical-align: top; }
body.wgroup-shop-ui .cart_totals .order-total { font-size: 18px; color: var(--wgroup-ink); }
body.wgroup-shop-ui .cart_totals .wc-proceed-to-checkout { padding: 12px 0 0; }
body.wgroup-shop-ui .cart_totals a.checkout-button { display: block; min-height: 50px; margin: 0; padding: 14px 16px; border: 0; border-radius: 8px; background: var(--wgroup-accent); color: var(--wgroup-accent-ink); font-size: 16px; font-weight: 650; line-height: 1.4; }
body.wgroup-shop-ui .cart_totals a.checkout-button:hover { background: var(--wgroup-accent-hover); color: var(--wgroup-accent-ink); }

/* Preserve the existing desktop checkout columns and full-width express-payment wrapper. */
body.wgroup-shop-ui form.checkout { margin-top: 24px; }
body.wgroup-shop-ui .woocommerce-checkout #customer_details { box-sizing: border-box; padding: 26px; border: 1px solid var(--wgroup-line); border-radius: 16px; background: #fff; }
body.wgroup-shop-ui .woocommerce-checkout #order_review_heading { box-sizing: border-box; margin-top: 0; padding: 24px 24px 16px; border: 1px solid var(--wgroup-line); border-bottom: 0; border-radius: 16px 16px 0 0; background: #fff; color: var(--wgroup-ink); }
body.wgroup-shop-ui .woocommerce-checkout #order_review { box-sizing: border-box; padding: 0 24px 24px; border: 1px solid var(--wgroup-line); border-top: 0; border-radius: 0 0 16px 16px; background: #fff; }
/* The existing Pergolaris notice is a native sibling between heading and review.
   Match Astra's 40% right column without moving or altering its legal/dialog markup. */
body.wgroup-shop-ui.wgroup-ui--pergolaris form.checkout > section.pggn { box-sizing: border-box; float: right; clear: right; width: 40%; margin-left: 0; margin-right: 0; }
body.wgroup-shop-ui #customer_details :is(h2,h3) { color: var(--wgroup-ink); }
body.wgroup-shop-ui #customer_details .form-row { margin-bottom: 15px; }
body.wgroup-shop-ui #customer_details .form-row label { margin-bottom: 7px; color: var(--wgroup-ink); font-size: 14px; font-weight: 600; line-height: 1.45; }
body.wgroup-shop-ui #customer_details .form-row :is(input.input-text,textarea,select) { min-height: 46px; padding: 10px 12px; border: 1px solid #b9c1b9; border-radius: 8px; background: #fff; color: var(--wgroup-ink); font-family: inherit; font-size: 16px; line-height: 1.5; }
body.wgroup-shop-ui #customer_details .form-row textarea { min-height: 110px; }
body.wgroup-shop-ui #customer_details .select2-container .select2-selection--single { min-height: 46px; height: auto; border: 1px solid #b9c1b9; border-radius: 8px; background: #fff; }
body.wgroup-shop-ui #customer_details .select2-selection--single .select2-selection__rendered { line-height: 44px; padding-left: 12px; padding-right: 34px; color: var(--wgroup-ink); }
body.wgroup-shop-ui #customer_details .select2-selection--single .select2-selection__arrow { height: 44px; right: 8px; }
body.wgroup-shop-ui #customer_details .woocommerce-invalid :is(input.input-text,textarea,select,.select2-selection) { border-color: #b42323; }
body.wgroup-shop-ui #order_review table.shop_table { width: 100%; table-layout: auto; margin: 0 0 18px; border: 0; font-size: 14px; }
body.wgroup-shop-ui #order_review table.shop_table :is(th,td) { padding: 14px 7px; border-color: var(--wgroup-line); vertical-align: top; }
body.wgroup-shop-ui #order_review .product-name { overflow-wrap: anywhere; }
body.wgroup-shop-ui #order_review .product-total { white-space: nowrap; }
body.wgroup-shop-ui #order_review .order-total { font-size: 18px; color: var(--wgroup-ink); }
body.wgroup-shop-ui :is(.woocommerce-cart-form,#order_review) dl.variation { display: block; margin-top: 10px; color: var(--wgroup-muted); font-size: 12px; line-height: 1.55; }
body.wgroup-shop-ui :is(.woocommerce-cart-form,#order_review) dl.variation :is(dt,dd) { display: block; float: none; margin: 0; padding: 0; white-space: normal; overflow-wrap: anywhere; }
body.wgroup-shop-ui :is(.woocommerce-cart-form,#order_review) dl.variation dt { color: var(--wgroup-ink); font-weight: 650; }
body.wgroup-shop-ui :is(.woocommerce-cart-form,#order_review) dl.variation dd { margin: 1px 0 8px; }
body.wgroup-shop-ui :is(.woocommerce-cart-form,#order_review) dl.variation dd p { margin: 0; }
body.wgroup-shop-ui #payment { background: transparent; border-radius: 10px; }
body.wgroup-shop-ui #payment ul.payment_methods { padding: 14px 0; border-color: var(--wgroup-line); }
body.wgroup-shop-ui #payment ul.payment_methods > li { padding: 9px 0; }
body.wgroup-shop-ui #payment .payment_box { border-radius: 8px; }
body.wgroup-shop-ui #payment .place-order { padding: 16px 0 0; }
body.wgroup-shop-ui #place_order { width: 100%; min-height: 52px; padding: 14px 18px; border: 0; border-radius: 8px; background: var(--wgroup-accent); color: var(--wgroup-accent-ink); font-size: 16px; font-weight: 650; }
body.wgroup-shop-ui #place_order:hover { background: var(--wgroup-accent-hover); color: var(--wgroup-accent-ink); }
body.wgroup-shop-ui .woocommerce-terms-and-conditions-wrapper { margin-bottom: 16px; font-size: 13px; line-height: 1.55; }

@media (max-width: 1100px) {
  body.wgroup-shop-ui.woocommerce-cart .entry-content > .woocommerce { grid-template-columns: minmax(0, 1fr); }
  body.wgroup-shop-ui.woocommerce-cart .entry-content > .woocommerce > :is(.woocommerce-cart-form,.cart-collaterals) { grid-column: 1; }
}
@media (max-width: 1000px) {
  body.wgroup-shop-ui .woocommerce-checkout :is(#customer_details,#order_review_heading,#order_review),
  body.wgroup-shop-ui.wgroup-ui--pergolaris form.checkout > section.pggn { width: 100%; float: none; clear: both; margin-left: 0; margin-right: 0; }
  body.wgroup-shop-ui .woocommerce-checkout #customer_details { margin-bottom: 24px; }
}
@media (max-width: 781px) {
  body.wgroup-shop-ui #content > .ast-container { padding: 0 16px; }
  body.wgroup-shop-ui #primary { padding: 28px 0 40px; }
  body.wgroup-shop-ui .entry-header { margin-bottom: 20px; }
  body.wgroup-shop-ui.woocommerce-cart .entry-content > .woocommerce { gap: 18px; }
  body.wgroup-shop-ui.woocommerce-cart .entry-content > .woocommerce > :is(.woocommerce-cart-form,.cart-collaterals) { padding: 16px; border-radius: 12px; }
  body.wgroup-shop-ui .woocommerce-cart-form table.shop_table :is(th,td) { padding: 13px 6px; }
  body.wgroup-shop-ui .woocommerce-checkout :is(#customer_details,#order_review_heading,#order_review) { width: 100%; float: none; margin-left: 0; margin-right: 0; }
  body.wgroup-shop-ui .woocommerce-checkout #customer_details { margin-bottom: 24px; padding: 18px; border-radius: 12px; }
  body.wgroup-shop-ui .woocommerce-checkout #order_review_heading { padding: 20px 16px 14px; }
  body.wgroup-shop-ui .woocommerce-checkout #order_review { padding: 0 16px 20px; }
  body.wgroup-shop-ui #order_review table.shop_table :is(th,td) { padding: 12px 4px; }
  body.wgroup-shop-ui #order_review .order-total { font-size: 16px; }
}
@media (max-width: 420px) {
  body.wgroup-shop-ui #customer_details .form-row-first,
  body.wgroup-shop-ui #customer_details .form-row-last { width: 100%; float: none; }
}
