/* Agossa 6.4 — cart and checkout stability/lightness layer. */
:root{--ag64-line:#e7e3dc;--ag64-soft:#f7f5f1;--ag64-ink:#24231f;--ag64-muted:#817d76}

/* CART: full-width banner sits directly below header; actual commerce content is narrower. */
body.woocommerce-cart .site-main,
body.woocommerce-cart .agossa-cart-page-main,
body.woocommerce-cart .agossa-cart-page-content,
body.woocommerce-cart .woocommerce,
body.woocommerce-cart .woocommerce-cart-form{margin-top:0!important;padding-top:0!important}
body.woocommerce-cart .agossa-cart-page-v40{width:100%!important;max-width:none!important;margin:0!important;padding:0 0 62px!important}
body.woocommerce-cart .agossa-cart-heading-v40{
  width:100%!important;min-height:100px!important;margin:0 0 24px!important;
  padding:20px max(24px,calc((100vw - 1180px)/2))!important;
  border:0!important;border-radius:0!important;background:#f5f3ef!important;box-sizing:border-box!important;
}
body.woocommerce-cart .agossa-cart-heading-v40.has-image{min-height:126px!important;background-size:cover!important;background-position:center!important}
body.woocommerce-cart .agossa-cart-layout-v40{width:min(calc(100% - 48px),1180px)!important;margin:0 auto!important;grid-template-columns:minmax(0,1fr) 332px!important;gap:42px!important}
body.woocommerce-cart .agossa-cart-columns-v40,
body.woocommerce-cart .agossa-cart-item-v40{grid-template-columns:minmax(300px,1fr) 142px 92px 110px!important;gap:14px!important}

/* Quantity control: one continuous border, no overlapping child borders. */
body.woocommerce-cart .agossa-cart-item-qty-v40{min-width:0!important;overflow:visible!important}
body.woocommerce-cart .agossa-cart-stepper-v40{
  display:grid!important;grid-template-columns:36px 48px 36px!important;
  width:122px!important;min-width:122px!important;height:40px!important;
  margin:0!important;padding:0!important;overflow:hidden!important;
  border:1px solid #dcd7cf!important;border-radius:8px!important;background:#fff!important;
  box-sizing:border-box!important;isolation:isolate!important;
}
body.woocommerce-cart .agossa-cart-stepper-v40 .agossa-cart-qty-btn,
body.woocommerce-cart .agossa-cart-stepper-v40 .agossa-cart-qty-input{
  min-width:0!important;height:38px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;box-sizing:border-box!important;
}
body.woocommerce-cart .agossa-cart-stepper-v40 .agossa-cart-qty-btn{width:36px!important;color:#2d2b27!important}
body.woocommerce-cart .agossa-cart-stepper-v40 .agossa-cart-qty-input{width:48px!important;border-left:1px solid #ece8e2!important;border-right:1px solid #ece8e2!important;line-height:38px!important;text-align:center!important;appearance:textfield!important;-moz-appearance:textfield!important}
body.woocommerce-cart .agossa-cart-stepper-v40 .agossa-cart-qty-btn::before{width:9px!important;height:1.25px!important}
body.woocommerce-cart .agossa-cart-stepper-v40 .agossa-cart-qty-plus::after{width:1.25px!important;height:9px!important}

/* Cart summary is a single light surface, separated only with hairlines. */
body.woocommerce-cart .agossa-cart-summary-v40{border:1px solid #e5e1da!important;border-radius:12px!important;background:#fff!important;box-shadow:0 12px 34px rgba(27,25,22,.035)!important;overflow:hidden!important}
body.woocommerce-cart .agossa-cart-summary-card-v40,
body.woocommerce-cart .agossa-cart-summary-head-v40,
body.woocommerce-cart .agossa-cart-delivery-v40,
body.woocommerce-cart .agossa-cart-totals-lines-v40,
body.woocommerce-cart .agossa-cart-grand-v40,
body.woocommerce-cart .agossa-cart-checkout-v40,
body.woocommerce-cart .agossa-cart-secure-v40{background:transparent!important}
body.woocommerce-cart .agossa-cart-grand-v40{margin:0 18px!important;padding:15px 0!important;border-top:1px solid var(--ag64-line)!important;border-bottom:0!important}

/* CHECKOUT: narrower, lighter shell, with the summary visually separated to the right. */
body.woocommerce-checkout:not(.woocommerce-order-received) .agossa-checkout-layout{
  width:min(calc(100% - 44px),1160px)!important;
  margin:0 auto!important;
  grid-template-columns:minmax(0,620px) minmax(350px,400px)!important;
  gap:70px!important;background:#fff!important;
}
body.woocommerce-checkout:not(.woocommerce-order-received) .agossa-checkout-left{padding:22px 0 60px!important}
body.woocommerce-checkout:not(.woocommerce-order-received) .agossa-checkout-right{padding:22px 0 60px!important;background:transparent!important}
body.woocommerce-checkout .agossa-checkout-inner{max-width:620px!important}
body.woocommerce-checkout .agossa-checkout-fields,
body.woocommerce-checkout .agossa-checkout-payment{background:#fff!important}
body.woocommerce-checkout .agossa-checkout-form input.input-text,
body.woocommerce-checkout .agossa-checkout-form textarea,
body.woocommerce-checkout .agossa-checkout-form select,
body.woocommerce-checkout .select2-container .select2-selection--single{border-color:#ded9d1!important;background:#fff!important;box-shadow:none!important}

/* Corporate invoice order and geometry: Company first, then Tax Office / Tax No 50-50. */
body.woocommerce-checkout .agossa-v49-corporate-details.is-open,
body.woocommerce-checkout .agossa-v50-corporate-details.is-open{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:12px!important;width:100%!important;
}
body.woocommerce-checkout .agossa-v49-corporate-details.is-open>.agossa-v49-field-row,
body.woocommerce-checkout .agossa-v50-corporate-details.is-open>.agossa-v49-field-row{display:contents!important}
body.woocommerce-checkout #billing_company_field{grid-column:1/-1!important;grid-row:1!important;width:100%!important;max-width:none!important}
body.woocommerce-checkout #billing_tax_office_field{grid-column:1!important;grid-row:2!important}
body.woocommerce-checkout #billing_tax_no_field{grid-column:2!important;grid-row:2!important}
body.woocommerce-checkout #billing_company_field,
body.woocommerce-checkout #billing_tax_office_field,
body.woocommerce-checkout #billing_tax_no_field{float:none!important;min-width:0!important;margin:0!important}
body.woocommerce-checkout #billing_company_field .woocommerce-input-wrapper,
body.woocommerce-checkout #billing_tax_office_field .woocommerce-input-wrapper,
body.woocommerce-checkout #billing_tax_no_field .woocommerce-input-wrapper,
body.woocommerce-checkout #billing_company_field input,
body.woocommerce-checkout #billing_tax_office_field input,
body.woocommerce-checkout #billing_tax_no_field input{display:block!important;width:100%!important;max-width:none!important;box-sizing:border-box!important}

@media(min-width:992px){
  body.woocommerce-checkout .agossa-order-summary{
    top:76px!important;height:calc(100dvh - 98px)!important;min-height:500px!important;max-height:720px!important;
    border:1px solid #e2ded7!important;border-radius:12px!important;background:#f7f6f3!important;
    box-shadow:0 14px 38px rgba(25,23,20,.045)!important;
  }
  body.woocommerce-checkout #order_review,
  body.woocommerce-checkout .agossa-review-order{display:grid!important;grid-template-rows:minmax(0,1fr) auto auto!important;height:100%!important;min-height:0!important;overflow:hidden!important;background:transparent!important}
  body.woocommerce-checkout .agossa-review-products{min-height:0!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;padding:16px 16px 8px!important;background:transparent!important}
  body.woocommerce-checkout .agossa-review-product{background:#fff!important;border:1px solid #ebe7e1!important;border-radius:9px!important;margin-bottom:8px!important;padding:10px!important}
  body.woocommerce-checkout .agossa-review-coupon{margin:0!important;padding:13px 16px!important;border-top:1px solid #e2ded7!important;background:#f7f6f3!important}
  body.woocommerce-checkout .agossa-review-totals{margin:0!important;padding:13px 16px 16px!important;border-top:1px solid #e2ded7!important;background:#f7f6f3!important}
}

/* MOBILE CART: deterministic card layout; no desktop columns can leak into it. */
@media(max-width:767.98px){
  body.woocommerce-cart .agossa-cart-heading-v40{min-height:84px!important;margin-bottom:12px!important;padding:16px 14px!important}
  body.woocommerce-cart .agossa-cart-layout-v40{display:block!important;width:100%!important;padding:0 12px!important}
  body.woocommerce-cart .agossa-cart-columns-v40{display:none!important}
  body.woocommerce-cart .agossa-cart-items-v40{display:grid!important;gap:9px!important}
  body.woocommerce-cart .agossa-cart-item-v40{
    position:relative!important;display:grid!important;width:100%!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"product product" "qty qty" "tax total"!important;
    gap:10px 12px!important;min-height:0!important;margin:0!important;padding:12px!important;
    border:1px solid #e7e3dc!important;border-radius:10px!important;background:#fff!important;box-sizing:border-box!important;
  }
  body.woocommerce-cart .agossa-cart-product-v40{grid-area:product!important;display:grid!important;grid-template-columns:70px minmax(0,1fr)!important;gap:11px!important;width:100%!important;min-width:0!important;padding:0 26px 0 0!important;box-sizing:border-box!important}
  body.woocommerce-cart .agossa-cart-remove-v40{position:absolute!important;top:12px!important;right:10px!important;z-index:3!important}
  body.woocommerce-cart .agossa-cart-image-v40{width:70px!important;height:70px!important;min-width:70px!important}
  body.woocommerce-cart .agossa-cart-copy-v40{min-width:0!important}
  body.woocommerce-cart .agossa-cart-copy-v40 h2{margin:2px 0 4px!important;font-size:13px!important;line-height:1.25!important}
  body.woocommerce-cart .agossa-cart-copy-v40 p{margin:0!important;font-size:10px!important;line-height:1.45!important}
  body.woocommerce-cart .agossa-cart-item-qty-v40{grid-area:qty!important;display:flex!important;align-items:center!important;justify-content:space-between!important;width:100%!important;min-width:0!important;padding:10px 0 0!important;border-top:1px solid #efebe5!important;box-sizing:border-box!important}
  body.woocommerce-cart .agossa-cart-item-qty-v40::before{content:attr(data-label)!important;display:block!important;font-size:9px!important;font-weight:600!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:#96918a!important}
  body.woocommerce-cart .agossa-cart-tax-v40{grid-area:tax!important;align-self:end!important;min-width:0!important;padding:0!important;text-align:left!important;font-size:10px!important;color:#8c877f!important}
  body.woocommerce-cart .agossa-cart-price-v40{grid-area:total!important;align-self:end!important;min-width:0!important;padding:0!important;text-align:right!important;font-size:13px!important;font-weight:650!important}
  body.woocommerce-cart .agossa-cart-summary-v40{margin-top:16px!important;position:static!important;width:100%!important}
  body.woocommerce-cart .agossa-cart-stepper-v40{grid-template-columns:34px 44px 34px!important;width:114px!important;min-width:114px!important;height:38px!important}
  body.woocommerce-cart .agossa-cart-stepper-v40 .agossa-cart-qty-btn{width:34px!important;height:36px!important}
  body.woocommerce-cart .agossa-cart-stepper-v40 .agossa-cart-qty-input{width:44px!important;height:36px!important;line-height:36px!important}

  body.woocommerce-checkout:not(.woocommerce-order-received) .agossa-checkout-layout{width:100%!important;display:flex!important;gap:0!important}
  body.woocommerce-checkout:not(.woocommerce-order-received) .agossa-checkout-left{padding:16px 14px 42px!important}
  body.woocommerce-checkout .agossa-v49-corporate-details.is-open,
  body.woocommerce-checkout .agossa-v50-corporate-details.is-open{grid-template-columns:1fr!important;gap:10px!important}
  body.woocommerce-checkout #billing_company_field,
  body.woocommerce-checkout #billing_tax_office_field,
  body.woocommerce-checkout #billing_tax_no_field{grid-column:1!important;grid-row:auto!important}
}
@media(max-width:767.98px){
  body.woocommerce-cart .agossa-cart-item-qty-v40::before{content:none!important}
  body.woocommerce-cart .agossa-cart-item-qty-v40 .agossa-cart-qty-label-v40{display:block!important;order:1!important;margin:0!important;font-size:9px!important;font-weight:600!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:#96918a!important}
  body.woocommerce-cart .agossa-cart-item-qty-v40 .agossa-cart-stepper-v40{order:2!important;margin-left:auto!important}
}
