/* Timber Ledger: ONE product card, shared by the home loop (Elementor) and the shop loop (ep-loop-item.php).
   Both render a > div (media) + h3 (title) + p (button), so these rules apply to both. */
body.home,
body.woocommerce-shop,
body.tax-product_cat {
  --ep-bg: #F3F6F5;
  --ep-surface: #FFFFFF;
  --ep-ink: #101C1B;
  --ep-accent: #D86018;
  --ep-muted: #4B5B59;
  --ep-font-heading: 'Bricolage Grotesque', sans-serif;
  --ep-font-body: 'Figtree', sans-serif;
  --ep-line: rgba(16, 28, 27, 0.12);
  --ep-card-shadow: 0 1px 2px rgba(16, 28, 27, 0.06), 0 8px 24px rgba(16, 28, 27, 0.08);
  --ep-card-shadow-hover: 0 2px 4px rgba(16, 28, 27, 0.08), 0 16px 36px rgba(16, 28, 27, 0.16);
}

:is(.ep-card, body.home .elementor-element-23d7a9bf > a) { box-sizing: border-box; display: flex; flex-direction: column; gap: 0; width: 100%; height: 100%; padding: 0; background: var(--ep-surface); border: 1px solid var(--ep-line); border-radius: 4px; box-shadow: var(--ep-card-shadow); overflow: hidden; color: var(--ep-ink); text-decoration: none; transition: box-shadow 0.2s ease; }
:is(.ep-card, body.home .elementor-element-23d7a9bf > a):hover,
:is(.ep-card, body.home .elementor-element-23d7a9bf > a):focus-visible { box-shadow: var(--ep-card-shadow-hover); }
:is(.ep-card, body.home .elementor-element-23d7a9bf > a) > div:first-child { position: relative; width: 100%; aspect-ratio: 4 / 3; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: var(--ep-surface); }
:is(.ep-card, body.home .elementor-element-23d7a9bf > a) > div:first-child img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
:is(.ep-card, body.home .elementor-element-23d7a9bf > a) > h3 { box-sizing: border-box; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: calc(2.5em + 2.25rem); margin: 0; padding: 1.25rem 1.25rem 1rem; font-family: var(--ep-font-heading); font-weight: 700; font-size: 1.0625rem; line-height: 1.25; letter-spacing: normal; text-transform: none; color: var(--ep-ink); }
:is(.ep-card, body.home .elementor-element-23d7a9bf > a):hover > h3,
:is(.ep-card, body.home .elementor-element-23d7a9bf > a):focus-visible > h3 { text-decoration: underline; text-decoration-color: var(--ep-accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
:is(.ep-card, body.home .elementor-element-23d7a9bf > a) > p { box-sizing: border-box; display: flex; align-items: center; justify-content: center; min-height: 44px; margin: auto 1.25rem 1.25rem; padding: 0.625rem 1rem; font-family: var(--ep-font-body); font-weight: 600; font-size: 0.9375rem; line-height: 1.3; color: var(--ep-ink); text-decoration: none; background: transparent; border: 1px solid var(--ep-ink); border-radius: 4px; transition: background-color 0.15s ease; }
:is(.ep-card, body.home .elementor-element-23d7a9bf > a):hover > p,
:is(.ep-card, body.home .elementor-element-23d7a9bf > a):focus-visible > p { color: var(--ep-ink); text-decoration: none; background: var(--ep-accent); border-color: var(--ep-accent); }

/* Shop grid: same gaps as the home grid, equal-height cards */
:is(body.woocommerce-shop, body.tax-product_cat) .wd-products.wd-grid-g { --wd-gap-lg: 24px; --wd-gap-md: 24px; row-gap: 2rem; }
:is(body.woocommerce-shop, body.tax-product_cat) .wd-products .ep-loop-item { display: flex; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  :is(.ep-card, body.home .elementor-element-23d7a9bf > a),
  :is(.ep-card, body.home .elementor-element-23d7a9bf > a) > p { transition: none; }
}