.sunday-singles {
  position: relative;
  overflow: hidden;
  background: var(--ss-color-bg);
  font-family: var(--ss-font-body);
  --sunday-singles-title-size: clamp(5rem, 10vw, 10rem);
}

.sunday-singles__stage {
  position: relative;
}

.sunday-singles__title {
  color: var(--ss-white);
  font-size: var(--sunday-singles-title-size);
  line-height: 0.78;
  text-align: center;
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.sunday-singles__heading {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
}

.sunday-singles--title-above {
  padding-block: var(--ss-space-7) var(--ss-space-8);
}

.sunday-singles--title-above .sunday-singles__stage {
  display: flex;
  flex-direction: column;
  gap: var(--ss-space-5);
}

.sunday-singles--title-above .sunday-singles__title {
  position: static;
  z-index: auto;
  transform: none;
  color: var(--ss-color-primary);
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 0.9;
  text-shadow: none;
  pointer-events: auto;
}

.sunday-singles--title-above .sunday-product {
  aspect-ratio: 1 / 1;
  max-height: none;
}

/* Inset the product art so the tile background color forms a clear frame. */
.sunday-singles--title-above
  .sunday-product:not(.sunday-product--full-image)
  .sunday-product__face {
  padding: 0;
}

.sunday-singles--title-above
  .sunday-product:not(.sunday-product--full-image):has(.sunday-product__title)
  .sunday-product__face {
  padding-bottom: 0;
}

.sunday-singles--title-above
  .sunday-product:not(.sunday-product--full-image)
  .sunday-product__media:not(.sunday-product__media--video) {
  width: 70%;
  height: 70%;
}

.sunday-singles--title-above
  .sunday-product:not(.sunday-product--full-image)
  .sunday-product__media--video {
  width: 70%;
  height: 70%;
}

.sunday-singles__grid {
  display: grid;
  grid-template-columns: repeat(
    var(--sunday-singles-grid-columns, 4),
    minmax(0, 1fr)
  );
  gap: 0;
  align-items: stretch;
  justify-items: stretch;
  min-width: 0;
}

.sunday-product {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1.12;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--sunday-product-front-bg, var(--ss-coral));
  perspective: 1200px;
  container-type: size;
  --sunday-singles-title-size: clamp(1.25rem, 40cqw, 10rem);
}

.sunday-singles--height-capped .sunday-product {
  max-height: var(--sunday-singles-block-max-height);
}

a.sunday-product {
  color: inherit;
  text-decoration: none;
}

.sunday-product:focus {
  outline: none;
}

.sunday-product:focus-visible {
  z-index: 4;
  outline: 3px solid var(--ss-white);
  outline-offset: -6px;
}

.sunday-product__inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sunday-product:hover .sunday-product__inner,
.sunday-product:focus-visible .sunday-product__inner {
  transform: rotateY(180deg);
}

.sunday-product__face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.sunday-product__face--front {
  background: var(--sunday-product-front-bg, var(--ss-coral));
  transform: rotateY(0deg) translateZ(1px);
}

.sunday-product__face--back {
  background: var(--sunday-product-back-bg, var(--ss-green));
  transform: rotateY(180deg) translateZ(1px);
}

.sunday-product__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.sunday-product__face--front
  .sunday-product__media:not(.sunday-product__media--video) {
  transform: scale(var(--sunday-product-front-scale, 1));
}

.sunday-product__face--back
  .sunday-product__media:not(.sunday-product__media--video) {
  transform: scale(var(--sunday-product-back-scale, 1));
}

.sunday-product__media--video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  transform: none;
}

.sunday-product__media--video theme-video-media,
.sunday-product__media--video .sunday-product__video,
.sunday-product__media--video .theme-video-media {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto !important;
}

.sunday-product__media--video .theme-video-media__poster,
.sunday-product__media--video .theme-video-media__media,
.sunday-product__media--video .theme-video-media__media video,
.sunday-product__media--video .theme-video-media__media iframe {
  width: 100%;
  height: 100%;
}

.sunday-product__media--video .theme-video-media__poster img {
  object-fit: contain;
  object-position: center;
}

.sunday-product__media--video .theme-video-media__media video,
.sunday-product__media--video .theme-video-media__media iframe {
  object-fit: contain;
  object-position: center;
}

.sunday-product__media--video .theme-video-media__play-button {
  display: none !important;
}

.sunday-product__media--video video::-webkit-media-controls {
  display: none !important;
}

.sunday-product__media--video video::-webkit-media-controls-enclosure {
  display: none !important;
}

.sunday-product__media--video video {
  pointer-events: none;
}

.sunday-product--full-image
  .sunday-product__media--video
  .theme-video-media__poster
  img,
.sunday-product--full-image
  .sunday-product__media--video
  .theme-video-media__media
  video,
.sunday-product--full-image
  .sunday-product__media--video
  .theme-video-media__media
  iframe {
  object-fit: cover;
}

.sunday-product__media img {
  display: block;
  flex: 0 1 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.sunday-product:not(.sunday-product--full-image) .sunday-product__face {
  padding: clamp(1rem, 3.5cqw, 1.75rem);
}

.sunday-product:not(.sunday-product--full-image):has(.sunday-product__title)
  .sunday-product__face {
  padding-bottom: clamp(2rem, 20cqh, 7.5rem);
}

.sunday-product--full-image .sunday-product__face {
  padding: 0;
}

.sunday-product--full-image .sunday-product__media {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.sunday-product--full-image .sunday-product__media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
}

.sunday-product__title {
  position: absolute;
  inset: auto 0 clamp(0.15rem, 1cqh, 0.35rem);
  z-index: 2;
  width: 100%;
  padding-inline: 4%;
}

@media (min-width: 821px) {
  .sunday-product__title {
    font-size: 101px;
  }
}

@media (max-width: 1100px) {
  .sunday-singles__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .sunday-singles {
    --sunday-singles-title-size: clamp(3.25rem, 18vw, 6rem);
  }

  .sunday-product {
    --sunday-singles-title-size: clamp(1.25rem, 36cqw, 6rem);
  }
}

@media (max-width: 560px) {
  .sunday-product {
    aspect-ratio: 1 / 1.08;
  }

  .sunday-singles--title-above .sunday-product {
    aspect-ratio: 1 / 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sunday-product__inner {
    transition: none;
  }
}
