/*
 * Home banner, uploaded photo (inc/home-banner-media.php, .home-banner__media--photo): not a product card
 * but a large photo filling the right part of the slide, its edge faded into the slide colour with a mask
 * (no hard cut, no frame). Phones: the photo fills the bottom and fades up into the text.
 * The photo stays still (a slow zoom looked jittery). Loaded last of the banner styles.
 */

.home-banner__slide--media-image::before {
  display: none; /* The glow disc would show through the faded edge. */
}

.home-banner__media--photo {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -1;
  width: 58%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 42%);
  mask-image: linear-gradient(to right, transparent 0, #000 42%);
}

/* The photo never sizes the slide: it fills whatever box the media gets. */
.home-banner__media--photo .home-banner__image-link,
.home-banner__media--photo .home-banner__image {
  position: absolute;
  inset: 0;
}

.home-banner__media--photo .home-banner__image {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

/* No tilt / straighten (that entrance is for product cards in -media.css). */
.home-banner.is-ready .home-banner__slide .home-banner__media--photo .home-banner__image {
  transform: none;
  transition: none;
}

/* Badge (photo + product price) sits in the photo's lower right. */
.home-banner__media--photo .home-banner__badge {
  top: auto;
  right: var(--space-6);
  bottom: var(--space-6);
  left: auto;
}

/* Phones: text on top, the photo under it across the whole width, fading up. */
@media (max-width: 699px) {
  /* Second row takes the rest of the slide (slides share the tallest height), so the photo reaches the bottom. */
  .home-banner__slide--media-image {
    grid-template-rows: auto 1fr;
    align-content: stretch;
    padding-bottom: 0;
  }

  .home-banner__media--photo {
    position: relative;
    inset: auto;
    align-self: stretch;
    justify-self: stretch;
    width: auto;
    min-height: 12rem;
    margin: calc(-1 * var(--space-7)) calc(-1 * var(--space-5)) 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 45%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 45%);
  }

  .home-banner__media--photo .home-banner__badge {
    right: var(--space-4);
    bottom: var(--space-4);
  }
}
