/* Woo Product In Cart : apparence du check.
   Le « content » qui le rend visible est ajouté par la balise .wpic-state, pour les seuls produits du panier. */

:root {
  --wpic-color: #1fa83c;
  --wpic-size: 50%;          /* grilles : par rapport à la largeur de la photo */
  --wpic-max-size: 150px;
  --wpic-single-size: 96px;  /* fiche produit et aperçu rapide */
}

.woocommerce-product-gallery,
.product-quick-view-container .product-gallery { position: relative; }

.product-small > .box-image:not(.processing)::after,
.mlps-card__media::after,
.woocommerce-product-gallery::after,
.product-quick-view-container .product-gallery::after {
  position: absolute;
  z-index: 5;
  aspect-ratio: 1;
  pointer-events: none; /* les clics traversent : lien, zoom, aperçu rapide */
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fff, 0 4px 18px rgba(0, 0, 0, .35);
  background: var(--wpic-color) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.8l4.6 4.6L19 7.6'/%3E%3C/svg%3E") center / 78% no-repeat;
  animation: wpic-pop .3s ease-out;
}

/* Grilles : au centre de la photo */
.product-small > .box-image:not(.processing)::after,
.mlps-card__media::after {
  top: 50%;
  left: 50%;
  width: var(--wpic-size);
  max-width: var(--wpic-max-size);
  translate: -50% -50%; /* et non transform : l'animation « scale » doit rester centrée */
}

/* Fiche produit et aperçu rapide : dans l'angle, pour laisser la photo lisible */
.woocommerce-product-gallery::after,
.product-quick-view-container .product-gallery::after {
  right: 20px;
  bottom: 20px;
  width: var(--wpic-single-size);
}

@keyframes wpic-pop {
  from { scale: .3; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .product-small > .box-image:not(.processing)::after,
  .mlps-card__media::after,
  .woocommerce-product-gallery::after,
  .product-quick-view-container .product-gallery::after { animation: none; }
}
