[data-add][hidden] { display: none !important; }

.shopping-quantity,
.pcard > .shopping-quantity {
  display: inline-grid;
  grid-template-columns: minmax(30px, 1fr) minmax(2ch, auto) minmax(30px, 1fr);
  align-items: stretch;
  justify-items: stretch;
  gap: 0;
  width: 118px;
  max-width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #248041;
  color: #fff;
  font: 700 16px/1 Montserrat, Arial, sans-serif;
}
.shopping-quantity button {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: 650 22px/1 system-ui, sans-serif;
}
.shopping-quantity button:disabled { opacity: .48; }
.shopping-quantity button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.shopping-quantity output {
  align-self: center;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
@media (hover: hover) {
  .shopping-quantity button:enabled:hover { background: #1a6933; }
}
.pcard > .shopping-quantity { width: 100%; border-radius: 10px; }
/* The add button's extended tap area would cover both quantity buttons here. */
.pcard > .shopping-quantity::before { content: none; }
.pcard__buy + .shopping-quantity { width: 100%; margin-top: auto; height: 44px; }
.home-spotlight-buy .shopping-quantity { height: 44px; }
.product .buybar #toCart:is([data-selection="selected"], [data-selection="pending"]) {
  background: #248041;
  color: #fff;
  opacity: 1;
}
.product .buybar #toCart[data-selection="selected"]:disabled { cursor: default; }
#toCart:is([data-selection="selected"], [data-selection="pending"]) :is(.to-cart__ico, .disc, .div) { display: none; }
.product .buybar #toCart[data-selection="pending"]::after { height: 4px; pointer-events: none; }


@media (max-width: 650px) {
  .pcard > .shopping-quantity { height: 38px; min-height: 38px; }
  .pcard__buy + .shopping-quantity, .home-spotlight-buy .shopping-quantity { height: 48px; }
}

/* Keep all shopping states in the same slot. */
.pcard.pcard--selectable > .add[data-selection="pending"] {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  height: 40px;
  font: 750 14px/1.15 Montserrat, Arial, sans-serif;
  border-radius: 10px;
  background: #248041;
}
.home-spotlight-buy :is(.to-cart, .shopping-quantity) { width: 182px; max-width: 100%; }
.home-spotlight-buy .to-cart[data-selection="pending"] { background: #248041; color: white; }
@media (max-width:650px) {
  .pcard.pcard--selectable > .add[data-selection="pending"] { height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-add][data-selection="pending"]::after {
    animation: selection-countdown 2s steps(2, end) var(--remove-delay, 0ms) both !important;
  }
}
