.rst-product-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.rst-product-gallery .main-image {
  position: relative;
  width: 100%;
  text-align: center;
}

.rst-product-gallery .main-image img {
  width: 100%;
  object-fit: contain;
  border-radius: 4px;
  cursor: pointer;
}

/* Controles sobre la imagen principal */
.main-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  font-size: 1.5em;
  border: none;
  border-radius: 4px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  cursor: pointer;
  z-index: 10;
}

.main-control.left { left: 10px; }
.main-control.right { right: 10px; }
.main-control:hover { background: var(--main-color, #3498db); }

/* Miniaturas */
.thumbnails-wrapper {
  margin-top: 10px;
  display: flex;
  justify-content: center; /* Centra todas las miniaturas */
  overflow: hidden;        /* Quita el scroll */
}

.thumbnails {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;         /* Si hay muchas, saltan a otra fila */
  justify-content: center;
}

.thumbnail {
  cursor: pointer;
  width: 70px;
  height: 70px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 6px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

/* Miniatura activa */
.thumbnail.active-thumb {
  border: 3px solid var(--main-color, #3498db); /* Más visible */
  transform: scale(1.1);
}

.thumbnail:hover {
  border-color: var(--main-color, #3498db);
  transform: scale(1.05);
}

/* === Lightbox === */
.rst-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  box-sizing: border-box;
}

.rst-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.rst-lightbox .close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  z-index: 100000;
  font-weight: bold;
  transition: color 0.3s;
}

.rst-lightbox .close:hover {
  color: var(--main-color, #3498db);
}
