/* PATCH_ID: b2c_phase5e18c_product_hover_sticky_misalignment_fix_stage_safe_20260522 */

/*
  Fixes:
  1) add-cart click focus caused hover style to remain locked
  2) broad selector marked product grid containers, making many cards activate together
  3) homepage card visual offset from previous image transform
  4) removes add-cart sweep; replaces it with soft halo + click pulse
*/

/* Only precise runtime-marked cards should animate. */
.b2c-product-hover-card:not(.b2c-product-hover-ready){
  transform:none !important;
  box-shadow:inherit !important;
}

/* Disable old focus-within sticky state unless actual mouse hover is active. */
.b2c-product-hover-ready:focus-within:not(:hover){
  transform:none !important;
}

.b2c-product-hover-ready:focus-within:not(:hover) .b2c-product-hover-img,
.b2c-product-hover-ready:focus-within:not(:hover) .product-image{
  transform:none !important;
  filter:none !important;
}

.b2c-product-hover-ready:focus-within:not(:hover) .b2c-product-hover-body::before,
.b2c-product-hover-ready:focus-within:not(:hover) .product-body::before,
.b2c-product-hover-ready:focus-within:not(:hover) .product-info::before,
.b2c-product-hover-ready:focus-within:not(:hover) .card-body::before{
  transform:translateX(104%) !important;
  opacity:0 !important;
}

/* More stable card motion. */
.b2c-product-hover-ready{
  position:relative !important;
  overflow:hidden !important;
  transition:
    transform .28s cubic-bezier(.2,.8,.2,1),
    box-shadow .28s cubic-bezier(.2,.8,.2,1),
    border-color .24s ease !important;
}

.b2c-product-hover-ready:hover{
  transform:translateY(-4px) !important;
  border-color:rgba(232,177,214,.42) !important;
  box-shadow:
    0 22px 52px rgba(127,82,143,.13),
    0 0 0 1px rgba(255,255,255,.72) inset !important;
}

/* Prevent the image from shifting layout; zoom is subtle and clipped. */
.b2c-product-hover-ready .b2c-product-hover-img,
.b2c-product-hover-ready .product-image{
  transform-origin:center center !important;
  transition:
    transform .36s cubic-bezier(.2,.8,.2,1),
    filter .30s ease !important;
  will-change:transform,filter;
}

.b2c-product-hover-ready:hover .b2c-product-hover-img,
.b2c-product-hover-ready:hover .product-image{
  transform:scale(1.025) !important;
  filter:saturate(1.035) brightness(1.01) !important;
}

/* Pink block only inside the current card body. */
.b2c-product-hover-ready .b2c-product-hover-body,
.b2c-product-hover-ready .product-body,
.b2c-product-hover-ready .product-info,
.b2c-product-hover-ready .card-body{
  position:relative !important;
  overflow:hidden !important;
  isolation:isolate;
}

.b2c-product-hover-ready .b2c-product-hover-body::before,
.b2c-product-hover-ready .product-body::before,
.b2c-product-hover-ready .product-info::before,
.b2c-product-hover-ready .card-body::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background:
    radial-gradient(circle at 100% 18%,rgba(255,205,232,.78),transparent 42%),
    linear-gradient(270deg,rgba(255,222,240,.92),rgba(255,242,249,.78) 48%,rgba(255,255,255,0) 100%) !important;
  transform:translateX(104%) !important;
  opacity:0 !important;
  transition:
    transform .40s cubic-bezier(.22,.61,.36,1),
    opacity .24s ease !important;
  pointer-events:none;
}

.b2c-product-hover-ready:hover .b2c-product-hover-body::before,
.b2c-product-hover-ready:hover .product-body::before,
.b2c-product-hover-ready:hover .product-info::before,
.b2c-product-hover-ready:hover .card-body::before{
  transform:translateX(0) !important;
  opacity:1 !important;
}

.b2c-product-hover-ready .b2c-product-hover-body > *,
.b2c-product-hover-ready .product-body > *,
.b2c-product-hover-ready .product-info > *,
.b2c-product-hover-ready .card-body > *{
  position:relative;
  z-index:1;
}

.b2c-product-hover-ready:hover .product-status,
.b2c-product-hover-ready:hover .product-name,
.b2c-product-hover-ready:hover .price{
  transform:translateX(3px) !important;
}

/* Remove old sweep completely. */
.b2c-product-hover-ready .b2c-product-hover-add::after,
.b2c-product-hover-ready .product-actions button:not(:disabled)::after{
  display:none !important;
  content:none !important;
}

/* New add-cart effect: soft static halo + breathing rim, no sweeping. */
.b2c-product-hover-ready .b2c-product-hover-add,
.b2c-product-hover-ready .product-actions button:not(:disabled){
  position:relative !important;
  overflow:hidden !important;
  isolation:isolate;
  transition:
    transform .20s cubic-bezier(.2,.8,.2,1),
    box-shadow .28s ease,
    background .24s ease !important;
}

.b2c-product-hover-ready .b2c-product-hover-add::before,
.b2c-product-hover-ready .product-actions button:not(:disabled)::before{
  content:"" !important;
  position:absolute !important;
  inset:2px !important;
  border-radius:inherit !important;
  pointer-events:none !important;
  z-index:0 !important;
  background:transparent !important;
  opacity:0 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.34),
    0 0 0 0 rgba(255,255,255,.00),
    0 0 18px rgba(255,255,255,.00) !important;
  filter:none !important;
}

.b2c-product-hover-ready:hover .b2c-product-hover-add,
.b2c-product-hover-ready:hover .product-actions button:not(:disabled){
  transform:translateY(-1px) !important;
  box-shadow:
    0 12px 26px rgba(25,23,31,.18),
    inset 0 0 0 1px rgba(255,255,255,.40),
    0 0 0 3px rgba(255,255,255,.16) !important;
}

.b2c-product-hover-ready:hover .b2c-product-hover-add::before,
.b2c-product-hover-ready:hover .product-actions button:not(:disabled)::before{
  opacity:1 !important;
  animation:b2cAddHaloBreathOnly 1.65s ease-in-out infinite !important;
}

.b2c-product-click-pulse .b2c-product-hover-add{
  animation:b2cAddClickPulse .42s ease-out 1 !important;
}

@keyframes b2cAddHaloBreathOnly{
  0%,100%{
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.30),
      0 0 0 0 rgba(255,255,255,.10),
      0 0 10px rgba(255,255,255,.10);
  }
  50%{
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.72),
      0 0 0 4px rgba(255,255,255,.18),
      0 0 24px rgba(255,255,255,.34);
  }
}

@keyframes b2cAddClickPulse{
  0%{transform:scale(1)}
  48%{transform:scale(.965)}
  100%{transform:scale(1)}
}

@media (prefers-reduced-motion: reduce){
  .b2c-product-hover-ready,
  .b2c-product-hover-ready *,
  .b2c-product-hover-ready *::before,
  .b2c-product-hover-ready *::after{
    transition:none !important;
    animation:none !important;
  }
}

@media (hover:none){
  .b2c-product-hover-ready:hover{
    transform:none !important;
  }
  .b2c-product-hover-ready:hover .b2c-product-hover-img,
  .b2c-product-hover-ready:hover .product-image{
    transform:none !important;
    filter:none !important;
  }
  .b2c-product-hover-ready:hover .b2c-product-hover-body::before,
  .b2c-product-hover-ready:hover .product-body::before,
  .b2c-product-hover-ready:hover .product-info::before,
  .b2c-product-hover-ready:hover .card-body::before{
    transform:translateX(104%) !important;
    opacity:0 !important;
  }
}
