/* Fun Fruit - Galería de producto (vanilla JS, sin dependencias externas) */

.ff-product-gallery {
  display: flex;
  width: 100%;
  max-width: 590px;
  height: 500px;
  background: #FFFFFF;
  font-family: inherit;
}

/* ---- Columna de miniaturas (izquierda, vertical) ---- */
.ff-gallery-thumbs {
  width: 86px;
  height: 500px;
  background: #FFFFFF;
  padding: 8px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ff-gallery-thumb {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  border-radius: 2px;
  overflow: hidden;
  transition: opacity 0.2s, border-color 0.2s;
}
.ff-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ff-gallery-thumb.is-active {
  opacity: 1;
  border-color: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

/* ---- Área principal (derecha) ---- */
.ff-gallery-main {
  position: relative;
  flex: 1;
  height: 500px;
  background: #FFFFFF;
  overflow: hidden;
}
.ff-gallery-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.ff-gallery-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.ff-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ---- Flechas de navegación ---- */
.ff-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0,0,0,0.45) !important;
  border-radius: 50% !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  z-index: 5;
  transition: background 0.2s;
}
.ff-gallery-arrow:hover {
  background: rgba(0,0,0,0.65) !important;
}
.ff-gallery-arrow svg {
  width: 14px !important;
  height: 14px !important;
  fill: #FFFFFF !important;
  display: block !important;
}
.ff-gallery-arrow-prev { left: 15px; }
.ff-gallery-arrow-next { right: 15px; }

/* ---- Botón play/pause ---- */
.ff-gallery-play-pause {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50% !important;
  background: rgba(0,0,0,0.45) !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s;
}
.ff-gallery-play-pause:hover {
  background: rgba(0,0,0,0.65) !important;
}
.ff-gallery-play-pause svg {
  width: 13px !important;
  height: 13px !important;
  fill: #FFFFFF !important;
}
.ff-gallery-play-pause .ff-icon-pause {
  display: block !important;
}
.ff-gallery-play-pause .ff-icon-play {
  display: none !important;
}
.ff-gallery-play-pause.is-paused .ff-icon-pause {
  display: none !important;
}
.ff-gallery-play-pause.is-paused .ff-icon-play {
  display: block !important;
}

/* ---- Panel de texto (título de imagen) ---- */
.ff-gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.5);
  color: #FFFFFF;
  padding: 12px 20px;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 4;
}
.ff-gallery-main:hover .ff-gallery-caption {
  opacity: 1;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .ff-product-gallery {
    flex-direction: column;
    height: auto;
    max-width: 100%;
  }
  .ff-gallery-thumbs {
    width: 100%;
    height: 86px;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .ff-gallery-main {
    width: 100%;
    height: 380px;
  }
}
