/* Mobile home advantages: preserve the desktop three-column layout. */
@media (max-width: 900px) {
  .advantages {
    padding-right: 20px;
    overflow: visible;
  }

  .advantageGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .advantageGrid article {
    width: 100%;
    max-width: none;
    min-height: 0;
    flex: none;
  }
}

/* Product image lightbox. */
.galleryMain > img {
  cursor: zoom-in;
}

.galleryMain > img:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}

.productZoomHint {
  position: absolute;
  z-index: 2;
  right: 16px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  color: #fff;
  background: #111c;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.productLightbox {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 58px 72px 22px;
  background: #080a0af5;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.productLightbox.open {
  opacity: 1;
  visibility: visible;
}

.productLightbox__stage {
  min-height: 0;
  display: grid;
  place-items: center;
}

.productLightbox__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #f2f3f1;
  box-shadow: 0 24px 80px #0009;
}

.productLightbox__close,
.productLightbox__prev,
.productLightbox__next {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 1px solid #ffffff45;
  border-radius: 50%;
  color: #fff;
  background: #111b;
  font-size: 27px;
}

.productLightbox__close { top: 18px; right: 20px; }
.productLightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.productLightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

.productLightbox__footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 78px;
}

.productLightbox__thumbs {
  display: flex;
  gap: 8px;
  max-width: min(720px, 75vw);
  overflow-x: auto;
  padding: 4px;
}

.productLightbox__thumbs button {
  flex: 0 0 68px;
  width: 68px;
  height: 54px;
  padding: 0;
  border: 2px solid transparent;
  background: #222;
  overflow: hidden;
}

.productLightbox__thumbs button.active { border-color: #e23a31; }
.productLightbox__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.productLightbox__count { min-width: 54px; color: #d9ddda; font-size: 12px; font-weight: 800; }

@media (max-width: 700px) {
  .productLightbox { padding: 58px 12px 14px; }
  .productLightbox__prev,
  .productLightbox__next { width: 42px; height: 42px; }
  .productLightbox__prev { left: 8px; }
  .productLightbox__next { right: 8px; }
  .productLightbox__footer { min-height: 68px; gap: 6px; }
  .productLightbox__thumbs { max-width: calc(100vw - 84px); }
  .productLightbox__thumbs button { flex-basis: 58px; width: 58px; height: 46px; }
  .productZoomHint { top: 12px; right: 12px; padding: 8px 10px; font-size: 11px; }
}
