/* Product card in-cart quantity stepper — keeps theme button shell, replaces inner content */

.product-card-qty {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    cursor: default;
    overflow: hidden;
    animation: none !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    box-sizing: border-box;
}

.product-card-qty::before,
.product-card-qty::after {
    display: none !important;
    content: none !important;
}

.product-card-qty__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

.product-card-qty__btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.product-card-qty__btn:active {
    transform: scale(0.92);
}

.product-card-qty__value {
    flex: 0 1 auto;
    min-width: 22px;
    padding: 0 2px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    user-select: none;
}

/* Circle / FAB cart icons → tight pill stepper (oc2, oc5, oc6) */
.add-to-cart-overlay.product-card-qty--compact,
.add-to-cart-overlay.product-card-qty--pill,
.oc6-card__btn.product-card-qty--compact {
    width: fit-content !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 34px !important;
    margin-top: 0 !important;
    padding: 0 2px !important;
    border-radius: 999px !important;
    transform: none !important;
    flex-shrink: 0;
}

.product-card-qty--compact .product-card-qty__btn,
.product-card-qty--pill .product-card-qty__btn {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px !important;
}

.product-card-qty--compact .product-card-qty__btn:hover,
.product-card-qty--pill .product-card-qty__btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* v1 / default full-width bar */
.product-card-qty--bar.add-to-cart-overlay {
    width: 100% !important;
    margin-top: auto;
    padding: 8px 6px !important;
    min-height: 42px;
    border-radius: 0 !important;
}

.product-card-qty--bar .product-card-qty__btn {
    width: 36px;
    height: 34px;
}

.product-card-qty--bar .product-card-qty__value {
    flex: 1 1 auto;
    font-size: 14px;
}

/* oc3 — full-width glass button in overlay */
.products--oc-v3 .product-card-qty--bar.oc3-card__cart-btn {
    width: 100% !important;
    margin: 0;
    padding: 8px 10px !important;
    border-radius: 12px !important;
}

.products--oc-v3 .product-card-qty--bar.oc3-card__cart-btn .product-card-qty__btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* oc2 — corner pill FAB */
.products--oc-v2 .product-card-qty--pill.oc2-card__cart-fab {
    min-height: 40px !important;
    padding: 0 2px !important;
}

.products--oc-v2 .product-card-qty--pill .product-card-qty__btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* oc6 — circle → pill */
.oc6-gallery .product-card-qty--compact.oc6-card__btn--cart {
    min-height: 34px !important;
}

.oc6-gallery .product-card-qty--compact .product-card-qty__btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* oc5 — circle → pill */
.products--oc-v5 .oc5-card__cart.product-card-qty--compact {
    width: fit-content !important;
    height: auto !important;
    min-height: 30px !important;
    border-radius: 999px !important;
}

.products--oc-v5 .product-card-qty--compact .product-card-qty__btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* oc4 — dock square buy button */
.products--oc-v4 .product-card-qty--square.oc4-card__buy {
    width: auto !important;
    min-width: 74px;
    min-height: 52px;
    padding: 4px 2px !important;
    flex-direction: row !important;
    border-radius: 14px !important;
}

.products--oc-v4 .product-card-qty--square .product-card-qty__btn {
    width: 28px;
    height: 28px;
    font-size: 16px;
    border-radius: 8px;
}

.products--oc-v4 .product-card-qty--square .product-card-qty__btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.products--oc-v4 .product-card-qty--square .product-card-qty__value {
    font-size: 12px;
    min-width: 18px;
}

/* Product page — main add-to-cart (product_info v1–v4) */
.product-page .product-actions .add-to-cart.product-card-qty,
.product-page .product-actions .product-card-qty--product-page,
.bundle-page .bundle-actions .bundle-add-to-cart.product-card-qty,
.bundle-page .bundle-actions .product-card-qty--product-page {
    flex: 1 1 auto;
    width: auto;
    min-height: 48px;
    padding: 8px 12px !important;
    cursor: default;
}

.product-info-v2 .product-actions .product-card-qty--product-page,
.product-info-v3 .product-actions .product-card-qty--product-page {
    flex: 1 1 0;
    border-radius: 14px !important;
}

/* product_info v3 mobile grid — 48px cart column (overrides generic product-page qty styles) */
@media (max-width: 992px) {
    .product-info-v3 .product-actions .add-to-cart.product-card-qty,
    .product-info-v3 .product-actions .product-card-qty.product-card-qty--product-page {
        grid-area: cart !important;
        flex: none !important;
        width: 48px !important;
        height: 48px !important;
        min-height: 48px !important;
        max-width: 48px !important;
        padding: 0 !important;
        border-radius: 12px !important;
        gap: 0 !important;
        justify-content: center !important;
        overflow: hidden;
    }

    .product-info-v3 .product-actions .product-card-qty--product-page .product-card-qty__btn {
        width: 22px !important;
        height: 48px !important;
        flex: 0 0 22px !important;
        min-width: 0 !important;
        padding: 0 !important;
        font-size: 15px !important;
        border-radius: 0 !important;
    }

    .product-info-v3 .product-actions .product-card-qty--product-page .product-card-qty__value {
        display: none !important;
    }
}

.product-info-v4 .product-actions .product-card-qty--product-page {
    width: 100% !important;
    min-height: 50px;
    border-radius: 14px !important;
}

.product-page .product-actions .product-card-qty--product-page .product-card-qty__btn,
.bundle-page .bundle-actions .product-card-qty--product-page .product-card-qty__btn {
    width: 36px;
    height: 36px;
}

.product-page .product-actions .product-card-qty--product-page .product-card-qty__btn:hover,
.bundle-page .bundle-actions .product-card-qty--product-page .product-card-qty__btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* Product page — fixed shortcut bar icon button */
.product-page .fixed-actions .add-to-cart.product-card-qty,
.product-page .fixed-actions .product-card-qty--product-fixed,
.bundle-page .fixed-actions .add-to-cart.product-card-qty,
.bundle-page .fixed-actions .product-card-qty--product-fixed {
    width: fit-content !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 40px !important;
    padding: 0 2px !important;
    border-radius: 999px !important;
    flex: 0 0 auto !important;
}

.product-page .fixed-actions .product-card-qty--product-fixed .product-card-qty__btn,
.bundle-page .fixed-actions .product-card-qty--product-fixed .product-card-qty__btn {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
}

.product-page .fixed-actions .product-card-qty--product-fixed .product-card-qty__btn:hover,
.bundle-page .fixed-actions .product-card-qty--product-fixed .product-card-qty__btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.fixed-action-bar--v2 .fixed-actions .product-card-qty--product-fixed,
.fixed-action-bar--v3 .fixed-actions .product-card-qty--product-fixed {
    border-radius: 999px !important;
}

@media (max-width: 767px) {
    /* Mobile: all versions — +/- only, no qty */
    .product-card-qty__value {
        display: none !important;
        flex: 0 0 0 !important;
        width: 0 !important;
        min-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden;
    }

    .product-card-qty {
        justify-content: center !important;
        gap: 0 !important;
    }

    .product-card-qty--bar.add-to-cart-overlay {
        padding: 10px 8px !important;
        min-height: 44px;
    }

    .product-card-qty--bar .product-card-qty__btn {
        width: 40px;
        height: 36px;
    }

    /* Compact / circle buttons: small tight pill, two buttons only */
    .add-to-cart-overlay.product-card-qty--compact,
    .add-to-cart-overlay.product-card-qty--pill,
    .oc6-card__btn.product-card-qty--compact {
        width: fit-content !important;
        min-width: 0 !important;
        max-width: fit-content !important;
        height: auto !important;
        min-height: 32px !important;
        padding: 0 !important;
        border-radius: 999px !important;
    }

    .product-card-qty--compact .product-card-qty__btn,
    .product-card-qty--pill .product-card-qty__btn {
        width: 32px !important;
        height: 32px !important;
        flex: 0 0 32px !important;
        font-size: 16px;
    }

    .products--oc-v4 .product-card-qty--square.oc4-card__buy {
        min-width: 0;
        width: fit-content !important;
        min-height: 48px;
        padding: 4px 6px !important;
    }

    .products--oc-v3 .product-card-qty--bar.oc3-card__cart-btn {
        padding: 8px 8px !important;
    }

    .product-page .fixed-actions .product-card-qty--product-fixed,
    .bundle-page .fixed-actions .product-card-qty--product-fixed {
        min-height: 36px !important;
        padding: 0 !important;
    }

    .product-page .fixed-actions .product-card-qty--product-fixed .product-card-qty__btn,
    .bundle-page .fixed-actions .product-card-qty--product-fixed .product-card-qty__btn {
        width: 34px !important;
        height: 34px !important;
        flex: 0 0 34px !important;
    }

    .product-page .product-actions .product-card-qty--product-page,
    .bundle-page .bundle-actions .product-card-qty--product-page {
        min-height: 44px;
        padding: 8px 10px !important;
    }

    .product-info-v3 .product-actions .product-card-qty--product-page {
        min-height: 48px !important;
        padding: 0 !important;
    }
}

/* oc2 — override small-screen 48px circle rule when stepper is active */
@media (max-width: 400px) {
    .products--oc-v2 .add-to-cart-overlay.oc2-card__cart-fab.product-card-qty--pill {
        width: fit-content !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 32px !important;
        padding: 0 !important;
        border-radius: 999px !important;
        justify-content: center !important;
    }
}
