/* ==========================================================================
   cw-product-card.css — Single-clickable product card styles
   Loaded only on shop/category pages via mirjam_enqueue_product_card_css()
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CARD ANCHOR — block-level container, full card is clickable
   -------------------------------------------------------------------------- */

a.woocommerce-loop-product__link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    height: 100%;
}

a.woocommerce-loop-product__link:hover,
a.woocommerce-loop-product__link:focus-visible {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

a.woocommerce-loop-product__link:focus-visible {
    outline: 2px solid var(--m-gold, #B8923E);
    outline-offset: 3px;
    box-shadow: none;
    transform: none;
}

/* --------------------------------------------------------------------------
   2. PRODUCT TITLE — prevent underline, subtle gold on hover
   -------------------------------------------------------------------------- */

a.woocommerce-loop-product__link .woocommerce-loop-product__title {
    text-decoration: none;
}

a.woocommerce-loop-product__link:hover .woocommerce-loop-product__title {
    color: var(--m-gold-text, #85692E);
    transition: color 0.2s ease;
}

/* --------------------------------------------------------------------------
   3. "Trade account pricing" span — styled to look like the previous link CTA
   -------------------------------------------------------------------------- */

.mirjam-product-price-cta {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: var(--m-gold-text, #85692E);
    letter-spacing: 0.3px;
}

/* --------------------------------------------------------------------------
   4. WISHLIST & COMPARE BUTTONS — correct stacking inside the card anchor
      YITH and compare JS handle their own click events (stopPropagation).
      z-index ensures their hit areas sit above the card anchor.
   -------------------------------------------------------------------------- */

a.woocommerce-loop-product__link .yith-wcwl-add-to-wishlist,
a.woocommerce-loop-product__link .add-to-wishlist-before_image,
a.woocommerce-loop-product__link .pls-compare-button {
    position: absolute;
    z-index: 3;
    pointer-events: auto;
}

/* --------------------------------------------------------------------------
   5. ADD TO CART — sits outside the anchor, explicit stacking context
   -------------------------------------------------------------------------- */

.product .add_to_cart_button,
.product .ajax_add_to_cart,
.product form.cart {
    position: relative;
    z-index: 2;
}

/* --------------------------------------------------------------------------
   6. SALE BADGE — keep visible above image within the anchor
   -------------------------------------------------------------------------- */

a.woocommerce-loop-product__link .onsale {
    position: absolute;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   7. PRICE — always visible, never hidden on hover
      Alukas product-style-1 has a "price slides up, cart button slides in"
      hover effect (theme.css ~L200039):
        .pls-product-inner:hover .product-price span.price { opacity: 0; transform: translateY(-100%) }
      We have no add-to-cart button on our cards, so this animation only hides
      the price with nothing replacing it. Override it unconditionally.
   -------------------------------------------------------------------------- */

.products.product-style-1.grid-view .pls-product-inner:hover .product-price span.price,
.products.product-style-1.grid-view .pls-product-inner:hover span.price,
.products.product-style-4.grid-view .pls-product-inner:hover .product-price span.price,
.products.product-style-4.grid-view .pls-product-inner:hover span.price {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Hide any add-to-cart button that would slide up to overlap the price area. */
.products.product-style-1.grid-view .pls-product-inner .pls-cart-button,
.products.product-style-4.grid-view .pls-product-inner .pls-cart-button {
    display: none !important;
}

/* --------------------------------------------------------------------------
   8. SORT BY FORM + VIEW SWITCHER — hidden entirely
      remove_action() is unreliable across WooCommerce/theme load order;
      CSS is the definitive kill switch.
   -------------------------------------------------------------------------- */

form.woocommerce-ordering,
.woocommerce-ordering {
    display: none !important;
}

.pls-products-view {
    display: none !important;
}
