/* Product screenshots on software-solutions pages */
.product-gallery {
  margin: 0 0 28px;
}

.product-gallery > p {
  color: var(--muted, #5d687c);
  margin: 0 0 18px;
  max-width: 720px;
}

.product-gallery-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}

.product-gallery-grid.supporting,
.product-gallery-grid.overview {
  margin-top: 0;
}

.product-gallery-grid.mobile-shots {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  max-width: 760px;
  margin-inline: auto;
}

.product-shot {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line, #dfe5ef);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(16, 40, 79, 0.06);
}

.product-shot img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  cursor: zoom-in;
  transition: transform 0.2s ease;
  transform-origin: center center;
}

.product-shot:hover img,
.product-shot:focus-within img {
  transform: scale(1.04);
}

.product-shot figcaption {
  padding: 12px 14px 14px;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--muted, #5d687c);
  border-top: 1px solid var(--line, #dfe5ef);
  background: var(--soft-2, #f3f6fb);
}

.product-shot.phone {
  max-width: 360px;
  margin-inline: auto;
}

.product-shot.phone img {
  transform-origin: top center;
}

/* Lightbox */
.product-lightbox[hidden] {
  display: none !important;
}

.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
  overscroll-behavior: contain;
  background: rgba(16, 40, 79, 0.82);
  backdrop-filter: blur(2px);
}

.product-lightbox__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: min(1280px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.product-lightbox__img {
  display: block;
  max-width: min(1280px, calc(100vw - 48px));
  max-height: calc(100vh - 110px);
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.product-lightbox__caption {
  margin: 12px 4px 0;
  max-width: min(1280px, calc(100vw - 48px));
  color: #fff;
  font-size: 0.98rem;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.product-lightbox__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #172033;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.product-lightbox__close:hover,
.product-lightbox__close:focus-visible {
  background: #eef4ff;
  outline: 2px solid #174ea6;
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .product-gallery-grid.mobile-shots {
    grid-template-columns: 1fr;
  }

  .product-lightbox {
    padding: 16px;
  }

  .product-lightbox__dialog {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
  }

  .product-lightbox__img {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 100px);
  }

  .product-lightbox__close {
    top: 6px;
    right: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-shot img {
    transition: none;
  }

  .product-shot:hover img,
  .product-shot:focus-within img {
    transform: none;
  }
}
