/* V138 PDP-T02 (PB-C012 "pdp" variant): the compact product-page quantity (Views/Shop/_V138Quantity.cshtml). PB tokens only.
   The group is 152px (3 x 48 + 2 x 4) and keeps its natural width inside a full-width buy bar; the field grows with its digits.
   Narrow / zoom: the items total wraps to its own row above the action, then the label wraps first. */
.pb138-qty { display: flex; flex-direction: column; gap: 6px; inline-size: 100%; }
.pb138-qty__row { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 8px; }
.pb138-qty__label { flex: 0 1 auto; min-inline-size: 0; font-weight: 600; font-size: 16px; color: var(--pb-color-text); overflow-wrap: anywhere; }
.pb138-qty__ctl { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; min-inline-size: 152px; }
.pb138-qty .pb138-qty__btn { box-sizing: border-box; flex: 0 0 48px; inline-size: 48px; block-size: 48px; margin: 0; padding: 0;
    display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--pb-color-border-strong, var(--pb-color-border));
    border-radius: var(--pb-radius-control, 12px); background: var(--pb-color-surface); color: var(--pb-color-text);
    font: inherit; font-size: 22px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.pb138-qty__btn:active { background: var(--pb-color-surface-subtle); }
.pb138-qty__btn:focus-visible { outline: 3px solid var(--pb-color-focus); outline-offset: 2px; }
.pb138-qty__btn[aria-disabled="true"], .pb138-qty__btn:disabled { color: var(--pb-color-text-disabled, var(--pb-color-text-muted)); background: var(--pb-color-surface-disabled, var(--pb-color-surface-subtle));
    border-style: dashed; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
    .pb138-qty__btn:not([aria-disabled="true"]):not(:disabled):hover { background: var(--pb-color-surface-subtle); }
}
.pb138-qty .pb138-qty__input { box-sizing: border-box; flex: 0 0 auto; width: 48px; inline-size: 48px; min-inline-size: 48px; max-inline-size: 8ch; block-size: 48px; min-block-size: 48px; margin: 0; padding: 0 4px;
    field-sizing: content; text-align: center; font: inherit; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums;
    color: var(--pb-color-text); background: var(--pb-color-surface-subtle, var(--pb-color-surface));
    border: 1px solid var(--pb-color-border); border-radius: var(--pb-radius-control, 12px); }
.pb138-qty .pb138-qty__input:focus { outline: 3px solid var(--pb-color-focus); outline-offset: 2px; }
.pb138-qty.is-invalid .pb138-qty__input { border: 2px solid var(--pb-danger-text, var(--pb-status-error)); }
.pb138-qty__total { flex: 1 1 auto; margin: 0; text-align: end; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--pb-color-text); }
.pb138-qty__total[hidden], .pb138-qty__err[hidden] { display: none; }
.pb138-qty__err { margin: 0; color: var(--pb-danger-text, var(--pb-status-error)); font-size: 14px; }
@media (max-width: 359px) {
    .pb138-qty__total { flex-basis: 100%; text-align: start; }
}
/* Simple sheet (Views/Shop/ProductSimple.cshtml): the field lives in the form without script, inside the sheet with script */
.pbsp-qtyhome { padding: 12px 16px; }
.pbsp-qtyhome[hidden] { display: none; }
.pbsp-qty > .pb138-qty { flex: 1 1 auto; font-weight: 400; }
