/* Sprint 25 — premium commerce interactions, image consistency and quick-view safety */

article.pcv2-card {
  isolation: isolate;
  transform: translateZ(0);
  transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease, border-color .24s ease !important;
}

article.pcv2-card > .pcv2-media {
  position: relative !important;
  background:
    radial-gradient(circle at 48% 30%, rgba(255,255,255,.99) 0 25%, rgba(248,251,253,.97) 54%, rgba(234,241,247,.96) 100%) !important;
}

article.pcv2-card .pcv2-image-link {
  display: grid !important;
  place-items: center !important;
  padding: 10px !important;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(245,249,252,.90)) !important;
}

article.pcv2-card .pcv2-main-img,
article.pcv2-card .pcv2-hover-img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  padding: clamp(6px, 3%, 12px) !important;
  transform-origin: center center !important;
}

/* Keep Quick View compact: icon-only, no wrapping or image collision. */
article.pcv2-card .pcv2-preview {
  right: 12px !important;
  bottom: 12px !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  overflow: visible !important;
  white-space: nowrap !important;
  background: rgba(255,255,255,.96) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 8px 20px rgba(15,23,42,.13) !important;
}

article.pcv2-card .pcv2-preview-label { display: none !important; }
article.pcv2-card .pcv2-preview .ps-svg-icon { width: 18px !important; height: 18px !important; }

article.pcv2-card .pcv2-preview::after {
  content: "Quick view";
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%) translateX(5px);
  opacity: 0;
  pointer-events: none;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(15,23,42,.94);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(15,23,42,.18);
  transition: opacity .18s ease, transform .18s ease;
}

article.pcv2-card .pcv2-preview::before {
  content: "";
  position: absolute;
  right: 42px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  border: 5px solid transparent;
  border-left-color: rgba(15,23,42,.94);
  transition: opacity .18s ease;
}

article.pcv2-card .pcv2-buy {
  background: linear-gradient(135deg, #0a9a6b, #087b59) !important;
  box-shadow: 0 7px 16px rgba(8,123,89,.18) !important;
}
article.pcv2-card .pcv2-buy:hover {
  background: linear-gradient(135deg, #0bad78, #087653) !important;
  box-shadow: 0 10px 22px rgba(8,123,89,.28) !important;
}
article.pcv2-card .pcv2-cart:hover,
article.pcv2-card .pcv2-view:hover { transform: translateY(-1px) !important; }

article.pcv2-card .pcv2-current-price {
  font-variant-numeric: tabular-nums;
}

@media (hover:hover) and (pointer:fine) {
  article.pcv2-card:hover {
    transform: translateY(-7px) !important;
    border-color: rgba(10,154,107,.34) !important;
    box-shadow: 0 22px 42px rgba(15,23,42,.17) !important;
  }
  article.pcv2-card:hover .pcv2-main-img {
    transform: scale(1.065) !important;
    filter: drop-shadow(0 16px 18px rgba(15,23,42,.17)) !important;
  }
  article.pcv2-card .pcv2-preview:hover,
  article.pcv2-card .pcv2-preview:focus-visible {
    background: #0b8f64 !important;
    border-color: #0b8f64 !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
  }
  article.pcv2-card .pcv2-preview:hover::after,
  article.pcv2-card .pcv2-preview:focus-visible::after,
  article.pcv2-card .pcv2-preview:hover::before,
  article.pcv2-card .pcv2-preview:focus-visible::before {
    opacity: 1;
  }
  article.pcv2-card .pcv2-preview:hover::after,
  article.pcv2-card .pcv2-preview:focus-visible::after {
    transform: translateY(-50%) translateX(0);
  }
}

@media (max-width: 767px) {
  article.pcv2-card .pcv2-image-link { padding: 6px !important; }
  article.pcv2-card .pcv2-preview {
    right: 9px !important;
    bottom: 9px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
  }
  article.pcv2-card .pcv2-preview::before,
  article.pcv2-card .pcv2-preview::after { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  article.pcv2-card,
  article.pcv2-card .pcv2-main-img,
  article.pcv2-card .pcv2-preview,
  article.pcv2-card .pcv2-preview::after,
  article.pcv2-card .pcv2-preview::before,
  article.pcv2-card .pcv2-btn { transition: none !important; }
}
