/*
 * NUVA IRIS responsive photographic media correction v1.8.7.
 * Keep the actual image/artwork intact; no image files or checkout functionality altered.
 * Location guides: full photo on all viewports, no forced square or landscape crop.
 */

.nuva-local-intent .nli-hero__media img {
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: auto !important;
  max-height: none;
  object-fit: contain !important;
}

.nuva-local-intent .nli-gallery {
  align-items: start;
}
.nuva-local-intent .nli-gallery figure {
  min-width: 0;
  align-self: start;
}
.nuva-local-intent .nli-gallery figure img {
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
}

/* Gift-editorial pages: preserve the photograph's native framing. */
.ngi .ngi-hero__art--editorial img,
.ngi .ngi-editorial-card img {
  display: block;
  width: 100%;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
}

/* Mobile: place content and CTA before large imagery; don't crop portraits. */
@media (max-width: 760px) {
  .nuva-local-intent .nli-hero {
    padding-top: 30px;
  }
  .nuva-local-intent .nli-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .nuva-local-intent .nli-hero__copy {
    min-width: 0;
  }
  .nuva-local-intent .nli-hero__media {
    order: 0 !important;
    min-width: 0;
    max-width: 100%;
  }
  .nuva-local-intent .nli-gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  /* Some gift templates use a separate hero image style. */
  .ngi .ngi-hero__art img {
    width: 100%;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }

  /* Full-bleed editorial photos and keepsakes must remain fully visible. */
  .npg-page .npg-hero__media,
  .npg-page .npg-gift-media,
  .nxc .nxc-hero__visual {
    aspect-ratio: auto !important;
  }
  .npg-page .npg-hero__media img,
  .npg-page .npg-gift-media img,
  .nxc .nxc-hero__visual img {
    display: block;
    width: 100%;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }

  /* Mosaic galleries retain their designed layout, but never crop subjects. */
  .npg-page .npg-gallery img,
  .nxc .nxc-visual figure img {
    object-fit: contain !important;
  }

  /* Iris-art landing heroes: show the entire original composition. */
  .nuva-pillar .nuva-pillar-hero__visual img,
  .nuva-pillar .nuva-pillar-media-stack img {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }
  .ncp .ncp-hero__main,
  .nfa .nfa-hero__main,
  .nuva-custom-iris-art-page .nca-hero__tile--single img {
    object-fit: contain !important;
    background-color: #0a0a0a;
  }
}
