/*
  "Photo on the way" placeholder for broken Google Drive-hosted images.

  The originals were deleted from Drive; the client is re-uploading them. Until
  then, any image whose src points at drive.google.com is shown as this branded
  placeholder instead of a broken image. Paired with
  snippets/coming-soon-image.html and assets/coming-soon-image.js (the JS must
  emit the same markup). This whole bundle can be removed once every product has
  a real image again.

  Design: deep-navy brand panel (#0a2749) with a soft inner frame, a white
  "camera" chip, a reassuring two-line label, and a light sweep that signals an
  image is on its way.
*/

/* Hide broken Drive images before the JS in coming-soon-image.js swaps them,
   so the broken-image glyph never flashes. The JS replaces the <img> with a
   placeholder element, which is not matched by this selector and stays visible. */
img[src*="drive.google.com"] {
  visibility: hidden !important;
}

.coming-soon-image {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  box-sizing: border-box;
  padding: 1rem 1.25rem;
  text-align: center;
  overflow: hidden;
  color: #fff;
  /* Brand navy with a subtle diagonal for depth. */
  background-color: #0a2749;
  background-image: linear-gradient(160deg, #143459 0%, #081d38 100%);
  font-size: clamp(0.72rem, 2vw, 0.95rem);
  line-height: 1.3;
}

/* Faint blueprint grid — a subtle nod to the trade/technical brand so the panel
   reads as a designed surface, not an empty box. Sits above the background and
   below the frame, sweep, and content. */
.coming-soon-image::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 24px);
}

/* Soft inner frame — reads as "a photo will be framed here". */
.coming-soon-image__frame {
  position: absolute;
  inset: clamp(8px, 6%, 22px);
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  pointer-events: none;
}

/* Light sweep across the panel — the "image is on the way" cue. Pure CSS, so it
   applies to both the server-rendered snippet and the JS-injected placeholder.
   Sits behind the chip/label (those get z-index 2) and pauses between passes. */
.coming-soon-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: coming-soon-shimmer 2.6s ease-in-out infinite;
}

@keyframes coming-soon-shimmer {
  0% {
    transform: translateX(-100%);
  }
  65%,
  100% {
    transform: translateX(100%);
  }
}

/* Respect users who ask for reduced motion: keep the static look, drop the sweep. */
@media (prefers-reduced-motion: reduce) {
  .coming-soon-image::after {
    animation: none;
    opacity: 0;
  }
}

/* White "camera chip" focal point. */
.coming-soon-image__chip {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(40px, 24%, 64px);
  aspect-ratio: 1;
  margin-bottom: 0.15em;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.coming-soon-image__icon {
  width: 52%;
  height: auto;
  color: #fff;
}

.coming-soon-image__title {
  position: relative;
  z-index: 2;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
}

.coming-soon-image__sub {
  position: relative;
  z-index: 2;
  max-width: 92%;
  font-size: clamp(0.66rem, 1.2vw, 0.8rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.68);
}

/* In-flow contexts (e.g. images embedded in richtext product descriptions):
   keep a sensible block size instead of collapsing. */
.coming-soon-image:not(.coming-soon-image--fill) {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  aspect-ratio: 1 / 1;
}

/* Media-box contexts (product/collection cards, PDP gallery): absolutely fill
   the positioned ratio container the image used to occupy. */
.coming-soon-image--fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
