/* MC Wear — global stylesheet
 * Loaded on every frontend page (and Elementor editor preview).
 * Place rules here that should apply site-wide, not per widget.
 */

/* Prevent stray horizontal scrollbar caused by full-bleed sections
 * (negative margins, 100vw containers, transforms overflowing the viewport).
 * `overflow: clip` (not hidden) — clips overflow WITHOUT creating a scroll
 * container, so descendant `position: sticky` keeps working. */
[data-elementor-type="wp-page"],
[data-elementor-type="wp-post"],
[data-elementor-type="single"],
[data-elementor-type="archive"] {
	overflow-x: clip;
}

/* WooCommerce auto-prints its own success/error notices via
 * woocommerce_output_all_notices on single-product templates and after
 * redirects from cart/checkout. The custom cart-toast widget already
 * handles add-to-cart feedback, so the stock WC notices double up and
 * clutter the layout. Hide every WC notice on the product page. */
body.single-product .woocommerce-notices-wrapper,
body.single-product .woocommerce-message,
body.single-product .woocommerce-error,
body.single-product .woocommerce-info,
body.single-product ul.woocommerce-error,
body.single-product div.woocommerce-message,
body.single-product div.woocommerce-info {
	display: none;
}

/* WooCommerce's add-to-cart JS injects an `<a class="added_to_cart wc-forward">
 * View cart</a>` immediately after whatever button it's handed on a successful
 * add. With our custom AJAX add buttons inside product cards that surfaces as
 * stray "View cart" text over the card image. We already drop the button from
 * the `added_to_cart` trigger (the root fix); this hides the link as a safety
 * net for any other path that injects it. `.added_to_cart` is used ONLY for
 * this injected loop link — legit cart/checkout buttons use `.wc-forward`
 * alone — so hiding it site-wide is safe. */
a.added_to_cart {
	display: none;
}
