/* IOTA small WooCommerce/front-end tweaks. */

/* Single product: if WooCommerce says only one can be purchased, don't show a redundant control. */
.single-product form.cart .quantity.iota-single-quantity,
.single-product form.cart .quantity:has(input.qty[type="hidden"]),
.single-product form.cart .quantity:has(input.qty[max="1"]) {
	display: none !important;
}

/* Basket: fixed single-item quantities should read as 1, not an empty/styled quantity shell. */
.woocommerce-cart-form td.product-quantity .iota-fixed-quantity,
.woocommerce-cart-form td.product-quantity .iota-cart-quantity-value {
	display: inline-block;
	line-height: 1;
}
.woocommerce-cart-form td.product-quantity .quantity.iota-single-quantity {
	display: none !important;
}

/* Coupon validation belongs below the coupon input/button row. */
.woocommerce-cart-form .coupon {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: stretch !important;
}
.woocommerce-cart-form .coupon > .coupon-error-notice {
	order: 999 !important;
	flex: 0 0 100% !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 8px 0 0 !important;
	padding: 0 !important;
}

/* WooCommerce programmatically focuses notices after actions; suppress the box/outline on the notice itself. */
.woocommerce-error:focus,
.woocommerce-message:focus,
.woocommerce-info:focus,
.woocommerce-notices-wrapper:focus,
.woocommerce-notices-wrapper [role="alert"]:focus,
.woocommerce-notices-wrapper [tabindex="-1"]:focus,
.wc-block-components-notice-banner:focus,
.wc-block-components-notice-banner[role="alert"]:focus {
	outline: none !important;
	box-shadow: none !important;
}

/* Last-resort guard for Stripe product-page Express Checkout output. Basket/Checkout are not targeted. */
.single-product #wc-stripe-express-checkout-element,
.single-product #wc-stripe-payment-request-wrapper,
.single-product .wc-stripe-product-checkout-container {
	display: none !important;
}

/* Main Shop WPBakery-only fallback: the PHP output buffer removes the native loop,
   but these selectors ensure Impeka's native catalogue UI stays hidden if its hook
   positions change in a theme update. The WPBakery product element uses different
   markup and is intentionally untouched. */
body.iota-wpbakery-only-shop #grve-page-title,
body.iota-wpbakery-only-shop .grve-products-default-top-bar,
body.iota-wpbakery-only-shop .grve-product-wrapper {
	display: none !important;
}
