/* Foxtrot Mike — Cart (mockup 04). */

/* ========== Cart (mockup 04) ========== */
/* index.php also wraps Cart page — let .fm-cart own the measure (no double gutters) */
.fm-is-cart .fm-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Hide WP page title ("Cart"); cart template prints "Shopping Cart" */
.fm-is-cart .fm-content-header,
.fm-is-cart .fm-page article > h1,
.fm-is-cart .fm-page .fm-content-header h1 {
  display: none !important;
}

.fm-is-cart .fm-page > article {
  margin: 0;
}

.fm-is-cart .entry-content > *:first-child {
  margin-top: 0;
}

.fm-cart {
  width: min(100% - 3rem, var(--fm-max));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.fm-cart__title {
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.75rem;
  color: var(--fm-text);
}

.fm-cart__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 960px) {
  .fm-cart__layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 2.5rem 3rem;
  }
}

.fm-cart__main {
  min-width: 0;
}

.fm-cart__form {
  margin: 0;
}

.fm-cart__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fm-cart__item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 1.25rem 1.5rem;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--fm-border);
}

.fm-cart__item:first-child {
  padding-top: 0;
}

.fm-cart__thumb {
  width: 160px;
  max-width: 100%;
  background: var(--fm-surface);
  border-radius: var(--fm-radius);
  border: 1px solid var(--fm-border);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fm-cart__thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.fm-cart__thumb img,
.fm-cart__thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  padding: 0;
  background: transparent;
}

.fm-cart__details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
  padding-top: 0.1rem;
}

.fm-cart__name {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fm-text);
  max-width: 100%;
}

.fm-cart__name a {
  display: inline;
  color: var(--fm-text);
  text-decoration: none;
  word-break: normal;
  overflow-wrap: anywhere;
}

.fm-cart__name a:hover {
  color: var(--fm-accent);
}

/* Clean config lines (replaces WC dl.variation floats) */
.fm-cart__meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--fm-muted);
  font-weight: 400;
}

.fm-cart__meta-label {
  color: var(--fm-muted);
  margin-right: 0.25rem;
}

.fm-cart__meta-value {
  color: var(--fm-text);
  opacity: 0.9;
}

.fm-cart__meta-sku,
.fm-cart__meta-sku .fm-cart__meta-label,
.fm-cart__meta-sku .fm-cart__meta-value {
  font-family: var(--fm-font);
  font-size: 0.75rem;
  color: var(--fm-muted);
  opacity: 1;
}

/* Kill WC default variation floats if any leak through */
.fm-cart .variation,
.fm-cart dl.variation {
  display: none !important;
}

.fm-cart__price {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fm-text);
}

.fm-cart__price .amount,
.fm-cart__price .woocommerce-Price-amount {
  color: var(--fm-text);
}

/* Qty steppers — shared look with PDP */
.fm-cart__qty .quantity {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
  background: transparent;
  overflow: hidden;
  width: fit-content;
  margin: 0.35rem 0 0 !important;
}

.fm-cart__qty .quantity .qty,
.fm-cart__qty .quantity input.qty {
  width: 2.5rem !important;
  min-width: 2.5rem;
  height: 2.75rem;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-left: 1px solid var(--fm-border) !important;
  border-right: 1px solid var(--fm-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--fm-text) !important;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  -moz-appearance: textfield;
  appearance: textfield;
}

.fm-cart__qty .quantity .qty::-webkit-outer-spin-button,
.fm-cart__qty .quantity .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.fm-cart__qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fm-text);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.fm-cart__qty-btn:hover {
  background: var(--fm-surface);
  color: var(--fm-text);
}

.fm-cart__qty-btn:focus-visible {
  outline: 2px solid var(--fm-accent);
  outline-offset: -2px;
}

.fm-cart__remove {
  margin-top: 0.25rem;
}

/* Remove: muted text link, 44px tap target. */
.fm-cart__remove-link,
.fm-cart__remove a,
.fm-cart__remove a.remove {
  display: inline-flex !important;
  align-items: center;
  position: static !important;
  min-height: 44px;
  min-width: 44px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--fm-muted) !important;
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  text-decoration: underline !important;
  text-underline-offset: 0.2em;
  text-indent: 0 !important;
  width: auto !important;
  height: auto !important;
  line-height: 1.2 !important;
}

.fm-cart__remove-link:hover,
.fm-cart__remove a:hover,
.fm-cart__remove a.remove:hover {
  color: var(--fm-text) !important;
  background: transparent !important;
}

.fm-cart__remove-link:focus-visible,
.fm-cart__remove a:focus-visible {
  outline: 2px solid var(--fm-accent);
  outline-offset: 2px;
}

/* Line total: right column, tabular. */
.fm-cart__line-total {
  justify-self: end;
  text-align: right;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--fm-text);
}

.fm-cart__line-total .amount {
  color: var(--fm-text);
}

.fm-cart__price {
  font-variant-numeric: tabular-nums;
}

/* update_cart only — WC coupon stays off the line-item form */
.fm-cart__actions {
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
}

.fm-cart__actions .coupon,
.fm-cart__actions .fm-cart__coupon {
  display: none !important;
}

.fm-cart__promo {
  margin: 0 0 1rem;
  padding: 0;
}

/* Collapsed by default: a text link that opens the input + Apply on one row. */
.fm-cart__promo-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fm-muted);
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  list-style: none;
}

.fm-cart__promo-toggle::-webkit-details-marker {
  display: none;
}

.fm-cart__promo-toggle:hover,
.fm-cart__promo[open] .fm-cart__promo-toggle {
  color: var(--fm-text);
}

.fm-cart__promo[open] .fm-cart__promo-form {
  margin-top: 0.25rem;
}

.fm-cart__promo-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.fm-cart__promo-row .input-text,
.fm-cart__promo-row input[type="text"] {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  background: var(--fm-surface);
  color: var(--fm-text);
  font: inherit;
}

.fm-cart__promo-row .input-text::placeholder,
.fm-cart__promo-row input[type="text"]::placeholder {
  color: var(--fm-muted);
}

.fm-cart__promo-row .input-text:focus,
.fm-cart__promo-row input[type="text"]:focus {
  outline: 2px solid var(--fm-accent);
  outline-offset: 1px;
  border-color: var(--fm-accent);
}

.fm-cart__promo-apply {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  min-height: 2.75rem;
  font-size: 0.875rem;
}


.fm-cart-js .fm-cart__update {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Order summary sticky card */
.fm-cart__summary {
  position: relative;
  min-width: 0;
  width: 100%;
}

@media (min-width: 960px) {
  .fm-cart__summary {
    position: sticky;
    top: var(--fm-chrome-h);
  }
}

/* Harden cart against WC table styles + page content constraints */
.fm-cart table.shop_table {
  display: none !important;
}

.fm-is-cart .entry-content {
  max-width: none;
  width: 100%;
}

.fm-cart__summary-card {
  background: var(--fm-bg-elevated);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
  padding: 1.5rem 1.4rem 1.35rem;
  box-shadow: 0 8px 28px color-mix(in srgb, var(--fm-bg) 60%, transparent);
}

.fm-cart__summary-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1.35rem;
  color: var(--fm-text);
  letter-spacing: -0.01em;
}

.fm-cart__summary-rows {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0 0 1.35rem;
}

.fm-cart__summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fm-text);
  margin: 0;
}

.fm-cart__summary-row--total {
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--fm-border);
  font-size: 1.15rem;
  font-weight: 700;
}

.fm-cart__summary-shipping {
  color: var(--fm-success);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.fm-cart__summary-muted {
  color: var(--fm-muted);
  font-weight: 500;
  text-align: right;
}

.fm-cart__ship-nudge {
  color: var(--fm-text);
  font-weight: 600;
  text-align: right;
}

.fm-cart__ship-meter {
  height: 4px;
  margin-top: 0.45rem;
  background: var(--fm-border);
  border-radius: 999px;
  overflow: hidden;
}

.fm-cart__ship-meter > span {
  display: block;
  height: 100%;
  width: var(--fm-ship-fill, 0%);
  background: var(--fm-success);
  border-radius: inherit;
}

.fm-cart__summary-amount .amount,
.fm-cart__summary-amount .woocommerce-Price-amount {
  font-weight: 600;
  color: var(--fm-text);
}

.fm-cart__summary-row--total .amount,
.fm-cart__summary-row--total .woocommerce-Price-amount {
  font-weight: 700;
}

.fm-cart__summary-row--total small,
.fm-cart__summary-row--total .includes_tax {
  display: none;
}

.fm-cart__summary-row .woocommerce-remove-coupon {
  margin-left: 0.35rem;
  color: var(--fm-muted);
  text-decoration: none;
  font-size: 0.8rem;
}

.fm-cart__summary-row .woocommerce-remove-coupon:hover {
  color: var(--fm-accent);
}

.fm-cart__summary-checkout {
  margin: 0 0 1rem;
}

.fm-cart__checkout,
.fm-cart__summary a.checkout-button,
.fm-cart__summary .checkout-button.button {
  display: flex !important;
  width: 100% !important;
  justify-content: center;
  align-items: center;
  padding: 0.95rem 1.25rem !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  background: var(--fm-accent) !important;
  color: var(--fm-text) !important;
  border: 0 !important;
  border-radius: var(--fm-radius-sm) !important;
  text-decoration: none !important;
  text-align: center;
}

.fm-cart__checkout:hover,
.fm-cart__summary a.checkout-button:hover {
  background: var(--fm-accent-hover) !important;
  color: var(--fm-text) !important;
}

.fm-cart__ffl-note {
  margin: 0.85rem 0 0;
  color: var(--fm-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.fm-cart__continue {
  margin: 0.85rem 0 0;
}

.fm-cart__continue a {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 0.8rem 1.25rem;
  border: 1px solid var(--fm-border-control);
  border-radius: var(--fm-radius-sm);
  background: transparent;
  color: var(--fm-text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.fm-cart__continue a:hover {
  border-color: var(--fm-text);
  background: var(--fm-surface);
  color: var(--fm-text);
}

/* Empty cart */
.fm-cart--empty {
  padding-bottom: 5rem;
}

.fm-cart__empty-panel {
  max-width: 28rem;
  margin: 0.5rem 0 0;
  padding: 2rem 1.75rem;
  background: var(--fm-bg-elevated);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius);
}

.fm-cart__empty-lead {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--fm-text);
}

.fm-cart__empty-copy {
  margin: 0 0 1.35rem;
  color: var(--fm-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.fm-cart__empty-cta {
  margin: 0;
}

.fm-cart__empty-cta .button,
.fm-cart__empty-cta .fm-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.fm-cart--empty .fm-related {
  margin-top: 2.5rem;
  max-width: none;
}

.fm-cart--empty .fm-related__grid,
.fm-cart--empty .fm-related ul.products {
  grid-template-columns: 1fr;
}

/* Phone: same swipe row as the PDP "You may also like" rail. */
@media (max-width: 599px) {
  .fm-cart--empty .fm-related__grid,
  .fm-cart--empty .fm-related ul.products {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.75rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--fm-border) transparent;
    width: 100%;
    max-width: 100%;
  }

  .fm-cart--empty .fm-related ul.products::-webkit-scrollbar {
    height: 6px;
  }

  .fm-cart--empty .fm-related ul.products::-webkit-scrollbar-thumb {
    background: var(--fm-border);
    border-radius: 999px;
  }

  .fm-cart--empty .fm-related ul.products > li.product {
    flex: 0 0 78%;
    width: 78% !important;
    max-width: 78%;
    min-width: 0;
    scroll-snap-align: start;
  }

  .fm-cart--empty .fm-related .fm-card__title {
    height: 2.6em;
    line-height: 1.3;
    overflow: hidden;
  }

  .fm-cart--empty .fm-related .fm-card__title a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .fm-cart--empty .fm-related .fm-card:hover {
    transform: none;
  }
}

@media (min-width: 600px) {
  .fm-cart--empty .fm-related__grid,
  .fm-cart--empty .fm-related ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .fm-cart--empty .fm-related__grid,
  .fm-cart--empty .fm-related ul.products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Cart notices wrapper measure */
.woocommerce-cart .woocommerce-notices-wrapper,
.fm-is-cart .woocommerce-notices-wrapper {
  width: min(100% - 3rem, var(--fm-max));
  margin-inline: auto;
  margin-bottom: 1rem;
}

/* Same 2rem the cart title uses under the header, above and below the notice. */
.woocommerce-cart .woocommerce-notices-wrapper:has(.fm-notice, .woocommerce-message, .woocommerce-info, .woocommerce-error),
.fm-is-cart .woocommerce-notices-wrapper:has(.fm-notice, .woocommerce-message, .woocommerce-info, .woocommerce-error) {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.woocommerce-cart .woocommerce-notices-wrapper:has(.fm-notice, .woocommerce-message, .woocommerce-info, .woocommerce-error) + .fm-cart,
.fm-is-cart .woocommerce-notices-wrapper:has(.fm-notice, .woocommerce-message, .woocommerce-info, .woocommerce-error) + .fm-cart {
  padding-top: 0;
}

@media (max-width: 699px) {
  .fm-cart__item {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 0.75rem;
  }

  .fm-cart__thumb {
    width: 88px;
  }
}

/* WooCommerce backorder notice on a cart line (only for "allow, but notify" products). */
.fm-cart__details .backorder_notification {
  margin: 0.25rem 0 0;
  color: var(--fm-muted);
  font-size: 0.8125rem;
}

/* FBT bundle price on a cart line (1.12.65): muted note, struck regular price, bundle price. */
.fm-cart__bundle {
  display: block;
  margin: 0 0 0.25rem;
  color: var(--fm-muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.fm-cart__price del,
.fm-cart__price del .amount,
.fm-cart__price del .woocommerce-Price-amount {
  color: var(--fm-muted);
  font-weight: 400;
}

.fm-cart__price del {
  margin-right: 0.25rem;
}

.fm-cart__price ins {
  text-decoration: none;
}

/* 1.12.70: line where only some units get the bundle price: "1 × $59.00 ISU-9 bundle · 1 × $69.00". */
.fm-cart__split {
  display: block;
}

.fm-cart__split-part {
  white-space: nowrap;
}

.fm-cart__split-note,
.fm-cart__split-sep {
  color: var(--fm-muted);
  font-size: 0.875rem;
  font-weight: 400;
}

/* Narrow lines: one part per line, no leading separator. */
@media (max-width: 699px) {
  .fm-cart__split-part {
    display: block;
  }

  .fm-cart__split-sep {
    display: none;
  }
}

/* ========== 1.12.95: live cart (assets/js/cart-live.js) ========== */

/* No-JS fallback only: a ghost button, so Checkout stays the one red primary. base.css styles .button with !important. */
html:not(.fm-cart-js) button.button.fm-cart__update {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 1rem;
  padding: 0 1rem !important;
  border: 1px solid var(--fm-border) !important;
  border-radius: var(--fm-radius-sm);
  background: transparent !important;
  color: var(--fm-text) !important;
  font-family: var(--fm-font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

html:not(.fm-cart-js) button.button.fm-cart__update:hover {
  background: var(--fm-surface) !important;
}

.fm-cart__item,
.fm-cart__removed {
  transition: opacity 0.14s ease;
}

.fm-cart__item:focus {
  outline: none;
}

.fm-cart__item:focus-visible {
  outline: 2px solid var(--fm-accent);
  outline-offset: 4px;
  border-radius: var(--fm-radius-sm);
}

/* Remove sent: the line dims until the server answers, then fades and collapses. */
.fm-cart__item.is-removing {
  opacity: 0.5;
  pointer-events: none;
}

.fm-cart__item.is-leaving,
.fm-cart__removed.is-leaving {
  opacity: 0;
}

.fm-cart__item > *,
.fm-cart__removed > * {
  transition: opacity 0.2s ease 0.06s;
}

.fm-cart__item.is-entering > *,
.fm-cart__removed.is-entering > * {
  opacity: 0;
}

/* Slim "<Product> removed · Undo" line in place of the item. */
.fm-cart__removed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--fm-border);
}

.fm-cart__items > .fm-cart__removed:first-child {
  padding-top: 0;
}

.fm-cart__removed-text {
  margin: 0;
  min-width: 0;
  color: var(--fm-muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.fm-cart__removed-name {
  color: var(--fm-text);
  font-weight: 600;
}

.fm-cart__undo {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: -0.5rem;
  padding: 0 0.5rem;
  border: 0;
  border-radius: var(--fm-radius-sm);
  background: transparent;
  color: var(--fm-text);
  font-family: var(--fm-font);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.fm-cart__undo:hover {
  color: var(--fm-accent);
}

.fm-cart__undo:focus-visible {
  outline: 2px solid var(--fm-accent);
  outline-offset: 0;
}

.fm-cart__removed.is-pending {
  opacity: 0.55;
}

.fm-cart__removed.is-pending .fm-cart__undo {
  pointer-events: none;
}

.fm-cart__removed .fm-cart__error {
  flex-basis: 100%;
}

.fm-cart__removed:has(.fm-cart__error) {
  flex-wrap: wrap;
}

/* Empty state after the last line went: the removed line(s) above the panel, still undoable. */
.fm-cart__removed-list {
  list-style: none;
  max-width: 28rem;
  margin: 0 0 1rem;
  padding: 0;
}

.fm-cart__removed-list .fm-cart__removed:first-child {
  border-top: 0;
}

/* Qty change on its way: that line only. */
.fm-cart__qty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fm-cart__item.is-updating .fm-cart__qty::after {
  content: "";
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-top: 0.35rem;
  box-sizing: border-box;
  border: 2px solid var(--fm-muted);
  border-right-color: transparent;
  border-radius: 50%;
  animation: fm-card-spin 0.7s linear infinite;
}

.fm-cart__item .fm-cart__price,
.fm-cart__item .fm-cart__line-total {
  transition: opacity 0.15s ease;
}

.fm-cart__item.is-updating .fm-cart__price,
.fm-cart__item.is-updating .fm-cart__line-total {
  opacity: 0.45;
}

.fm-cart__error {
  margin-top: 0.25rem;
}

/* Totals keep the old numbers, dimmed, until WooCommerce answers. */
.cart_totals .fm-totals__value,
.cart_totals .fm-totals__nudge,
.cart_totals .fm-totals__note {
  transition: opacity 0.15s ease;
}

.cart_totals.is-pending .fm-totals__value,
.cart_totals.is-pending .fm-totals__nudge,
.cart_totals.is-pending .fm-totals__meter,
.cart_totals.is-pending .fm-totals__note {
  opacity: 0.45;
}

.fm-cart__checkout[aria-busy="true"] {
  cursor: progress;
}

/* WooCommerce notices on the cart (no-JS removed line, coupon messages, stock errors): site styling,
   no green frame, no "Undo?" pill. */
.fm-is-cart .woocommerce-notices-wrapper .fm-notice,
.fm-is-cart .woocommerce-notices-wrapper .woocommerce-message,
.fm-is-cart .woocommerce-notices-wrapper .woocommerce-info,
.fm-is-cart .woocommerce-notices-wrapper .woocommerce-error {
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.5rem;
  padding: 0.5rem 1rem;
  min-height: 44px;
  box-sizing: border-box;
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-sm);
  box-shadow: none;
  font-size: 0.875rem;
}

.fm-is-cart .woocommerce-notices-wrapper .woocommerce-error {
  border-left: 2px solid var(--fm-accent);
}

.fm-is-cart .woocommerce-notices-wrapper .fm-notice:last-child,
.fm-is-cart .woocommerce-notices-wrapper .woocommerce-message:last-child,
.fm-is-cart .woocommerce-notices-wrapper .woocommerce-info:last-child,
.fm-is-cart .woocommerce-notices-wrapper .woocommerce-error:last-child {
  margin-bottom: 0;
}

.fm-is-cart .woocommerce-notices-wrapper .fm-notice--success .fm-notice__icon,
.fm-is-cart .woocommerce-notices-wrapper .woocommerce-message .fm-notice__icon,
.fm-is-cart .woocommerce-notices-wrapper .woocommerce-info .fm-notice__icon {
  display: none;
}

.fm-is-cart .woocommerce-notices-wrapper .woocommerce-error .fm-notice__icon {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.75rem;
}

.fm-is-cart .woocommerce-notices-wrapper .fm-notice__body {
  gap: 0.25rem 0.5rem;
}

.fm-is-cart .woocommerce-notices-wrapper a,
.fm-is-cart .woocommerce-notices-wrapper a.restore-item,
.fm-is-cart .woocommerce-notices-wrapper .woocommerce-message a[href*="undo_item"] {
  display: inline-flex;
  align-items: center;
  height: auto;
  min-height: 44px;
  margin: -0.5rem 0;
  padding: 0 0.25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--fm-text);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.fm-is-cart .woocommerce-notices-wrapper a:hover,
.fm-is-cart .woocommerce-notices-wrapper a.restore-item:hover,
.fm-is-cart .woocommerce-notices-wrapper .woocommerce-message a[href*="undo_item"]:hover {
  background: transparent;
  color: var(--fm-accent);
  border: 0;
}

/* Same 2rem as before above the notices, a little less below (they are slim now). */
.woocommerce-cart .woocommerce-notices-wrapper:has(.fm-notice, .woocommerce-message, .woocommerce-info, .woocommerce-error),
.fm-is-cart .woocommerce-notices-wrapper:has(.fm-notice, .woocommerce-message, .woocommerce-info, .woocommerce-error) {
  margin-bottom: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .fm-cart__item,
  .fm-cart__removed,
  .fm-cart__item > *,
  .fm-cart__removed > *,
  .cart_totals .fm-totals__value {
    transition: none;
  }

  .fm-cart__item.is-updating .fm-cart__qty::after {
    animation-duration: 1.6s;
  }
}

/* 1.12.96: coupon Apply error, under the field (cart-live.js). */
.fm-cart__promo-error {
  margin: 0.5rem 0 0;
}
