/**
 * Global WooCommerce product grid — dark UI contrast for Astra + Woo loops.
 *
 * One place for all contexts: shop, categories, tags, search, related/up-sells on single
 * product. Loaded after rg-dark-mode-a11y so it wins over Astra Customizer
 * --ast-global-color-* on .astra-shop-summary-wrap (see Astra Global Colors docs).
 *
 * Covers: (1) prefers-color-scheme: dark (2) body.astra-dark-mode-enable / .rg-device-dark-mode
 * from design-tokens.css when the OS stays light.
 *
 * @package Ratna_Gems
 */

@media (prefers-color-scheme: dark) {
    body:not(.rg-force-light-mode) .woocommerce ul.products li.product .astra-shop-summary-wrap :is(
        a.ast-loop-product__link,
        a.ast-loop-product__link:visited,
        h2.woocommerce-loop-product__title
    ) {
        color: #f8fafc !important;
    }

    body:not(.rg-force-light-mode) .woocommerce ul.products li.product .astra-shop-summary-wrap a.ast-loop-product__link:is(:hover, :focus-visible) {
        color: #bfdbfe !important;
    }

    body:not(.rg-force-light-mode) .woocommerce ul.products li.product .astra-shop-summary-wrap .price,
    body:not(.rg-force-light-mode) .woocommerce ul.products li.product .astra-shop-summary-wrap .price :is(
        .woocommerce-Price-amount,
        .amount,
        bdi,
        .woocommerce-Price-currencySymbol
    ) {
        color: #ffffff !important;
    }
}

body:is(.astra-dark-mode-enable, .rg-device-dark-mode):not(.rg-force-light-mode) .woocommerce ul.products li.product .astra-shop-summary-wrap :is(
    a.ast-loop-product__link,
    a.ast-loop-product__link:visited,
    h2.woocommerce-loop-product__title
) {
    color: #f8fafc !important;
}

body:is(.astra-dark-mode-enable, .rg-device-dark-mode):not(.rg-force-light-mode) .woocommerce ul.products li.product .astra-shop-summary-wrap a.ast-loop-product__link:is(:hover, :focus-visible) {
    color: #bfdbfe !important;
}

body:is(.astra-dark-mode-enable, .rg-device-dark-mode):not(.rg-force-light-mode) .woocommerce ul.products li.product .astra-shop-summary-wrap .price,
body:is(.astra-dark-mode-enable, .rg-device-dark-mode):not(.rg-force-light-mode) .woocommerce ul.products li.product .astra-shop-summary-wrap .price :is(
    .woocommerce-Price-amount,
    .amount,
    bdi,
    .woocommerce-Price-currencySymbol
) {
    color: #ffffff !important;
}
