/* Release 41: single-price basket and ordered four-step checkout. */

:root {
  --muf-r41-orange: #db8d00;
  --muf-r41-mustard: #f8b83e;
  --muf-r41-green: #24824b;
  --muf-r41-orange-line: rgba(219, 141, 0, .34);
}

/* Basket: products first, then one full-width summary. */
body.muf-modern.woocommerce-cart .ops-cart-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 28px !important;
}
body.muf-modern.woocommerce-cart .ops-sidebar {
  position: static !important;
  width: 100% !important;
  max-width: none !important;
}
body.muf-modern.woocommerce-cart .ops-delivery-section,
body.muf-modern.woocommerce-cart #ops-cart-boxes,
body.muf-modern.woocommerce-cart .muf-cart-postcode,
body.muf-modern.woocommerce-cart .ops-summary > .ops-sum-row:not(.grand):not(.muf-cart-original-subtotal):not(.muf-cart-saving):not(.muf-cart-vat) {
  display: none !important;
}
body.muf-modern.woocommerce-cart .ops-summary {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: clamp(22px, 3vw, 34px) !important;
  border-top: 3px solid var(--muf-r41-mustard) !important;
}
body.muf-modern.woocommerce-cart .ops-summary > h3 {
  color: var(--muf-r41-orange) !important;
  font-size: 23px !important;
}
body.muf-modern.woocommerce-cart .ops-summary > .ops-sum-row {
  width: 100% !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  margin: 0 !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid var(--muf-r41-orange-line) !important;
}
body.muf-modern.woocommerce-cart .ops-summary > .muf-cart-original-subtotal { order: 1 !important; }
body.muf-modern.woocommerce-cart .ops-summary > .muf-cart-saving { order: 2 !important; }
body.muf-modern.woocommerce-cart .ops-summary > .muf-cart-vat { order: 3 !important; }
body.muf-modern.woocommerce-cart .ops-summary > .ops-sum-row.grand { order: 4 !important; }
body.muf-modern.woocommerce-cart .ops-summary > .muf-cart-coupon-label { order: 5 !important; }
body.muf-modern.woocommerce-cart .ops-summary > .ops-coupon-row { order: 6 !important; }
body.muf-modern.woocommerce-cart .ops-summary > .ops-checkout-btn { order: 7 !important; }
body.muf-modern.woocommerce-cart .ops-summary > .muf-cart-assurances { order: 8 !important; }
body.muf-modern.woocommerce-cart .ops-summary .ops-sum-row > :last-child,
body.muf-modern.woocommerce-cart .ops-summary .ops-sum-row > :last-child .amount {
  text-align: right !important;
}
body.muf-modern.woocommerce-cart .ops-summary .ops-sum-row:not(.muf-cart-saving):not(.muf-cart-vat):not(.muf-cart-original-subtotal) > :last-child,
body.muf-modern.woocommerce-cart .ops-summary .ops-sum-row:not(.muf-cart-saving):not(.muf-cart-vat):not(.muf-cart-original-subtotal) > :last-child .amount {
  color: var(--muf-r41-orange) !important;
}
body.muf-modern.woocommerce-cart .ops-summary .muf-cart-original-subtotal > :last-child {
  color: #74776f !important;
}
body.muf-modern.woocommerce-cart .ops-summary .ops-sum-row.grand {
  margin-top: 4px !important;
  padding-top: 15px !important;
  border-top: 2px solid var(--muf-r41-orange) !important;
  border-bottom: 0 !important;
}
body.muf-modern.woocommerce-cart .ops-summary .ops-sum-row.grand > :first-child,
body.muf-modern.woocommerce-cart .ops-summary .ops-sum-row.grand > :last-child {
  color: var(--muf-r41-orange) !important;
  font-size: 23px !important;
  font-weight: 850 !important;
}
body.muf-modern.woocommerce-cart .muf-cart-coupon-label {
  border-top-color: var(--muf-r41-orange-line) !important;
}

/* One current/original price group per line item. */
body.muf-modern.woocommerce-cart .ops-cart-table tr.muf-cart-row {
  grid-template-columns: minmax(0, 1fr) 138px 116px !important;
  grid-template-rows: auto auto !important;
  column-gap: 22px !important;
  row-gap: 2px !important;
}
body.muf-modern.woocommerce-cart .muf-cart-row__product {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
body.muf-modern.woocommerce-cart .muf-cart-row__product > div {
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
}
body.muf-modern.woocommerce-cart .muf-cart-row__unit {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  justify-self: end !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 3px !important;
  color: var(--muf-r41-orange) !important;
  font-size: 17px !important;
  font-weight: 850 !important;
  text-align: right !important;
}
body.muf-modern.woocommerce-cart .muf-cart-row__unit::before { display: none !important; content: none !important; }
body.muf-modern.woocommerce-cart .muf-cart-row__unit .amount { color: inherit !important; }
body.muf-modern.woocommerce-cart .muf-cart-row__unit del {
  display: block !important;
  color: #898c86 !important;
  font-size: 12px !important;
  font-weight: 560 !important;
  line-height: 1.2 !important;
  text-decoration: line-through !important;
  text-decoration-thickness: 1.2px !important;
}
body.muf-modern.woocommerce-cart .muf-cart-row__quantity {
  grid-column: 3 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
  justify-self: end !important;
}
body.muf-modern.woocommerce-cart .ops-cart-table tr.muf-cart-row > td.muf-cart-row__total {
  display: none !important;
}
body.muf-modern.woocommerce-cart .ops-cart-table tr.muf-cart-row > td.muf-cart-row__actions {
  grid-column: 1 !important;
  grid-row: 2 !important;
  display: block !important;
  margin-left: 126px !important;
  align-self: start !important;
  position: static !important;
  inset: auto !important;
}
body.muf-modern.woocommerce-cart .muf-cart-row__actions .muf-cart-item__actions {
  margin-top: 0 !important;
}

/* Checkout: 1 contact, 2 billing, 3 fulfilment, 4 order. */
body.muf-modern.woocommerce-checkout :is(.muf-checkout-contact,.muf-checkout-billing,.muf-checkout-delivery) {
  display: block !important;
  width: 100% !important;
  margin: 0 0 15px !important;
  padding: 20px !important;
  border: 1px solid #e2dfd4 !important;
  border-top: 3px solid var(--muf-r41-mustard) !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}
body.muf-modern.woocommerce-checkout :is(.muf-checkout-contact,.muf-checkout-billing,.muf-checkout-delivery,.muf-checkout-order) > .ops-co-h3 {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 0 17px !important;
  color: var(--muf-r41-orange) !important;
  font-size: 18px !important;
  font-weight: 850 !important;
}
body.muf-modern.woocommerce-checkout :is(.muf-checkout-contact,.muf-checkout-billing,.muf-checkout-delivery,.muf-checkout-order) > .ops-co-h3::before {
  display: inline-grid !important;
  width: 27px !important;
  height: 27px !important;
  flex: 0 0 27px !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: var(--muf-r41-orange) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}
body.muf-modern.woocommerce-checkout .muf-checkout-contact > .ops-co-h3::before { content: "1" !important; }
body.muf-modern.woocommerce-checkout .muf-checkout-billing > .ops-co-h3::before { content: "2" !important; }
body.muf-modern.woocommerce-checkout .muf-checkout-delivery > .ops-co-h3::before { content: "3" !important; }
body.muf-modern.woocommerce-checkout .muf-checkout-order > .ops-co-h3::before { content: "4" !important; }

body.muf-modern.woocommerce-checkout .muf-checkout-contact__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px 14px !important;
}
body.muf-modern.woocommerce-checkout .muf-checkout-contact__grid > * { grid-column: auto !important; }
body.muf-modern.woocommerce-checkout .muf-checkout-contact__grid :is(#billing_company_field,#billing_email_field,.muf-checkout-otp,#weo-checkout-otp-wrapper,.woocommerce-account-fields) {
  grid-column: 1 / -1 !important;
}
body.muf-modern.woocommerce-checkout .muf-checkout-contact__grid .woocommerce-account-fields {
  margin-top: 2px !important;
  padding-top: 13px !important;
  border-top: 1px solid var(--muf-r41-orange-line) !important;
}
body.muf-modern.woocommerce-checkout .muf-checkout-contact__grid #account_password_field {
  width: 100% !important;
  max-width: none !important;
}

.muf-checkout-billing__fields,
body.muf-modern.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 11px 13px !important;
}
.muf-checkout-billing__fields > *,
body.muf-modern.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper > * {
  grid-column: auto !important;
  width: auto !important;
  margin: 0 !important;
}
.muf-checkout-billing__fields #billing_address_1_field { grid-column: 1 / -1 !important; }
.muf-checkout-billing__fields #billing_address_2_field { display: none !important; }
body.muf-modern.woocommerce-checkout .woocommerce-shipping-fields {
  margin-top: 17px !important;
  padding-top: 15px !important;
  border-top: 1px solid var(--muf-r41-orange-line) !important;
}
body.muf-modern.woocommerce-checkout #ship-to-different-address {
  color: var(--muf-r41-orange) !important;
  font-size: 13px !important;
}
body.muf-modern.woocommerce-checkout .shipping_address { margin-top: 13px !important; }
body.muf-modern.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper :is(#shipping_first_name_field,#shipping_last_name_field,#shipping_company_field,#shipping_address_2_field) {
  display: none !important;
}
body.muf-modern.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper #shipping_address_1_field { grid-column: 1 / -1 !important; }
.muf-checkout-additional {
  margin-top: 17px !important;
  padding-top: 15px !important;
  border-top: 1px solid var(--muf-r41-orange-line) !important;
}
.muf-checkout-additional > h4 {
  margin: 0 0 10px !important;
  color: var(--muf-r41-orange) !important;
  font-size: 14px !important;
  font-weight: 820 !important;
}
.muf-checkout-additional #order_comments_field { margin: 0 !important; }
.muf-checkout-additional textarea { min-height: 82px !important; }
body.muf-modern.woocommerce-checkout .woocommerce-billing-fields__field-wrapper:empty,
body.muf-modern.woocommerce-checkout .woocommerce-additional-fields { display: none !important; }

/* Current delivery plugin, with modern orange truck/building icons. */
.muf-delivery-choice__icon {
  display: grid !important;
  width: 32px !important;
  height: 32px !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: #fff4da !important;
  color: var(--muf-r41-orange) !important;
}
.muf-delivery-choice__icon svg {
  width: 19px !important;
  height: 19px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
body.muf-modern.woocommerce-checkout #ops-checkout-boxes .ops-method-card {
  grid-template-columns: 32px 20px minmax(0, 1fr) auto !important;
}
body.muf-modern.woocommerce-checkout #ops-checkout-boxes .ops-method-card strong {
  color: var(--muf-r41-orange) !important;
}
body.muf-modern.woocommerce-checkout #ops-checkout-boxes .ops-method-cost {
  color: var(--muf-r41-green) !important;
  font-weight: 850 !important;
}

/* Pallet options: lock the amount to the far-right edge on desktop. */
body.muf-modern.woocommerce-checkout .ops-pallet-zone-wrap .ops-zone-option {
  width: 100% !important;
  grid-template-columns: minmax(0, 1fr) !important;
}
body.muf-modern.woocommerce-checkout .ops-pallet-zone-wrap .ops-zone-option > div {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: 18px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px !important;
}
body.muf-modern.woocommerce-checkout .ops-pallet-zone-wrap .ops-zone-option > div > div {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  column-gap: 18px !important;
  align-items: start !important;
}
body.muf-modern.woocommerce-checkout .ops-pallet-zone-wrap .ops-zone-option > div > div > span:first-of-type {
  grid-column: 1 !important;
  min-width: 0 !important;
}
body.muf-modern.woocommerce-checkout .ops-pallet-zone-wrap .ops-zone-option > div > div > span:nth-of-type(2) {
  grid-column: 2 !important;
  justify-self: end !important;
  float: none !important;
  margin-left: 0 !important;
  color: var(--muf-r41-orange) !important;
  white-space: nowrap !important;
}
body.muf-modern.woocommerce-checkout .ops-pallet-zone-wrap .ops-zone-option > div > div > p {
  grid-column: 1 / -1 !important;
}

/* Order summary branding and clean price alignment. */
body.muf-modern.woocommerce-checkout .muf-checkout-order {
  border-top: 3px solid var(--muf-r41-mustard) !important;
}
body.muf-modern.woocommerce-checkout .muf-checkout-order .ops-order-table td {
  border-bottom: 1px solid var(--muf-r41-orange-line) !important;
}
body.muf-modern.woocommerce-checkout .muf-checkout-order .ops-order-table tr:not(.muf-order-shipping-row):not(.muf-order-vat-row) td:last-child,
body.muf-modern.woocommerce-checkout .muf-checkout-order .ops-order-table tr:not(.muf-order-shipping-row):not(.muf-order-vat-row) td:last-child .amount,
body.muf-modern.woocommerce-checkout .muf-checkout-order .ops-order-grand,
body.muf-modern.woocommerce-checkout .muf-checkout-order .ops-order-grand > .ops-grand-total-val .amount {
  color: var(--muf-r41-orange) !important;
}
body.muf-modern.woocommerce-checkout .muf-checkout-order .muf-order-shipping-row td,
body.muf-modern.woocommerce-checkout .muf-checkout-order .muf-order-shipping-row td .amount,
body.muf-modern.woocommerce-checkout .muf-checkout-order .ops-shipping-display,
body.muf-modern.woocommerce-checkout .muf-checkout-order .ops-shipping-display .amount {
  color: var(--muf-r41-green) !important;
}
body.muf-modern.woocommerce-checkout .muf-checkout-order .ops-order-grand {
  border-top: 2px solid var(--muf-r41-orange) !important;
}
body.muf-modern.woocommerce-checkout .muf-order-payment__title {
  border-top-color: var(--muf-r41-orange-line) !important;
  color: var(--muf-r41-orange) !important;
}

@media (max-width: 900px) {
  body.muf-modern.woocommerce-checkout .ops-co-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.muf-modern.woocommerce-checkout .ops-co-aside {
    position: static !important;
  }
}

@media (max-width: 620px) {
  /* Product, price, quantity, then save/remove: no right-edge price. */
  body.muf-modern.woocommerce-cart .ops-cart-table tr.muf-cart-row {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto !important;
    gap: 0 !important;
    padding: 18px 0 20px !important;
  }
  body.muf-modern.woocommerce-cart .muf-cart-row__product {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  body.muf-modern.woocommerce-cart .muf-cart-row__unit {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: auto !important;
    justify-self: start !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 9px !important;
    margin: 2px 0 0 98px !important;
    width: max-content !important;
    text-align: left !important;
  }
  body.muf-modern.woocommerce-cart .muf-cart-row__unit del {
    display: inline !important;
    margin-top: 0 !important;
  }
  body.muf-modern.woocommerce-cart .muf-cart-row__quantity {
    grid-column: 1 !important;
    grid-row: 3 !important;
    justify-self: center !important;
    margin: 13px 0 0 !important;
  }
  body.muf-modern.woocommerce-cart .ops-cart-table tr.muf-cart-row > td.muf-cart-row__actions {
    grid-column: 1 !important;
    grid-row: 4 !important;
    justify-self: center !important;
    margin: 15px 0 0 !important;
    position: static !important;
    inset: auto !important;
  }
  body.muf-modern.woocommerce-cart .muf-cart-row__actions .muf-cart-item__actions {
    justify-content: center !important;
  }
  body.muf-modern.woocommerce-cart .ops-summary {
    padding: 20px 17px !important;
  }
  body.muf-modern.woocommerce-cart .ops-summary > .ops-sum-row {
    gap: 12px !important;
  }
  body.muf-modern.woocommerce-cart .ops-summary .ops-sum-row.grand > :first-child,
  body.muf-modern.woocommerce-cart .ops-summary .ops-sum-row.grand > :last-child {
    font-size: 20px !important;
  }

  body.muf-modern.woocommerce-checkout :is(.muf-checkout-contact,.muf-checkout-billing,.muf-checkout-delivery,.muf-checkout-order) {
    padding: 15px !important;
  }
  body.muf-modern.woocommerce-checkout .muf-checkout-contact__grid,
  .muf-checkout-billing__fields,
  body.muf-modern.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.muf-modern.woocommerce-checkout .muf-checkout-contact__grid > *,
  .muf-checkout-billing__fields > *,
  body.muf-modern.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper > * {
    grid-column: 1 !important;
  }
  body.muf-modern.woocommerce-checkout #ops-checkout-boxes .ops-method-card {
    grid-template-columns: 32px 20px minmax(0, 1fr) auto !important;
  }
  body.muf-modern.woocommerce-checkout .ops-pallet-zone-wrap .ops-zone-option > div > div {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.muf-modern.woocommerce-checkout .ops-pallet-zone-wrap .ops-zone-option > div > div > span:nth-of-type(2) {
    grid-column: 1 !important;
    justify-self: start !important;
    margin-top: 4px !important;
  }
}
