/* GPT & SB Shop UX Toolkit — minimal, theme-agnostic rules */

/* 1) Shop archive intro links: underline by default, none on hover */
body.woocommerce-shop .woocommerce-products-header .page-description a,
body.woocommerce-shop .wp-block-woocommerce-archive-description a {
  text-decoration: underline;
}
body.woocommerce-shop .woocommerce-products-header .page-description a:hover,
body.woocommerce-shop .woocommerce-products-header .page-description a:visited:hover,
body.woocommerce-shop .wp-block-woocommerce-archive-description a:hover,
body.woocommerce-shop .wp-block-woocommerce-archive-description a:visited:hover {
  text-decoration: none;
}

/* 2) Category description links: remove underline on hover (handles inner tags too) */
body.tax-product_cat .term-description a:hover,
body.tax-product_cat .term-description a:visited:hover {
  text-decoration: none !important;
}
body.tax-product_cat .term-description a:hover *,
body.tax-product_cat .term-description a:visited:hover * {
  text-decoration: none !important;
  border-bottom: 0 !important;        /* kills border-underlines */
  background-image: none !important;  /* kills gradient “underlines” */
  box-shadow: none !important;        /* kills shadow underlines */
}

/* Kill pseudo-element underlines on hover in category descriptions (harmless hardening) */
body.tax-product_cat .term-description a:hover::before,
body.tax-product_cat .term-description a:hover::after {
  content: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* END Kill pseudo-element underlines on hover in category descriptions (harmless hardening) */

/* Base: tile is flat by default */
.products li.product,
.products li.product-category {
  position: relative;
  z-index: 0;
  transition: transform .18s ease, box-shadow .18s ease;
  will-change: transform, box-shadow;
}

/* Hover/focus: lift ONLY when a clickable child is active */
@supports selector(:has(*)) {
  /* Mouse users: product link or button hovered */
  @media (hover:hover) and (pointer:fine) {
    .products li.product:has(.woocommerce-LoopProduct-link:hover, .button:hover, .added_to_cart:hover),
    .products li.product-category:has(a:hover) {
      transform: translateY(-4px);
      box-shadow: 0 14px 34px rgba(0,0,0,.14), 0 3px 10px rgba(0,0,0,.05);
      z-index: 2;
    }
  }

  /* Keyboard users: product link or button focused */
  .products li.product:has(.woocommerce-LoopProduct-link:focus-visible, .button:focus-visible, .added_to_cart:focus-visible),
  .products li.product-category:has(a:focus-visible) {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(0,0,0,.16), 0 3px 10px rgba(0,0,0,.06);
    z-index: 2;
  }
}

/* Respect motion preferences */
@media (prefers-reduced-motion: reduce) {
  .products li.product,
  .products li.product-category {
    transition: none;
  }
}

/* End Code For Hover Effects */


/* Optional: keep keyboard outline, avoid mouse-click box (leave commented if unsure) */
/* .woocommerce a:focus:not(:focus-visible) { outline: none; } */