/*
 * Gumpress — front-end styles (Flow A: Buy Now only)
 *
 * The store sells through a single "Buy Now" button per product.
 * The native WooCommerce cart + checkout flow is hidden so customers
 * are guided straight into the Gumroad popup.
 */

/* Hide the native Add to Cart button + quantity selector on single product
   pages and the shop loop. The Gumpress Buy Now button replaces them.
   Note: we leave the variations form itself visible so the size/color
   selector still works — only the qty field and submit button are hidden. */
form.cart .quantity,
form.cart input[name="quantity"],
form.cart button[type="submit"].single_add_to_cart_button,
form.cart .single_add_to_cart_button,
.woocommerce ul.products li.product .button.add_to_cart_button,
.woocommerce ul.products li.product .product_type_simple,
.woocommerce ul.products li.product .product_type_variable,
.woocommerce-cart-form,
.cart_totals,
.wc-block-cart,
.wc-block-checkout,
.wc-block-mini-cart,
/* Hide theme/plugin Buy Now buttons so only the plugin's button shows. */
.wd-buy-now-btn,
.xoo-wsc-btn-buy-now,
.buy-now-button:not(.gumpress-buynow-button),
.wc-direct-checkout-button,
.single_add_to_cart_button.buy-now,
.yith-wcqv-button.buy-now,
.btn-buynow:not(.gumpress-buynow-button),
.buynow_button:not(.gumpress-buynow-button) {
    display: none !important;
}

/* Buy Now button — injected by the plugin. All visual properties driven by
   CSS variables that the plugin sets from saved settings. Marked !important
   so theme stylesheets can't override the user's chosen colors and size. */
button.gumpress-buynow-button,
a.gumpress-buynow-button,
.gumpress-buynow-button {
    display: inline-block !important;
    padding: var(--gp-buynow-pad-y, 12px) var(--gp-buynow-pad-x, 28px) !important;
    background: var(--gp-buynow-bg, #f0a154) !important;
    background-color: var(--gp-buynow-bg, #f0a154) !important;
    color: var(--gp-buynow-fg, #fff) !important;
    border: 0 !important;
    border-radius: var(--gp-buynow-radius, 2px) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    cursor: pointer !important;
    font-size: var(--gp-buynow-size, 14px) !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
button.gumpress-buynow-button:hover,
button.gumpress-buynow-button:focus,
a.gumpress-buynow-button:hover,
a.gumpress-buynow-button:focus,
.gumpress-buynow-button:hover,
.gumpress-buynow-button:focus {
    background: var(--gp-buynow-bg-hover, #e08a3a) !important;
    background-color: var(--gp-buynow-bg-hover, #e08a3a) !important;
    color: var(--gp-buynow-fg-hover, #fff) !important;
    text-decoration: none !important;
}

/* Shop-loop variant — slightly smaller and full width on cards */
.woocommerce ul.products li.product .gumpress-buynow-button {
    margin-top: 0.5em;
}
