/* Rihalo Store UI — catalog cards only. */

/* Intentionally broad enough for classic loops and WooCommerce product blocks. */
.rihalo-catalog-buy-now {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
    min-height: 48px !important;
    margin: 12px 0 8px !important;
    padding: 10px 14px !important;
    box-sizing: border-box !important;
    border: 1.25px solid #29252f !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #29252f !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    text-decoration: none !important;
}

.rihalo-catalog-buy-now:hover {
    background: #fbfaf9 !important;
    color: #29252f !important;
    border-color: #29252f !important;
}

.rihalo-catalog-buy-visa {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-left: 10px !important;
    border-left: 1px solid #e5e2de !important;
}

.rihalo-catalog-buy-visa img {
    display: block !important;
    width: 38px !important;
    height: auto !important;
    max-height: 23px !important;
    object-fit: contain !important;
}

/* Approved Add to cart treatment. Only inside actual catalog product cards. */
:is(li.product, .wc-block-grid__product, .wc-block-product, .wp-block-post.product, .wp-block-woocommerce-product-template > li)
:is(a.add_to_cart_button, a.product_type_simple, .wp-block-button__link[href*="add-to-cart"], button.add_to_cart_button) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 10px 14px !important;
    box-sizing: border-box !important;
    border: 1px solid #29252f !important;
    border-radius: 10px !important;
    background: #29252f !important;
    color: #fff !important;
    box-shadow: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    text-decoration: none !important;
}

:is(li.product, .wc-block-grid__product, .wc-block-product, .wp-block-post.product, .wp-block-woocommerce-product-template > li)
:is(a.add_to_cart_button, a.product_type_simple, .wp-block-button__link[href*="add-to-cart"], button.add_to_cart_button):hover {
    background: #1f1c24 !important;
    border-color: #1f1c24 !important;
    color: #fff !important;
}

/* No payment icon strip exists on catalog cards. */
.rihalo-loop-payment-marks,
.rihalo-loop-payment-icons,
.rihalo-catalog-payment-icons {
    display: none !important;
}

@media (max-width: 767px) {
    .rihalo-catalog-buy-now,
    :is(li.product, .wc-block-grid__product, .wc-block-product, .wp-block-post.product, .wp-block-woocommerce-product-template > li)
    :is(a.add_to_cart_button, a.product_type_simple, .wp-block-button__link[href*="add-to-cart"], button.add_to_cart_button) {
        min-height: 44px !important;
        font-size: 13px !important;
    }
}


/* v0.1.2 — force the catalog Add to cart CTA to the approved black treatment.
   Scoped to product cards only; Buy now is explicitly excluded. */
.woocommerce ul.products li.product a.button:not(.rihalo-catalog-buy-now),
.woocommerce ul.products li.product button.button:not(.rihalo-catalog-buy-now),
.woocommerce .products .product a.add_to_cart_button,
.woocommerce .products .product a.product_type_simple:not(.rihalo-catalog-buy-now),
.wc-block-grid__product a.wp-block-button__link:not(.rihalo-catalog-buy-now),
.wc-block-grid__product a.add_to_cart_button,
.wp-block-woocommerce-product-template .wc-block-components-product-button__button,
.wp-block-woocommerce-product-template a[href*="add-to-cart"]:not(.rihalo-catalog-buy-now),
.wc-block-product .wc-block-components-product-button__button,
.wc-block-product a[href*="add-to-cart"]:not(.rihalo-catalog-buy-now) {
    background: #29252f !important;
    background-color: #29252f !important;
    border-color: #29252f !important;
    color: #ffffff !important;
}

.woocommerce ul.products li.product a.button:not(.rihalo-catalog-buy-now):hover,
.woocommerce ul.products li.product button.button:not(.rihalo-catalog-buy-now):hover,
.woocommerce .products .product a.add_to_cart_button:hover,
.woocommerce .products .product a.product_type_simple:not(.rihalo-catalog-buy-now):hover,
.wc-block-grid__product a.wp-block-button__link:not(.rihalo-catalog-buy-now):hover,
.wc-block-grid__product a.add_to_cart_button:hover,
.wp-block-woocommerce-product-template .wc-block-components-product-button__button:hover,
.wp-block-woocommerce-product-template a[href*="add-to-cart"]:not(.rihalo-catalog-buy-now):hover,
.wc-block-product .wc-block-components-product-button__button:hover,
.wc-block-product a[href*="add-to-cart"]:not(.rihalo-catalog-buy-now):hover {
    background: #17151b !important;
    background-color: #17151b !important;
    border-color: #17151b !important;
    color: #ffffff !important;
}

/* v0.3.2 — Kadence header: keep the native Account and Cart controls.
   Only suppress an extra Account item when the same header section already has
   the intended Account immediately before a Cart. No DOM rewriting, no duplicate
   SVG injection, and no JavaScript mutation observer. */
@supports selector(header:has(.header-cart-wrap)) {
    body header:has(.site-header-item:has(.header-account-wrap) ~ .site-header-item:has(.header-cart-wrap))
    .site-header-item:has(.header-account-wrap):not(:has(~ .site-header-item:has(.header-cart-wrap))) {
        display: none !important;
    }
}
