/*
 * Mengen-Buttons: Minus/Plus am Mengenfeld. Größe und Farben als
 * CSS-Variablen aus den Einstellungen (Inline-Style).
 */

.woocommerce .quantity:has(.sit-qty-btn) {
    display: inline-flex;
    align-items: stretch;
    gap: 6px;
    vertical-align: middle;
}

/* Feld ohne Pfeile, gleiche Höhe wie die Buttons */
.woocommerce .quantity:has(.sit-qty-btn) input.qty {
    height: var(--sit-qty-size, 40px);
    min-height: 0;
    width: 3.2em;
    margin: 0;
    padding: 0 4px;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.woocommerce .quantity:has(.sit-qty-btn) input.qty::-webkit-outer-spin-button,
.woocommerce .quantity:has(.sit-qty-btn) input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Buttons – gegen Button-Stile von Theme/Pagebuilder abgesichert */
.woocommerce .quantity .sit-qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: var(--sit-qty-size, 40px);
    height: var(--sit-qty-size, 40px);
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid var(--sit-qty-border, #ccc);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--sit-qty-color, currentColor);
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.woocommerce .quantity .sit-qty-btn:hover,
.woocommerce .quantity .sit-qty-btn:focus-visible {
    background: rgba(0, 0, 0, 0.05);
    color: var(--sit-qty-color, currentColor);
}

.woocommerce .quantity .sit-qty-btn:disabled {
    opacity: 0.3;
    cursor: default;
    background: transparent;
}

.woocommerce .quantity .sit-qty-btn svg {
    width: 45%;
    height: 45%;
    fill: currentColor;
}

/* Feste Menge (z.B. „Nur einzeln verkaufen“): keine Buttons */
.woocommerce .quantity:has(input[type="hidden"]) .sit-qty-btn {
    display: none;
}
