/* Keep WooCommerce's cart markup, session and Store API behavior intact. */
.bk-cart { box-sizing: border-box; width: min(100%,var(--bk-wide)); margin-inline: auto; padding-block: clamp(1.5rem,4vw,3rem); }
.bk-cart > h1 { margin: 0 0 var(--bk-space-3); color: var(--bk-primary); font-family: var(--bk-heading); }
.bk-cart-navigation { margin-block: 0 var(--bk-space-5); }
.bk-cart-navigation a { display: inline-flex; align-items: center; min-height: 44px; }
.bk-cart-content, .bk-cart .wc-block-cart, .bk-cart .wc-block-components-main, .bk-cart .wc-block-components-sidebar { min-width: 0; box-sizing: border-box; }
.bk-cart .wc-block-cart-items { color: var(--bk-text); }
.bk-cart .wc-block-cart-items__header { color: var(--bk-primary); }
.bk-cart .wc-block-cart-items__row { border-color: var(--bk-surface-muted); }
.bk-cart .wc-block-cart-item__image img { border-radius: var(--bk-radius-sm); background: var(--bk-surface-muted); }
.bk-cart .wc-block-components-product-name { color: var(--bk-primary); font-family: var(--bk-heading); font-weight: 700; overflow-wrap: anywhere; }
.bk-cart .wc-block-components-product-price, .bk-cart .wc-block-components-totals-item__value { color: var(--bk-text); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bk-cart .wc-block-components-product-price del { color: var(--bk-text-muted); }
.bk-cart .wc-block-components-product-badge { color: var(--bk-primary); background: var(--bk-surface-muted); border-color: var(--bk-border); border-radius: var(--bk-radius-sm); }
.bk-cart .wc-block-components-quantity-selector { box-sizing: border-box; width: 132px; max-width: 100%; min-height: 44px; margin-bottom: .5rem; background: var(--bk-surface); border: 1px solid var(--bk-border); border-radius: var(--bk-radius-sm); }
.bk-cart .wc-block-components-quantity-selector::after { border: 0; }
.bk-cart .wc-block-components-quantity-selector__button { min-width: 36px; min-height: 44px; color: var(--bk-primary); }
.bk-cart .wc-block-components-quantity-selector__input { color: var(--bk-text); min-width: 0; }
.bk-cart .wc-block-cart-item__remove-link { min-width: 44px; min-height: 44px; color: var(--bk-primary); }
.bk-cart .wc-block-components-sidebar { background: var(--bk-surface); border: 1px solid var(--bk-surface-muted); border-radius: var(--bk-radius-lg); padding: clamp(.75rem,2vw,1.25rem); box-shadow: var(--bk-shadow); }
.bk-cart .wc-block-components-totals-wrapper { border-color: var(--bk-surface-muted); }
.bk-cart .wc-block-components-totals-footer-item { color: var(--bk-primary); font-weight: 700; }
.bk-cart .wc-block-components-totals-coupon__form { flex-wrap: wrap; gap: .5rem; }
.bk-cart .wc-block-components-totals-coupon__form .wc-block-components-text-input { min-width: min(100%,10rem); }
.bk-cart .wc-block-components-text-input input { color: var(--bk-text); background: var(--bk-surface); border-color: var(--bk-border); }
.bk-cart .wc-block-components-text-input label { color: var(--bk-text-muted); }
.bk-cart :is(.wc-block-components-totals-coupon__button,.wc-block-cart__submit-button,.checkout-button,.woocommerce-cart-form button.button,.wc-block-cart .wp-block-button__link) { box-sizing: border-box; min-height: 48px; max-width: 100%; background: var(--bk-primary); color: var(--bk-on-primary); border: 1px solid transparent; border-radius: var(--bk-radius-md); padding: .75rem 1rem; font: 600 1rem/1.4 var(--bk-body); text-decoration: none; white-space: normal; overflow-wrap: anywhere; }
.bk-cart :is(.wc-block-components-totals-coupon__button,.wc-block-cart__submit-button,.checkout-button):hover { background: var(--bk-primary-hover); color: var(--bk-on-primary); }
.bk-cart :is(.wc-block-components-totals-coupon__button,.woocommerce-cart-form button.button):disabled { background: var(--bk-surface-muted); color: var(--bk-text-muted); border-color: var(--bk-border); }
.bk-cart .wc-block-components-panel__button { min-height: 44px; color: var(--bk-primary); }
.bk-cart .wc-block-cart__submit-container { padding-block: .5rem; }
.bk-cart .wc-block-cart__empty-cart__title { color: var(--bk-primary); font-family: var(--bk-heading); }
.bk-cart .wc-block-components-notice-banner { overflow-wrap: anywhere; }
.bk-cart :is(a,button,input,select):focus-visible { outline: 2px solid var(--bk-focus); outline-offset: 2px; }
.bk-cart .woocommerce-cart-form, .bk-cart .cart_totals { box-sizing: border-box; min-width: 0; }
.bk-cart .cart_totals { background: var(--bk-surface); border-radius: var(--bk-radius-lg); padding: 1rem; }
@media (max-width: 35rem) {
  .bk-cart .wc-block-components-sidebar { padding-inline: .75rem; }
  .bk-cart .wc-block-components-totals-coupon__form .wc-block-components-text-input, .bk-cart .wc-block-components-totals-coupon__button { flex-basis: 100%; }
}

/* Reflow rather than clipping on narrow handsets. WC's small-container row
 * uses fixed tracks plus an implicit third track; give all cells a bounded
 * layout and let the quantity controls and coupon labels wrap. */
@media (max-width: 35rem) {
  .bk-cart .wc-block-components-sidebar-layout,
  .bk-cart .wc-block-components-main,
  .bk-cart .wc-block-components-sidebar,
  .bk-cart .wc-block-cart-content,
  .bk-cart .wp-block-woocommerce-cart,
  .bk-cart .wc-block-cart__main,
  .bk-cart .wp-block-woocommerce-cart-order-summary-block {
    min-width: 0; max-width: 100%; box-sizing: border-box;
  }
  .bk-cart table.wc-block-cart-items {
    table-layout: fixed; width: 100%; max-width: 100%; min-width: 0;
  }
  .bk-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
    display: grid; grid-template-columns: minmax(0,60px) minmax(0,1fr);
    column-gap: .75rem; row-gap: .5rem; width: 100%;
    min-width: 0; box-sizing: border-box;
  }
  .bk-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row > td {
    min-width: 0; max-width: 100%; box-sizing: border-box;
  }
  .bk-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image {
    grid-column: 1; grid-row: 1; align-self: start;
  }
  .bk-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__product {
    grid-column: 2; grid-row: 1; padding: 0;
  }
  .bk-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__total {
    grid-column: 2; grid-row: 2; justify-self: stretch;
  }
  .bk-cart .wc-block-cart-item__wrap,
  .bk-cart .wc-block-cart-item__quantity,
  .bk-cart .wc-block-cart-item__prices {
    min-width: 0; max-width: 100%; box-sizing: border-box;
  }
  .bk-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__quantity {
    flex-wrap: wrap; gap: .5rem;
  }
  .bk-cart .wc-block-cart-item__wrap .wc-block-components-product-name {
    max-width: 100%; overflow-wrap: anywhere;
  }
  .bk-cart .wc-block-components-quantity-selector {
    flex: 0 1 132px; min-width: 0; max-width: 100%;
  }
  .bk-cart .wc-block-components-quantity-selector__input { flex: 1 1 0; width: 0; }
  .bk-cart .wc-block-components-quantity-selector__button { flex: 0 0 36px; }
  .bk-cart .wc-block-components-totals-item,
  .bk-cart .wc-block-components-totals-item__description,
  .bk-cart .wc-block-components-totals-discount__coupon-list,
  .bk-cart .wc-block-components-totals-discount__coupon-list-item {
    min-width: 0; max-width: 100%; box-sizing: border-box;
  }
  .bk-cart .wc-block-components-totals-discount__coupon-list-item {
    white-space: normal; overflow-wrap: anywhere; margin-inline-end: 0;
  }
  .bk-cart .wc-block-components-chip__text {
    min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.4;
  }
  .bk-cart .wc-block-components-chip__remove { flex-shrink: 0; }
  .bk-cart .wc-block-components-totals-item__label,
  .bk-cart .wc-block-components-totals-item__value {
    min-width: 0; overflow-wrap: anywhere;
  }
}

/* Shared purchase journey: no session-dependent or simulated progress. */
.bk-purchase-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); list-style:none; gap:.5rem; margin:0 0 1rem; padding:0; counter-reset:bk-purchase; }
.bk-purchase-steps li { counter-increment:bk-purchase; display:flex; align-items:center; gap:.5rem; min-width:0; padding:.75rem .5rem; border-bottom:2px solid var(--bk-border); font-size:var(--bk-size-small); color:var(--bk-text-muted); overflow-wrap:anywhere; }
.bk-purchase-steps li::before { content:counter(bk-purchase); display:grid; place-items:center; flex:0 0 1.75rem; height:1.75rem; border-radius:50%; background:var(--bk-surface-muted); color:var(--bk-primary); font-weight:700; }
.bk-purchase-steps li[aria-current=step] { border-color:var(--bk-primary); color:var(--bk-primary); font-weight:700; }
.bk-purchase-steps li[aria-current=step]::before { background:var(--bk-primary); color:var(--bk-on-primary); }
@media(max-width:35rem) { .bk-purchase-steps li { flex-direction:column; text-align:center; } }
.bk-cart .wc-block-components-sidebar, .bk-cart .cart_totals { box-shadow:none; border:1px solid var(--bk-border); }
.bk-cart .wc-block-components-totals-footer-item { font-size:1.125rem; }
.bk-cart .wc-block-cart__submit-button { width:100%; }
.bk-cart .wc-block-cart-item__remove-link { text-underline-offset:.2em; }
