/* Override legacy inline !important rules that fixed the form at 164px. */
.product-card .product-actions {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    padding-right: 4px !important;
}

.product-card .product-actions .quick-add-form {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) !important;
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    gap: 5px !important;
}

.product-card .product-actions .small-qty {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-align: center !important;
}

.product-card .product-actions .public-cart-btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 5px !important;
    gap: 3px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
}

.product-card .product-actions .product-wa-icon-btn {
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
}

@media (max-width: 760px) {
    .product-grid .product-card .product-actions,
    .customer-product-grid .product-card .product-actions {
        gap: 4px !important;
        padding-right: 4px !important;
        overflow: visible !important;
    }

    .product-grid .product-card .product-actions .quick-add-form,
    .customer-product-grid .product-card .product-actions .quick-add-form {
        grid-template-columns: 34px minmax(0, 1fr) !important;
        gap: 4px !important;
    }

    .product-grid .product-card .product-actions .small-qty,
    .customer-product-grid .product-card .product-actions .small-qty {
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        height: 32px !important;
        min-height: 32px !important;
        font-size: 12px !important;
        font-weight: 400 !important;
    }

    .product-grid .product-card .product-actions .public-cart-btn,
    .customer-product-grid .product-card .product-actions .public-cart-btn {
        height: 32px !important;
        min-height: 32px !important;
        font-size: 10px !important;
        font-weight: 600 !important;
    }

    .product-grid .product-card .product-actions .product-wa-icon-btn,
    .customer-product-grid .product-card .product-actions .product-wa-icon-btn {
        flex-basis: 30px !important;
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        height: 32px !important;
        min-height: 32px !important;
    }
}
