/* IPEKERP_SEARCH_PRODUCT_IMAGE_OPTICAL_FIT_V1:BEGIN */

/*
  Generic optical fit for product images.
  JS measures the actual non-background pixel bounds and writes CSS variables.
  The transform is active only in list view; grid view remains untouched.
*/

body.sf-search-v2.sf-stage5-search-v1.sf5-view-list
section#urunler #storefront-product-grid
.sf-product-card__image {
  overflow:hidden !important;
}

body.sf-search-v2.sf-stage5-search-v1.sf5-view-list
section#urunler #storefront-product-grid
.sf-product-card__image > img.sf42110-optical-fit {
  padding:0 !important;
  transform-origin:50% 50% !important;
  transform:
    translate(
      var(--sf42110-tx, 0px),
      var(--sf42110-ty, 0px)
    )
    scale(var(--sf42110-scale, 1)) !important;
  will-change:transform;
}

body.sf-search-v2.sf-stage5-search-v1.sf5-view-grid
section#urunler #storefront-product-grid
.sf-product-card__image > img.sf42110-optical-fit {
  transform:none !important;
}

/* Never force the optical-fit transform onto placeholder canvases. */
body.sf-search-v2.sf-stage5-search-v1
section#urunler #storefront-product-grid
.sf-product-card__placeholder img.sf42110-optical-fit {
  transform:none !important;
}

/* IPEKERP_SEARCH_PRODUCT_IMAGE_OPTICAL_FIT_V1:END */