/* v522 Customer item quantity stepper visibility and hit-area repair.
   The number input has a large intrinsic min-content width in CSS Grid.
   Without minmax(0,1fr) and min-width:0 it pushes the + button outside
   the 130px desktop stepper, where overflow:hidden clips it. */

.shop-page #item-modal .modal-bottom > * {
  min-width: 0;
  max-width: 100%;
}

.shop-page #item-modal .qty-stepper {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  isolation: isolate;
}

.shop-page #item-modal .qty-stepper > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.shop-page #item-modal .qty-stepper button {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 40px;
  min-height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  z-index: 1;
}

.shop-page #item-modal .qty-stepper input[type="number"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-left: 1px solid var(--line, #e5e7eb);
  border-right: 1px solid var(--line, #e5e7eb);
  border-radius: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
  background: #fff;
}

.shop-page #item-modal .qty-stepper input[type="number"]::-webkit-inner-spin-button,
.shop-page #item-modal .qty-stepper input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.shop-page #item-modal .qty-stepper button:focus-visible,
.shop-page #item-modal .qty-stepper input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand, #f97316) 38%, transparent);
  outline-offset: -3px;
}

@media (max-width: 720px) {
  .shop-page #item-modal .qty-stepper {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    min-height: 54px;
  }

  .shop-page #item-modal .qty-stepper button {
    min-width: 52px;
    min-height: 54px;
    font-size: 24px;
  }

  .shop-page #item-modal .qty-stepper input[type="number"] {
    min-height: 54px;
    font-size: 18px !important;
    font-weight: 900;
  }
}
