.cpod-quantity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
}

.cpod-qty-label {
  margin: 0 !important;
  font-size: 11px;
  font-weight: 600;
}

.cpod-qty-stepper {
  display: inline-grid;
  grid-template-columns: 30px auto 30px;
  align-items: center;
  gap: 0;
  height: 32px;
  border: 1px solid #a3a3a3;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.cpod-qty-btn {
  width: 30px;
  height: 32px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #000;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.cpod-qty-stepper .cpod-qty-btn {
  background: #fff;
}

.cpod-qty-stepper .cpod-qty-btn:hover {
  background: #f0f0f0;
}

.cpod-qty-btn:active {
  background: #b8b8b8;
}

.cpod-qty-input {
  width: 56px;
  min-width: 56px;
  max-width: 120px;
  height: 32px;
  border: 0;
  border-left: 1px solid #a3a3a3;
  border-right: 1px solid #a3a3a3;
  background: #fff;
  color: #000;
  padding: 0 4px;
  font: inherit;
  text-align: center;
  box-sizing: border-box;
}

.cpod-qty-select {
  width: auto;
  min-width: 70px;
  height: 32px;
  border: 1px solid #a3a3a3;
  background: #fff;
  color: #000;
  padding: 0 8px;
  font: inherit;
}

.cpod-qty-dropdown {
  position: relative;
  min-width: 70px;
}

.cpod-qty-dropdown__trigger,
.cpod-qty-dropdown__option {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #a3a3a3;
  background: #fff;
  color: #000;
  font: inherit;
  cursor: pointer;
}

.cpod-qty-dropdown__trigger {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 5px 9px;
  border-radius: 6px;
  text-align: left;
}

.cpod-qty-dropdown__trigger::after {
  content: '⌄';
  font-size: 14px;
}

/* Keep the closed control compact; prices remain visible in the option list. */
.cpod-qty-dropdown__trigger [data-cpod-qty-selected-price] {
  display: none;
}

.cpod-qty-dropdown__menu {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  width: max-content;
  min-width: 170px;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  z-index: 20;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #a3a3a3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
}

.cpod-qty-dropdown.is-align-right .cpod-qty-dropdown__menu {
  left: auto;
  right: 0;
}

.cpod-qty-dropdown__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 8px;
  border: 0;
  border-radius: 4px;
  text-align: left;
}

.cpod-qty-dropdown__option:hover,
.cpod-qty-dropdown__option[aria-selected="true"] {
  background: #f0f0f0;
}

.cpod-qty-dropdown__price {
  white-space: nowrap;
  font-weight: 600;
}

.cpod-qty-dropdown__price del,
.cpod-qty-dropdown__price ins {
  color: inherit;
}

.cpod-price-quantity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
}

.cpod-price-quantity .cpod-qty-label {
  margin: 0 !important;
  font-size: 11px;
  font-weight: 600;
}

.cpod-price-quantity .cpod-qty-stepper {
  display: block;
  height: auto;
  border: 0;
  overflow: visible;
  background: transparent;
}

.cpod-price-quantity__select {
  min-width: 70px;
  height: 32px;
  border: 1px solid #a3a3a3;
  background: #fff;
  color: #000;
  padding: 0 8px;
  font: inherit;
}

.cpod-qty-input::-webkit-outer-spin-button,
.cpod-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cpod-qty-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.cpod-qty-input:focus {
  outline: 0;
  border-color: #000;
}

.cpod-qty-input.is-cpod-qty-editing {
  background: #fff7d6;
  color: #3b2f00;
}

.cpod-qty-hint {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 2;
  box-sizing: border-box;
  width: max-content;
  max-width: min(220px, calc(100vw - 24px));
  padding: 3px 6px;
  border: 1px solid #d6b45a;
  border-radius: 4px;
  background: #fff8df;
  color: #4c3a05;
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: break-word;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.cpod-qty-hint[hidden] {
  display: none;
}

.cpod-header__actions .cpod-quantity,
.cpod-header__actions .cpod-price-quantity {
  flex-wrap: nowrap;
  gap: 6px;
}

.cpod-header__actions .cpod-qty-hint {
  left: auto;
  right: 0;
  z-index: 5;
}

.cpod-actions-block .cpod-qty-wrap {
  margin-bottom: 10px;
}

@media (max-width: 480px) {
  .cpod-actions-block .cpod-qty-hint {
    position: static;
    flex-basis: 100%;
    max-width: 100%;
  }
}
