/* Async product image loader */
.ph-img-host,
.ph-img-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.ph-pdp-card__img.ph-img-host {
  display: flex;
  width: 100%;
  min-height: 120px;
}

.ph-img-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ff6e0c;
  border-radius: 50%;
  animation: ph-img-spin 0.7s linear infinite;
  z-index: 2;
  pointer-events: none;
}

.ph-img-host.is-loaded .ph-img-spinner,
.ph-img-host.is-error .ph-img-spinner,
.ph-img-wrap.is-loaded .ph-img-spinner,
.ph-img-wrap.is-error .ph-img-spinner {
  display: none;
}

@keyframes ph-img-spin {
  to { transform: rotate(360deg); }
}

img.ph-img-async {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ph-img-host.is-loaded img.ph-img-async,
.ph-img-wrap.is-loaded img.ph-img-async {
  opacity: 1;
}

.ph-img-host.is-error::after,
.ph-img-wrap.is-error::after {
  content: "sin imagen";
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.75rem;
  z-index: 1;
}

.ph-img-host.is-error img.ph-img-async,
.ph-img-wrap.is-error img.ph-img-async {
  display: none;
}

/* stamp composites: host is <a>, keep flex children behaving */
.stamp-composite > a.ph-img-host {
  display: inline-flex;
}
