/* Cart body (TODO 00001.5.16), DESIGN-GUIDE section 8 Cart (A5, D5): lines left and the summary card right, 8 + 4
   from 992 (stacked under it). Lines: 96px photo, H4 navy name, small slate SKU and range, the section 8 stepper,
   line total in price style, remove text link. Summary: mist card with a line edge, totals, full-width primary
   Proceed to checkout, small test-mode note. Empty: H2, one line, primary button to the shop (recs row gated). */
.p-cart-body { box-sizing: border-box; padding: var(--wp--preset--spacing--110) var(--wp--custom--gutter--desktop); }
.p-cart-body *, .p-cart-body *::before, .p-cart-body *::after { box-sizing: border-box; }
.p-cart-body__inner { max-width: var(--wp--custom--layout--wide); margin-inline: auto; }
.p-cart-body .wp-block-post-content > * { max-width: none; margin-inline: 0; }
.p-cart-body .wp-block-woocommerce-cart { margin: 0; color: var(--wp--preset--color--ink); }

/* Layout: 8 + 4 columns with the 24px gutter. */
.p-cart-body .wc-block-components-sidebar-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--wp--preset--spacing--60); margin: 0; }
.p-cart-body .wc-block-components-sidebar-layout .wc-block-components-main { flex: 1 1 0; width: auto; min-width: 0; padding: 0; }
.p-cart-body .wc-block-components-sidebar-layout .wc-block-components-sidebar {
  flex: 0 0 calc((100% - var(--wp--preset--spacing--60)) / 3); width: auto; margin: 0; padding: var(--wp--preset--spacing--60);
  background: var(--wp--preset--color--mist); border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--custom--radius--default);
}

/* Lines */
.p-cart-body table.wc-block-cart-items { width: 100%; margin: 0; border-collapse: collapse; }
.p-cart-body .wc-block-cart-items__header th {
  padding: 0 0 var(--wp--preset--spacing--40); border-bottom: 1px solid var(--wp--preset--color--line);
  color: var(--wp--preset--color--slate); font-size: var(--wp--preset--font-size--label); font-weight: var(--wp--custom--font-weight--label);
  letter-spacing: var(--wp--custom--letter-spacing--label); line-height: 1.3; text-transform: uppercase;
}
.p-cart-body .wc-block-cart-items__row { border-bottom: 1px solid var(--wp--preset--color--line); }
.p-cart-body .wc-block-cart-items td { padding: var(--wp--preset--spacing--60) 0; border: 0; vertical-align: top; }
.p-cart-body .wc-block-cart-item__image { width: 96px; padding-right: var(--wp--preset--spacing--60) !important; }
.p-cart-body .wc-block-cart-item__image a { display: block; }
.p-cart-body .wc-block-cart-item__image img {
  display: block; width: 96px; height: 96px; object-fit: contain; background: var(--wp--preset--color--mist);
  border-radius: var(--wp--custom--radius--default);
}
.p-cart-body .wc-block-components-product-name {
  display: inline-block; color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--h-4);
  font-weight: var(--wp--custom--font-weight--h-4); line-height: 1.35; text-decoration: none;
}
.p-cart-body a.wc-block-components-product-name:focus-visible { outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--orange); outline-offset: var(--wp--custom--focus--offset); }
.p-cart-body .wc-block-cart-item__prices { margin-top: var(--wp--preset--spacing--20); color: var(--wp--preset--color--slate); font-size: var(--wp--preset--font-size--small); }
.p-cart-body .wc-block-components-product-metadata { margin-top: var(--wp--preset--spacing--20); color: var(--wp--preset--color--slate); font-size: var(--wp--preset--font-size--small); line-height: 1.5; }
.p-cart-body .wc-block-components-product-metadata p { margin: 0; }
.p-cart-body .wc-block-cart-item__quantity { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wp--preset--spacing--60); margin-top: var(--wp--preset--spacing--50); }
.p-cart-body .wc-block-cart-item__total { width: 160px; text-align: right; }
.p-cart-body .wc-block-cart-item__total .wc-block-components-product-price,
.p-cart-body .wc-block-cart-item__total .wc-block-components-formatted-money-amount {
  color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--price); font-weight: var(--wp--custom--font-weight--price); line-height: 1.2;
}

/* Quantity stepper: one 48px group with a slate border; minus, 64px number, plus. */
.p-cart-body .wc-block-components-quantity-selector {
  display: inline-flex; width: auto; height: var(--wp--custom--control); margin: 0; overflow: hidden;
  border: 1px solid var(--wp--preset--color--slate); border-radius: var(--wp--custom--radius--default); background: var(--wp--preset--color--white);
}
.p-cart-body .wc-block-components-quantity-selector::after { display: none; }
.p-cart-body .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
  order: 2; width: 64px; min-width: 64px; height: 100%; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--wp--preset--color--line);
  border-right: 1px solid var(--wp--preset--color--line); border-radius: 0; background: transparent;
  color: var(--wp--preset--color--ink); font-size: var(--wp--preset--font-size--body); font-weight: 600; text-align: center; box-shadow: none;
}
.p-cart-body .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
  width: var(--wp--custom--control); min-width: var(--wp--custom--control); height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: var(--wp--preset--color--navy); font-size: 20px; font-weight: 600; opacity: 1; cursor: pointer;
}
.p-cart-body .wc-block-components-quantity-selector__button--minus { order: 1; }
.p-cart-body .wc-block-components-quantity-selector__button--plus { order: 3; }
.p-cart-body .wc-block-components-quantity-selector__button:disabled { color: var(--wp--preset--color--slate); cursor: default; }
.p-cart-body .wc-block-components-quantity-selector input:focus-visible,
.p-cart-body .wc-block-components-quantity-selector__button:focus-visible { outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--orange); outline-offset: calc(-1 * var(--wp--custom--focus--width)); box-shadow: none; }
.p-cart-body .wc-block-cart-item__remove-link {
  min-height: var(--wp--custom--touch); padding: 0; background: none; border: 0;
  color: var(--wp--preset--color--navy) !important; font-size: var(--wp--preset--font-size--small) !important; font-weight: 500;
  text-decoration: underline !important; text-decoration-thickness: 1px !important; text-underline-offset: 3px; cursor: pointer;
}
.p-cart-body .wc-block-cart-item__remove-link:focus-visible { outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--orange); outline-offset: 2px; }
.p-cart-body .wc-block-cart-items__row.is-disabled { opacity: .6; }

/* Summary card */
.p-cart-body .wc-block-cart__totals-title {
  display: block; margin: 0 0 var(--wp--preset--spacing--40); padding: 0; color: var(--wp--preset--color--navy) !important;
  font-size: var(--wp--preset--font-size--h-3) !important; font-weight: var(--wp--custom--font-weight--h-3) !important;
  line-height: 1.25; text-align: left !important; text-transform: none !important; letter-spacing: 0;
}
.p-cart-body .wc-block-components-totals-wrapper { padding: var(--wp--preset--spacing--50) 0; border-top: 1px solid var(--wp--preset--color--line); }
.p-cart-body .wc-block-components-totals-wrapper:empty { display: none; }
.p-cart-body .wc-block-components-totals-item { color: var(--wp--preset--color--ink); font-size: var(--wp--preset--font-size--body); }
.p-cart-body .wc-block-components-totals-item__description { color: var(--wp--preset--color--slate); font-size: var(--wp--preset--font-size--small); }
.p-cart-body .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.p-cart-body .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--price); font-weight: var(--wp--custom--font-weight--price); line-height: 1.2;
}
.p-cart-body .wc-block-components-panel__button {
  min-height: var(--wp--custom--touch); margin: 0; padding: 0; color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--body); font-weight: 500;
}
.p-cart-body .wc-block-components-panel__button:focus-visible { outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--navy); outline-offset: 2px; }
.p-cart-body .wc-block-cart__submit { margin: var(--wp--preset--spacing--40) 0 0; }
.p-cart-body .wc-block-cart__submit-container { position: static; padding: 0; background: none; box-shadow: none; }
.p-cart-body .wc-block-cart__submit-button {
  width: 100%; min-height: var(--wp--custom--control); padding: 14px var(--wp--preset--spacing--60); border: 0;
  background: var(--wp--preset--color--orange); color: var(--wp--preset--color--navy); border-radius: var(--wp--custom--radius--default);
  font-size: var(--wp--preset--font-size--button); font-weight: var(--wp--custom--font-weight--button); text-decoration: none;
}
.p-cart-body .wc-block-cart__submit-button:focus-visible { outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--navy); outline-offset: var(--wp--custom--focus--offset); box-shadow: none; }
.p-cart-body .wc-block-cart__submit-button:active { transform: scale(.98); }
.p-cart-body .p-cart__testmode { margin: var(--wp--preset--spacing--50) 0 0; color: var(--wp--preset--color--slate); font-size: var(--wp--preset--font-size--small); line-height: 1.5; }
@media (hover: hover) and (pointer: fine) {
  .p-cart-body a.wc-block-components-product-name:hover { text-decoration: underline; text-underline-offset: 3px; }
  .p-cart-body .wc-block-components-quantity-selector__button:not(:disabled):hover { background: var(--wp--preset--color--mist); }
  .p-cart-body .wc-block-cart-item__remove-link:hover { text-decoration-thickness: 2px !important; }
  .p-cart-body .wc-block-cart__submit-button:hover { box-shadow: inset 0 0 0 100vmax var(--wp--custom--alpha--overlay-navy); background: var(--wp--preset--color--orange); }
}

/* Empty cart */
.p-cart-body .p-cart__empty { max-width: 40rem; margin: 0; padding: 0; }
.p-cart-body .wp-block-woocommerce-empty-cart-block { margin: 0; padding: 0; }
.p-cart-body .p-cart__empty-title {
  margin: 0; color: var(--wp--preset--color--navy); font-size: var(--wp--preset--font-size--h-2);
  font-weight: var(--wp--custom--font-weight--h-2); letter-spacing: var(--wp--custom--letter-spacing--h-2); line-height: 1.15; text-align: left;
}
.p-cart-body .p-cart__empty-title::before { display: none; }
.p-cart-body .p-cart__empty-lead { margin: var(--wp--preset--spacing--50) 0 0; color: var(--wp--preset--color--ink); font-size: var(--wp--preset--font-size--body-l); line-height: 1.6; }
.p-cart-body .p-cart__empty-action { margin: var(--wp--preset--spacing--70) 0 0; }
.p-cart-body .p-cart__empty-button {
  display: inline-flex; align-items: center; min-height: var(--wp--custom--control); padding: 14px var(--wp--preset--spacing--60);
  background: var(--wp--preset--color--orange); color: var(--wp--preset--color--navy); border-radius: var(--wp--custom--radius--default);
  font-size: var(--wp--preset--font-size--button); font-weight: var(--wp--custom--font-weight--button); line-height: 1; text-decoration: none;
}
.p-cart-body .p-cart__empty-button:focus-visible { outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--orange); outline-offset: var(--wp--custom--focus--offset); }
.p-cart-body .p-cart__empty-button:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .p-cart-body .p-cart__empty-button:hover { box-shadow: inset 0 0 0 100vmax var(--wp--custom--alpha--overlay-navy); } }

@media (max-width: 991.98px) {
  .p-cart-body { padding: var(--wp--preset--spacing--100) var(--wp--custom--gutter--tablet); }
  .p-cart-body .wc-block-components-sidebar-layout { flex-direction: column; align-items: stretch; }
  .p-cart-body .wc-block-components-sidebar-layout .wc-block-components-main,
  .p-cart-body .wc-block-components-sidebar-layout .wc-block-components-sidebar { flex: none; width: 100%; }
}
@media (max-width: 599.98px) {
  .p-cart-body { padding: var(--wp--preset--spacing--90) var(--wp--custom--gutter--phone); }
  .p-cart-body .wc-block-cart-item__image { width: 72px; padding-right: var(--wp--preset--spacing--50) !important; }
  .p-cart-body .wc-block-cart-item__image img { width: 72px; height: 72px; }
  .p-cart-body .wc-block-cart-item__total { width: auto; }
  .p-cart-body .wc-block-cart__submit-container { position: static !important; }
  .p-cart-body .p-cart__empty-button { width: 100%; justify-content: center; }
}
.p-cart-body .wc-block-components-panel__button { display: flex; align-items: center; justify-content: space-between; }
.p-cart-body .wc-block-components-panel__button-icon { position: static !important; transform: none; }
.p-cart-body .wc-block-cart-items .wc-block-cart-item__product .wc-block-components-product-name {
  color: var(--wp--preset--color--navy) !important; font-size: var(--wp--preset--font-size--h-4) !important; font-weight: 600 !important; line-height: 1.35;
}
.p-cart-body .wc-block-components-panel__button-icon, .p-checkout-body .wc-block-components-panel__button-icon { order: 2; }
.p-cart-body .wc-block-cart-item__remove-link { display: inline-flex; align-items: center; justify-content: center; min-width: var(--wp--custom--touch); }
/* Woo's container-size classes (is-medium, is-mobile) restack the layout; the guide's 8 + 4 split holds from 992. */
@media (min-width: 992px) {
  .p-cart-body .wc-block-components-sidebar-layout { flex-direction: row !important; flex-wrap: nowrap !important; }
  .p-cart-body .wc-block-components-sidebar-layout .wc-block-components-main { order: 1; flex: 1 1 0 !important; width: auto !important; }
  .p-cart-body .wc-block-components-sidebar-layout .wc-block-components-sidebar { order: 2; flex: 0 0 calc((100% - var(--wp--preset--spacing--60)) / 3) !important; width: auto !important; }
}
/* Phone: the line table keeps inside the 16px gutter (audit F1, 00001.5.16). */
@media (max-width: 599.98px) {
  .p-cart-body table.wc-block-cart-items { table-layout: fixed; }
  .p-cart-body .wc-block-cart-item__product { min-width: 0; overflow-wrap: anywhere; }
  .p-cart-body .wc-block-cart-item__total { width: 96px; }
  .p-cart-body .wc-block-cart-item__total .wc-block-components-product-price,
  .p-cart-body .wc-block-cart-item__total .wc-block-components-formatted-money-amount { font-size: var(--wp--preset--font-size--body); white-space: nowrap; }
}
