/* ============================================================
   Fakhra cart-aware stepper
   - Shop loop: swap "Add to cart" <a> for the stepper when in cart
   - Cart page: hide "Update cart" (JS auto-submits)
   - PDP: stepper is injected by JS; styling here keeps it consistent
   ============================================================ */

/* --- Shop loop card -------------------------------------------------- */
.fakhra-loop-stepper { display: none; }

.goldsmith-product.cart-added .goldsmith-add-to-cart-btn > a.ajax_add_to_cart,
.goldsmith-product.cart-added .goldsmith-add-to-cart-btn > a.goldsmith_ajax_add_to_cart {
	display: none !important;
}

.goldsmith-product.cart-added .fakhra-loop-stepper { display: inline-flex; }

/* Match Goldsmith's small-button footprint inside product cards */
.fakhra-loop-stepper .quantity { margin: 0; }
.fakhra-loop-stepper .quantity input.qty {
	width: 44px;
	min-width: 0;
	text-align: center;
}

/* --- Cart page auto-submit ------------------------------------------ */
/* Default: button visible (no-JS fallback). When JS is enabled, the inline
   <script> in wp_head adds the `js` class to <html> before paint, and this
   rule hides the button so the auto-submit takes over. */
html.js .cart-update-button { display: none !important; }

/* Show a subtle loading state on the row being updated */
.fakhra-cart-row-stepper.loading { opacity: 0.5; pointer-events: none; }

/* --- PDP stepper ---------------------------------------------------- */
.fakhra-pdp-stepper { display: inline-flex; align-items: center; }
.fakhra-pdp-stepper .quantity input.qty {
	min-width: 56px;
	text-align: center;
}
