/* ==========================================================
   QUANTITY INPUT
   ========================================================== */
.sl-quantity {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    min-height: 48px;
    overflow: hidden;
    border: 1px solid var(--sl-sand);
    border-radius: 12px;
    background: var(--sl-white);
}

.sl-quantity--locked {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--sl-sand);
    border-radius: 12px;
    background: var(--sl-cream);
    color: var(--sl-charcoal);
    font-size: 15px;
    font-weight: 700;
}

.sl-quantity-fixed-value { line-height: 1; }

.sl-qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    min-width: 46px;
    padding: 0;
    border: 0;
    background: var(--sl-cream);
    color: var(--sl-charcoal);
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.sl-qty-btn:hover,
.sl-qty-btn:focus-visible {
    background: var(--sl-sand);
    outline-offset: 2px;
}

.sl-qty-btn:active { opacity: 0.88; }

.sl-quantity .qty,
.sl-quantity input.qty,
.woocommerce .quantity .qty {
    width: 64px;
    min-width: 64px;
    height: 48px;
    padding: 0 8px;
    border: 0 !important;
    border-right: 1px solid var(--sl-sand) !important;
    border-left: 1px solid var(--sl-sand) !important;
    border-radius: 0 !important;
    background: var(--sl-white);
    box-shadow: none !important;
    color: var(--sl-charcoal);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.sl-quantity input[type="number"]::-webkit-outer-spin-button,
.sl-quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

@media (max-width: 767px) {
    .sl-quantity {
        min-height: 46px;
        border-radius: 10px;
    }

    .sl-qty-btn {
        width: 44px;
        min-width: 44px;
        font-size: 18px;
    }

    .sl-quantity .qty,
    .sl-quantity input.qty,
    .woocommerce .quantity .qty {
        width: 58px;
        min-width: 58px;
        height: 46px;
    }
}



/* ==========================================================
   PHASE 1 PDP QUANTITY POLISH
   ========================================================== */
.sl-quantity {
    box-shadow: 0 1px 2px rgba(30,28,26,0.03);
}

.sl-qty-btn {
    font-weight: 500;
}

@media (max-width: 767px) {
    .sl-quantity {
        min-height: 52px;
        border-radius: 14px;
    }

    .sl-quantity .qty,
    .sl-quantity input.qty,
    .woocommerce .quantity .qty {
        height: 52px;
    }
}


/* ==========================================================
   PHASE 2 PDP QUANTITY STEPPER REBUILD
   - stronger connected shell on single product mobile
   ========================================================== */
.woocommerce div.product form.cart .quantity,
.woocommerce div.product form.cart .sl-quantity {
    width: 100%;
    max-width: none;
}

@media (max-width: 767px) {
    .woocommerce div.product form.cart .quantity,
    .woocommerce div.product form.cart .sl-quantity {
        display: grid !important;
        grid-template-columns: 54px minmax(0, 1fr) 54px !important;
        align-items: stretch;
        width: 100%;
        min-height: 56px;
        border: 1px solid rgba(214, 204, 190, 0.95);
        border-radius: 18px;
        overflow: hidden;
        background: var(--sl-white);
        box-shadow: 0 6px 16px rgba(30, 28, 26, 0.04);
    }

    .woocommerce div.product form.cart .sl-qty-btn {
        width: 54px;
        min-width: 54px;
        height: 56px;
        border: 0;
        background: rgba(247, 245, 239, 0.9);
        color: var(--sl-charcoal);
        font-size: 24px;
        font-weight: 500;
        line-height: 1;
    }

    .woocommerce div.product form.cart .sl-qty-minus {
        border-right: 1px solid rgba(214, 204, 190, 0.95);
    }

    .woocommerce div.product form.cart .sl-qty-plus {
        border-left: 1px solid rgba(214, 204, 190, 0.95);
    }

    .woocommerce div.product form.cart .sl-quantity .qty,
    .woocommerce div.product form.cart .sl-quantity input.qty,
    .woocommerce div.product form.cart .quantity .qty,
    .woocommerce div.product form.cart .quantity input.qty {
        width: 100%;
        min-width: 0;
        height: 56px;
        padding: 0 10px;
        border: 0 !important;
        border-radius: 0 !important;
        background: var(--sl-white);
        box-shadow: none !important;
        font-size: 20px;
        font-weight: 700;
        text-align: center;
    }
}
