/**
 * 2019 Addify
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 *  @author    Addify
 *  @copyright 2019 Addify
 *  @license   http://opensource.org/licenses/afl-3.0.php
*/
/*.product-price-and-shipping span {
    display: none !important;
}

.product-price-and-shipping .ajax_add_to_cart_button {
    display: none !important;
}*/

.regular-price {
    display: none !important;
}

/* Prevent price flash during combination changes.
   The .extaddifyhideprice div is a child of .product-prices.
   When it exists, hide all price-related siblings at the container level. */
.product-prices:has(.extaddifyhideprice) .current-price,
.product-prices:has(.extaddifyhideprice) .current-price-value,
.product-prices:has(.extaddifyhideprice)>.product-discount,
.product-prices:has(.extaddifyhideprice) .discount-percentage,
.product-prices:has(.extaddifyhideprice) .discount-amount {
    display: none !important;
}

/* Fallback for browsers without :has() - hide via JS-added class */
.product-prices.addify-price-hidden .current-price,
.product-prices.addify-price-hidden .current-price-value,
.product-prices.addify-price-hidden>.product-discount,
.product-prices.addify-price-hidden .discount-percentage,
.product-prices.addify-price-hidden .discount-amount {
    display: none !important;
}

/* Hide tax/shipping/delivery label */
.tax-shipping-delivery-label {
    display: none !important;
}

/* Hide add-to-cart button when hide-cart flag is active (prevents flash on initial load) */
.product-prices:has(.extaddifyhideprice[hidecartcheck="yes"])~.product-add-to-cart,
.product-prices.addify-cart-hidden~.product-add-to-cart {
    display: none !important;
}

/* ============================================
   Elementor / Creative Elements Compatibility
   The .extaddifyhideprice div exists inside ce-product-prices
   but Elementor uses ce-* prefixed classes instead of standard PS ones.
   ============================================ */

/* Hide price in Elementor product pages */
.ce-product-prices:has(.extaddifyhideprice[pricehidecheck="yes"]) .ce-product-price,
.ce-product-prices:has(.extaddifyhideprice[pricehidecheck="yes"]) .current-price,
.ce-product-prices:has(.extaddifyhideprice[pricehidecheck="yes"]) .current-price-value,
.ce-product-prices:has(.extaddifyhideprice[pricehidecheck="yes"]) .product-discount,
.ce-product-prices:has(.extaddifyhideprice[pricehidecheck="yes"]) .discount-percentage,
.ce-product-prices:has(.extaddifyhideprice[pricehidecheck="yes"]) .discount-amount,
.ce-product-prices.addify-price-hidden .ce-product-price,
.ce-product-prices.addify-price-hidden .current-price,
.ce-product-prices.addify-price-hidden .current-price-value {
    display: none !important;
}

/* Hide Elementor tax/shipping label */
.ce-tax-shipping-delivery-label {
    display: none !important;
}

/* Hide Elementor add-to-cart section on product page (guests only).
   The .extaddifyhideprice div exists for all users but with different
   attribute values: hidecartcheck="yes" for guests, "no" for logged-in. */
body:has(.extaddifyhideprice[hidecartcheck="yes"]) .elementor-element-bed3ceb,
body:has(.extaddifyhideprice[hidecartcheck="yes"]) .elementor-widget-ce_product_add_to_cart {
    display: none !important;
}

/* Hide add-to-cart on product miniatures (listing pages, guests only) */
body:has(.extaddifyhideprice[hidecartcheck="yes"]) .elementor-widget-product-miniature-add-to-cart {
    display: none !important;
}

/* Fallback for standard PS theme (where they ARE siblings) */
.product-prices:has(.extaddifyhideprice[hidecartcheck="yes"])~.product-add-to-cart,
.product-prices.addify-cart-hidden~.product-add-to-cart,
.ce-product-prices.addify-cart-hidden~.product-add-to-cart {
    display: none !important;
}

/* Broader Elementor page-level price hiding fallback */
.elementor-page .elementor-widget-product-price:has(.extaddifyhideprice[pricehidecheck="yes"]) .ce-product-price {
    display: none !important;
}