/* Galería de la ficha de producto: todas las fotos visibles y visor ampliado. */
.product-detail-media {
  position: static;
}

.product-gallery-panel {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.product-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.product-gallery-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.product-gallery-header span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.product-gallery.detail-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-gallery .gallery-thumb {
  border-radius: 9px;
  box-shadow: 0 7px 18px rgba(31, 74, 46, .08);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}

.detail-gallery .gallery-thumb:hover,
.detail-gallery .gallery-thumb:focus-visible,
.detail-gallery .gallery-thumb.is-active {
  transform: translateY(-2px);
  box-shadow: 0 11px 24px rgba(31, 74, 46, .16);
}

.detail-gallery .gallery-thumb img {
  aspect-ratio: 4 / 3;
  border-radius: 7px;
}

.image-lightbox-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.image-lightbox-figure img {
  max-height: calc(100vh - 260px);
}

.image-lightbox-thumbs {
  grid-column: 1 / -1;
  display: flex;
  gap: 9px;
  padding: 2px 0 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.image-lightbox-thumb {
  flex: 0 0 76px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  opacity: .68;
  transition: border-color .18s, opacity .18s;
}

.image-lightbox-thumb:hover,
.image-lightbox-thumb:focus-visible,
.image-lightbox-thumb.is-active {
  border-color: var(--green);
  opacity: 1;
}

.image-lightbox-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (max-width: 560px) {
  .product-gallery-header {
    align-items: start;
    display: grid;
    gap: 3px;
  }

  .product-gallery-header span {
    text-align: left;
  }

  .product-gallery.detail-gallery {
    gap: 8px;
  }

  .image-lightbox-figure img {
    max-height: calc(100dvh - 235px);
  }

  .image-lightbox-thumb {
    flex-basis: 64px;
  }
}
