/* ==========================================================================
   OurCloset UX enhancements (global, loaded on every storefront page)
   - Product images are always clickable (overlays no longer swallow clicks)
   - Touch-friendly card actions
   - Smoother image loading
   ========================================================================== */

/* 1) Decorative hover overlays must never intercept clicks on the image link. */
.product_tricker .product_img:after,
.product_tricker .product_img:before,
.media_style .single_product_img:after,
.media_style .single_product_img:before,
.client_review .single_product_img:after,
.oc-hotcat-card__shade,
.oc-feat-card__shade {
  pointer-events: none !important;
}

/* The hover action bar only captures clicks on its buttons, not the empty space around them. */
.product_tricker .product_img .socal_icon { pointer-events: none; }
.product_tricker .product_img .socal_icon a,
.product_tricker .product_img .socal_icon button { pointer-events: auto; }

/* Make the whole image area a link target. */
.product_tricker .product_img .product_img_iner { display: block; width: 100%; height: 100%; }

/* Images resolved to a product page by oc-enhance.js */
.oc-img-link { cursor: pointer; }
.oc-img-link:focus-visible { outline: 3px solid rgba(230, 0, 35, .45); outline-offset: 2px; border-radius: 8px; }

/* 2) Touch devices: no hover, so show compact action buttons at the bottom
      of the image (always visible) and keep the image itself tappable. */
@media (hover: none) {
  .product_tricker .product_img:after { display: none !important; }
  .product_tricker .product_img .socal_icon {
    opacity: 1 !important;
    visibility: visible !important;
    top: auto !important;
    bottom: 8px !important;
    transform: none !important;
    gap: 6px;
  }
  .product_tricker .product_img .socal_icon a {
    width: 32px !important;
    height: 32px !important;
    line-height: 34px !important;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .15);
  }
  .product_tricker .product_img .socal_icon a i { line-height: 34px !important; }
  .product_tricker:hover { transform: none !important; }
}

/* 3) Smoother image appearance: fade lazy images in once loaded. */
img.lazyload[data-src] { transition: opacity .35s ease, transform .5s ease; }
img.oc-img-pending { opacity: .35; }

/* Keep product thumbnails a consistent shape so layout doesn't jump while loading. */
.product_tricker .product_img img { object-fit: cover; }

/* 4) Accessibility & polish */
:focus-visible { outline-color: #e60023; }
a, button { -webkit-tap-highlight-color: rgba(230, 0, 35, .12); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Render footer lazily (big DOM, below the fold). */
footer, .footer_part { content-visibility: auto; contain-intrinsic-size: 1px 600px; }

