/* ==========================================================================
   ADD button and − qty + stepper (behaviour: js/storefront/cart.js)
   ========================================================================== */

.cart-control {
    display: inline-flex;
}

.add-button {
    width: 66px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--color-primary);
    background: var(--color-surface);
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 3px 8px rgba(28, 21, 48, 0.12);
    cursor: pointer;
}

.add-button:hover {
    background: #FFF0F5;
}

.stepper {
    width: auto;
    min-width: 84px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    color: var(--color-on-primary);
    box-shadow: 0 4px 10px rgba(217, 30, 91, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stepper__button {
    width: 28px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.stepper__button .icon {
    width: 16px;
    height: 16px;
    stroke-width: 3;
}

.stepper__button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.stepper__qty {
    min-width: 22px;
    height: 100%;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    cursor: pointer;
}

/* Small ▾ after the number: it can be tapped to choose how many */
.stepper__caret {
    width: 10px;
    height: 10px;
    stroke-width: 3;
    opacity: 0.85;
}

/* Holding + or − repeats: no text selection or phone menu on a long press */
.stepper__button,
.stepper__qty {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

.add-button[hidden],
.stepper[hidden] {
    display: none;
}

/* Large version: bottom bar of the product page */
.cart-control--large .add-button {
    width: 160px;
    height: 50px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-size: 16px;
    box-shadow: 0 6px 14px rgba(217, 30, 91, 0.30);
}

.cart-control--large .add-button:hover {
    background: var(--color-primary-dark);
}

.cart-control--large .stepper {
    width: auto;
    min-width: 160px;
    height: 50px;
    border-radius: var(--radius-md);
}

.cart-control--large .stepper__button {
    width: 50px;
    height: 50px;
}

.cart-control--large .stepper__button .icon {
    width: 20px;
    height: 20px;
}

.cart-control--large .stepper__qty {
    font-size: 18px;
}

.cart-control--large .stepper__caret {
    width: 12px;
    height: 12px;
}

/* "In Pickup cart − 1 +": the product went to another type's cart (purple, not this cart's pink) */
.cart-elsewhere {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.cart-elsewhere[hidden] {
    display: none;
}

.cart-elsewhere__label {
    padding: 2px 6px;
    border-radius: 6px;
    background: #F1ECFB;
    color: #5B21B6;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.stepper--elsewhere {
    background: #5B21B6;
    box-shadow: 0 4px 10px rgba(91, 33, 182, 0.30);
}

.cart-control--large .cart-elsewhere {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.cart-control--large .cart-elsewhere__label {
    font-size: 12px;
    padding: 4px 8px;
}

.add-button[hidden] {
    display: none;
}
