/* AMV 1.8.2 - Classic WooCommerce Cart and Checkout layout repair.
   Scoped to purchase pages; no changes to quantities, prices or shipping calculations. */
body.amv-cart-page.amv-cart-classic .woocommerce-cart-form .quantity.amv-classic-qty[data-amvr-native],
body.amv-cart-page.amv-cart-classic .woocommerce-cart-form .amv-classic-qty[data-amvr-native],
body.amv-checkout-page.amv-checkout-classic .amv-classic-checkout-qty .amv-classic-qty[data-amvr-native] {
  display:none!important;
}
/* Exactly one visible control for pairs; keep Woo's native physical-piece input in DOM. */
body.amv-cart-page.amv-cart-classic table.shop_table.cart .product-quantity .amvr-pair-ui,
body.amv-checkout-page.amv-checkout-classic .amv-classic-checkout-qty .amvr-pair-ui {
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  width:100%!important;
  max-width:160px!important;
  min-width:0!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:0!important;
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  color:#111315!important;
  vertical-align:top!important;
}
body.amv-cart-page.amv-cart-classic table.shop_table.cart .product-quantity .amvr-pair-ui>label,
body.amv-checkout-page.amv-checkout-classic .amv-classic-checkout-qty .amvr-pair-ui>label {
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  color:#111315!important;
  font:700 11px/1.4 Rubik,Arial,sans-serif!important;
  white-space:normal!important;
}
body.amv-cart-page.amv-cart-classic table.shop_table.cart .product-quantity .amvr-pair-ui__input,
body.amv-checkout-page.amv-checkout-classic .amv-classic-checkout-qty .amvr-pair-ui__input {
  display:grid!important;
  grid-template-columns:32px minmax(0,1fr) 32px!important;
  align-items:stretch!important;
  width:100%!important;
  min-width:0!important;
  height:42px!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  margin:5px 0 0!important;
  padding:0!important;
  border:1px solid #cfd4d6!important;
  border-radius:3px!important;
  overflow:hidden!important;
  background:#fff!important;
}
body.amv-cart-page.amv-cart-classic table.shop_table.cart .product-quantity .amvr-pair-ui__input>button,
body.amv-checkout-page.amv-checkout-classic .amv-classic-checkout-qty .amvr-pair-ui__input>button {
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:32px!important;
  min-width:0!important;
  max-width:32px!important;
  height:40px!important;
  min-height:0!important;
  max-height:40px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:#f3f5f6!important;
  color:#111315!important;
  font:700 19px/1 Arial,sans-serif!important;
  box-shadow:none!important;
  transform:none!important;
  cursor:pointer!important;
}
body.amv-cart-page.amv-cart-classic table.shop_table.cart .product-quantity .amvr-pair-ui__input>button:hover:not(:disabled),
body.amv-checkout-page.amv-checkout-classic .amv-classic-checkout-qty .amvr-pair-ui__input>button:hover:not(:disabled) {
  background:#0EAAFF!important;
  color:#fff!important;
}
body.amv-cart-page.amv-cart-classic table.shop_table.cart .product-quantity .amvr-pair-ui__input>input,
body.amv-checkout-page.amv-checkout-classic .amv-classic-checkout-qty .amvr-pair-ui__input>input {
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:40px!important;
  min-height:0!important;
  max-height:40px!important;
  margin:0!important;
  padding:0 2px!important;
  border:0!important;
  border-radius:0!important;
  background:#fff!important;
  color:#111315!important;
  text-align:center!important;
  font:700 14px/40px Rubik,Arial,sans-serif!important;
  box-shadow:none!important;
  -moz-appearance:textfield!important;
  appearance:textfield!important;
}
body.amv-cart-page.amv-cart-classic table.shop_table.cart .product-quantity .amvr-pair-ui>small,
body.amv-checkout-page.amv-checkout-classic .amv-classic-checkout-qty .amvr-pair-ui>small {
  display:block!important;
  margin:4px 0 0!important;
  padding:0!important;
  font:500 11px/1.4 Rubik,Arial,sans-serif!important;
  color:#59615c!important;
  white-space:normal!important;
}
body.amv-cart-page.amv-cart-classic table.shop_table.cart .product-quantity {white-space:normal!important;}
/* Leave the subtotal in its own column, not underneath the pair control. */
body.amv-cart-page.amv-cart-classic table.shop_table.cart .product-subtotal {position:relative!important;z-index:1!important;}
/* Checkout: reserve enough real width for product label and total, avoiding 3-line VAT labels. */
body.amv-checkout-page.amv-checkout-classic #order_review table.shop_table.woocommerce-checkout-review-order-table {
  width:100%!important;
  table-layout:fixed!important;
}
body.amv-checkout-page.amv-checkout-classic #order_review table.shop_table .cart_item>td.product-name {
  width:68%!important;
  box-sizing:border-box!important;
  padding:14px 10px 14px 0!important;
  text-align:left!important;
  vertical-align:top!important;
  min-width:0!important;
}
body.amv-checkout-page.amv-checkout-classic #order_review table.shop_table .cart_item>td.product-total {
  width:32%!important;
  box-sizing:border-box!important;
  padding:14px 0 14px 5px!important;
  text-align:right!important;
  vertical-align:top!important;
  min-width:0!important;
}
body.amv-checkout-page.amv-checkout-classic #order_review table.shop_table .cart_item>td.product-total .amount,
body.amv-checkout-page.amv-checkout-classic #order_review table.shop_table .cart_item>td.product-total small {
  display:inline-block!important;
  white-space:nowrap!important;
}
body.amv-checkout-page.amv-checkout-classic #order_review .amv-checkout-product-line {
  grid-template-columns:clamp(48px,16vw,68px) minmax(0,1fr)!important;
  gap:10px!important;
  align-items:start!important;
  min-width:0!important;
}
body.amv-checkout-page.amv-checkout-classic #order_review .amv-checkout-product-imagebox {
  width:100%!important;
  height:68px!important;
  max-width:68px!important;
}
body.amv-checkout-page.amv-checkout-classic #order_review .amv-checkout-product-name {
  display:block!important;
  min-width:0!important;
  font:700 12px/1.4 Rubik,Arial,sans-serif!important;
  text-align:left!important;
  overflow-wrap:break-word!important;
}
body.amv-checkout-page.amv-checkout-classic #order_review .amv-classic-checkout-qty {flex-wrap:wrap!important;justify-content:flex-start!important;gap:8px!important;}
@media(max-width:460px) {
  body.amv-checkout-page.amv-checkout-classic #order_review .amv-checkout-product-line {grid-template-columns:50px minmax(0,1fr)!important;}
  body.amv-checkout-page.amv-checkout-classic #order_review .amv-checkout-product-imagebox {height:55px!important;}
  body.amv-checkout-page.amv-checkout-classic #order_review table.shop_table .cart_item>td.product-name {width:66%!important;}
  body.amv-checkout-page.amv-checkout-classic #order_review table.shop_table .cart_item>td.product-total {width:34%!important;}
}

/* AMV 1.8.3 — remove redundant physical-piece caption under pair selectors.
   The original WooCommerce input and quantity conversion remain untouched. */
body.amv-cart-page.amv-cart-classic table.shop_table.cart .product-quantity .amvr-pair-ui > small,
body.amv-checkout-page.amv-checkout-classic .amv-classic-checkout-qty .amvr-pair-ui > small {
  display: none !important;
}
/* Price and unit must stay INSIDE the price column, never under the pair controls. */
body.amv-cart-page.amv-cart-classic table.shop_table.cart td.product-price,
body.amv-cart-page.amv-cart-classic table.shop_table.cart th.product-price {
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}
body.amv-cart-page.amv-cart-classic table.shop_table.cart td.product-price .woocommerce-Price-amount {
  display: inline-block !important;
  white-space: nowrap !important;
}
body.amv-cart-page.amv-cart-classic table.shop_table.cart td.product-price .amvr-unit-label {
  display: block !important;
  width: auto !important;
  margin: 5px 0 0 !important;
  color: #59615c !important;
  font: 600 11px/1.35 Rubik, Arial, sans-serif !important;
  white-space: normal !important;
}
@media (min-width: 761px) {
  body.amv-cart-page.amv-cart-classic table.shop_table.cart td.product-price,
  body.amv-cart-page.amv-cart-classic table.shop_table.cart th.product-price {
    width: 130px !important;
    min-width: 120px !important;
    box-sizing: border-box !important;
  }
}
