/* Upcuan 3.3.0.48 — Homepage Image inside the homepage hero */

/* When Homepage Image exists the existing hero grid becomes a balanced
   two-column layout. The left content remains dominant and the image occupies
   the right side without being cropped. */
.hero-row.has-homepage-image {
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .9fr) !important;
  gap: clamp(36px, 5vw, 84px) !important;
}

.upc-homepage-image-wrap {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  padding: 20px 0;
}

.upc-homepage-image {
  display: block !important;
  width: auto !important;
  max-width: min(100%, 430px) !important;
  max-height: 470px !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 18px !important;
  background: transparent !important;
  box-shadow: 0 24px 55px rgba(0, 0, 0, .24) !important;
}

/* Do not reserve a blank image column if no Homepage Image has been uploaded. */
.hero-row:not(.has-homepage-image) {
  grid-template-columns: minmax(0, 1fr) !important;
}

@media (max-width: 991.98px) {
  .hero-row.has-homepage-image,
  .hero-row:not(.has-homepage-image) {
    grid-template-columns: 1fr !important;
  }

  .upc-homepage-image-wrap {
    padding: 8px 0 0;
  }

  .upc-homepage-image {
    max-width: min(82vw, 360px) !important;
    max-height: 380px !important;
  }
}

@media (max-width: 575.98px) {
  .upc-homepage-image {
    max-width: min(84vw, 300px) !important;
    max-height: 330px !important;
    border-radius: 14px !important;
  }
}
