/*
Theme Name: Shop v9
Theme URI: https://mohtava.club
Author: Mohtava Club
Author URI: https://mohtava.club
Description: قالب اختصاصی باشگاه محتوا - Tailwind CSS 4 + WooCommerce
Version: 2.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mohtavaclub
Tags: rtl-language-support, woocommerce, blog, custom-menu, featured-images

باشگاه محتوا - قالب اختصاصی با Tailwind CSS و پشتیبانی ووکامرس
*/

/* ==========================================================================
   Interactive elements — mouse cursor
   Tailwind v4's preflight no longer applies `cursor: pointer` to buttons, so we
   restore it explicitly (the add-to-cart button must show a hand on hover).
   ========================================================================== */
button:not(:disabled):not(.cursor-not-allowed),
input[type="button"]:not(:disabled),
input[type="submit"]:not(:disabled),
input[type="reset"]:not(:disabled),
.add-to-cart-btn:not(:disabled):not(.cursor-not-allowed),
.sticky-add-to-cart:not(:disabled):not(.cursor-not-allowed),
.single_add_to_cart_button:not(:disabled),
.qty-btn:not(:disabled),
.cart-qty-btn:not(:disabled),
.mobile-cart-btn,
.desktop-cart-btn,
#site-cart-btn,
.js-open-mini-cart,
.mini-cart-close,
[role="button"]:not([aria-disabled="true"]),
a[href] {
    cursor: pointer;
}

/* Disabled / busy states must not pretend to be clickable. */
button:disabled,
button.cursor-not-allowed,
button[aria-disabled="true"],
.add-to-cart-btn.cursor-not-allowed,
.sticky-add-to-cart.cursor-not-allowed,
.single_add_to_cart_button.disabled,
input[type="submit"]:disabled {
    cursor: not-allowed;
}

/* The tab-bar counter is always in the DOM so AJAX can update it; hide it when empty. */
.mobile-cart-badge[data-empty="1"] {
    display: none;
}



/* ==========================================================================
   Add to cart — colour from the theme settings, hover = opacity only
   «تنظیمات قالب → تنظیمات رنگ»:
     --color-button       ← «رنگ دکمه‌ها»
     --color-button-text  ← «رنگ نوشته دکمه‌ها»
   Hovering must repaint nothing: it drops the opacity to 80% and stops.
   The disabled / out-of-stock variants keep their own grey / red, and
   .bg-green-600 (the 1s "added" flash) stays out of the rule.
      Declared here because style.css is unlayered and loads after the compiled
   Tailwind sheet, so it beats the bg-primary / hover:bg-primary-dark utilities.
   ========================================================================== */
.add-to-cart-btn:not(:disabled):not(.cursor-not-allowed):not(.bg-green-600),
.sticky-add-to-cart:not(:disabled):not(.cursor-not-allowed) {
    background: var(--color-button, var(--color-primary));
    color: var(--color-button-text, #ffffff) !important;
    box-shadow: 0 12px 24px -15px color-mix(in srgb, var(--color-button, var(--color-primary)) 70%, transparent);
    transition: opacity .2s ease;
}

.add-to-cart-btn:not(:disabled):not(.cursor-not-allowed):not(.bg-green-600):hover,
.add-to-cart-btn:not(:disabled):not(.cursor-not-allowed):not(.bg-green-600):focus,
.add-to-cart-btn:not(:disabled):not(.cursor-not-allowed):not(.bg-green-600):active,
.sticky-add-to-cart:not(:disabled):not(.cursor-not-allowed):hover,
.sticky-add-to-cart:not(:disabled):not(.cursor-not-allowed):focus,
.sticky-add-to-cart:not(:disabled):not(.cursor-not-allowed):active {
    background: var(--color-button, var(--color-primary));
    color: var(--color-button-text, #ffffff) !important;
    opacity: .8;
}
