/* Product page of BravoGen Robot: the guide template plus the portrait demo video and the photo row */

.robot-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  align-items: center;
  gap: 56px;
}

.robot-video > video,
.robot-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hub-border);
  border-radius: var(--guide-radius);
  background: var(--hub-surface-2);
}

.robot-video > video {
  aspect-ratio: 9 / 16;
}

.robot-video > figcaption {
  margin-top: 10px;
}

.robot-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
}

@media (max-width: 720px) {
  .robot-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .robot-video {
    justify-self: center;
    width: min(100%, 320px);
  }
}

/* Phones: the photos scroll sideways one at a time instead of stacking three screens tall */
@media (max-width: 580px) {
  .robot-gallery {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--guide-gutter));
    padding-inline: var(--guide-gutter);
    scroll-padding-inline: var(--guide-gutter);
    scrollbar-width: none;
  }

  .robot-gallery > li {
    scroll-snap-align: start;
  }
}
