/* --- Structural & Compatibility Rules --- */
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .product_type_variable,
.woocommerce div.product.product-type-simple form.cart .button {
    display: none !important;
}
.woocommerce div.product .saatc-button.single_add_to_cart_button,
.woocommerce div.product .saatc-unavailable-button.single_add_to_cart_button {
    display: inline-block !important;
    margin-left: 1em;
}
.saatc-button-container { margin-top: 1em; clear: both; }
.saatc-button-container .button { width: 100%; text-align: center; }

/* --- Button States (Loading, Added, Unavailable) --- */
.saatc-button, .saatc-variable-button {
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}
.saatc-button.loading { color: transparent !important; pointer-events: none; }
.saatc-button.loading::after { content: ''; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin-top: -8px; margin-left: -8px; border: 2px solid rgba(255, 255, 255, 0.5); border-top-color: #ffffff; border-radius: 50%; animation: spin 0.6s linear infinite; }
.saatc-button.added { background-color: #28a745 !important; border-color: #28a745 !important; color: #ffffff !important; }
.saatc-button.added::before { content: '\2713'; margin-right: 0.5em; }
.saatc-unavailable-button { background-color: #e9e9e9 !important; border-color: #dcdcdc !important; color: #a0a0a0 !important; opacity: 0.7; cursor: not-allowed; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }


.woocommerce-page a.button:hover:after, .woocommerce a.button:after, .woocommerce-page a.button:after, .woocommerce-page button.button:not(.button-confirm):after, .woocommerce button.button:not(.button-confirm):after {
	font-size: 100% !important;
	content: '$' !important;
}