/**
 * Add to Cart Button - Full Width from Qty to Right Edge
 *
 * Ensures the add-to-cart button fills all remaining space from the
 * quantity selector's right edge to the container's right edge.
 *
 * Fixes:
 * - Removes left margins from form containers (align to left edge)
 * - Overrides theme's min-width:178px constraint on button
 * - Allows button to flex-grow and fill remaining horizontal space
 *
 * Version: 1.1.1
 * @package eride
 *
 * Changelog:
 * 1.1.1 - Enhanced to complement product-size-variants.css v1.4.4
 *       - Works in tandem with form.cart flex rules for simple products
 *       - Ensures button fills remaining width on all product types
 * 1.1.0 - FILE RENAMED: add-to-cart-left-edge.css → add-to-cart-button-full-width.css
 *       - Updated documentation to clarify purpose (qty right edge → container right edge)
 *       - No code changes, name now accurately reflects functionality
 * 1.0.1 - CRITICAL FIX: Override style.css min-width:178px on add-to-cart button
 *       - Button now properly flex-grows to fill remaining space
 *       - Works on all breakpoints (desktop and mobile)
 * 1.0.0 - Initial release: Left edge extension
 */

/* Extend add-to-cart form to left edge on single product pages */
.single-product-page .wp-block-woocommerce-add-to-cart-form,
.single-product-page .wp-block-add-to-cart-form {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Ensure cart container also extends to left edge */
.single-product-page .wp-block-woocommerce-add-to-cart-form .cart,
.single-product-page .wp-block-add-to-cart-form .cart {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Remove left gap from variations form */
.single-product-page .woocommerce-variation-add-to-cart {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* CRITICAL FIX: Override theme's min-width:178px to allow button to fill space */
.single-product-page .single_add_to_cart_button {
    min-width: 0 !important; /* Override style.css line 9815 which sets min-width:178px */
}

/* Mobile: Maintain left edge alignment */
@media screen and (max-width: 768px) {
    .single-product-page .wp-block-woocommerce-add-to-cart-form,
    .single-product-page .wp-block-add-to-cart-form,
    .single-product-page .woocommerce-variation-add-to-cart {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    /* Ensure button fills space on mobile too */
    .single-product-page .single_add_to_cart_button {
        min-width: 0 !important;
    }
}
