/**
 * LACP storefront — hide the NATIVE WooCommerce add-to-cart control (kept in the DOM) for
 * customizable products. Customize is rendered as a separate, distinctly-classed element.
 *
 * The native control is only hidden, never removed: a determined shopper could still reveal and
 * trigger it, so the server enforces the real rule — a customizable product cannot be added to the
 * cart except through the add-bridge (the add-to-cart guard in CartModule).
 */

/* Single product — SIMPLE customizable: hide the native add-to-cart form, scoped to the main product
   summary/block rather than every form.cart that might appear elsewhere on the page. */
body.single-product.lacp-has-customize:not(.lacp-product-variable) div.product form.cart,
body.single-product.lacp-has-customize:not(.lacp-product-variable) .wp-block-add-to-cart-form form.cart,
body.single-product.lacp-has-customize:not(.lacp-product-variable) .wp-block-woocommerce-add-to-cart-form form.cart,
.lacp-dynamic-summary.lacp-dynamic-summary--simple form.cart {
	display: none !important;
}

/* Single product — VARIABLE customizable: keep the variation selector (size dropdowns) and the
   per-variation price VISIBLE so the selected variation flows into ext_variant_id; hide only the
   native buy controls (submit button + quantity). */
body.single-product.lacp-product-variable div.product form.variations_form .single_add_to_cart_button,
body.single-product.lacp-product-variable div.product form.variations_form .woocommerce-variation-add-to-cart .quantity,
body.single-product.lacp-product-variable .wp-block-add-to-cart-form form.variations_form .single_add_to_cart_button,
body.single-product.lacp-product-variable .wp-block-add-to-cart-form form.variations_form .woocommerce-variation-add-to-cart .quantity,
body.single-product.lacp-product-variable .wp-block-woocommerce-add-to-cart-form form.variations_form .single_add_to_cart_button,
body.single-product.lacp-product-variable .wp-block-woocommerce-add-to-cart-form form.variations_form .woocommerce-variation-add-to-cart .quantity,
.lacp-dynamic-summary.lacp-dynamic-summary--variable form.variations_form .single_add_to_cart_button,
.lacp-dynamic-summary.lacp-dynamic-summary--variable form.variations_form .woocommerce-variation-add-to-cart .quantity {
	display: none !important;
}

/* Shop / category loop: native add-to-cart link kept in the DOM but hidden; Customize shown instead. */
.lacp-loop-native {
	display: none !important;
}

/* Customize button presentation. The appearance is inherited from the theme's OWN button classes so the
   element matches the native add-to-cart per context (see the storefront-button partial): in the loop it
   carries the block-button classes (`wp-block-button__link wp-element-button`, the Product Collection
   button's pill); on the single page it carries the classic-template classes (`single_add_to_cart_button
   button alt wp-element-button`, the theme's rectangular single button). These rules only normalise the <a>
   so it reads as a button (no link underline, pointer cursor) on themes that style none of those classes,
   without coupling us to the native add-to-cart's FUNCTIONAL classes (`add_to_cart_button`/`ajax_add_to_cart`). */
.lacp-customize-btn {
	text-decoration: none;
	cursor: pointer;
}

.lacp-customize-btn.lacp-customize-disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.lacp-variation-required {
	margin-top: 0.5em;
	color: #b32d2e;
}

/* In a product loop the native Product Collection button is centred in its cell by a flex wrapper; our
   block-button wrapper is a plain block, so centre the inline-block button the same way. The margin gives
   it the same breathing room as the native button below the price. */
.lacp-customize-loop {
	margin-top: 0.5em;
	text-align: center;
}

/* Customize button wrapper on the single-product page — a little vertical breathing room. */
.lacp-customize-wrap {
	margin: 18px 0 8px;
}

/* Customer order view (account "View order" page) — the clean design-preview thumbnail. Order EMAILS do
   not load this stylesheet, so the <img> keeps its own inline sizing; this only frames the on-site view. */
.lacp-order-design {
	display: flex;
	gap: 12px;
	align-items: center;
	margin: 6px 0;
}

.lacp-order-design .lacp-order-preview {
	max-width: 72px;
	height: auto;
	border: 1px solid #e6e6e6;
	border-radius: 6px;
	display: block;
}

/* Designer page — full-bleed iframe shell (templates/designer-page.php). */
.lacp-designer-main {
	width: 100%;
	max-width: 100%;
	padding: 0;
	margin: 0;
}

.lacp-designer-iframe {
	display: block;
	width: 100%;
	border: 0;
	background: #fafafa;
}
