/* Lightbox / zoom de producto */

.zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1050;
  display: none;             /* 🔧 OCULTA POR DEFECTO */
  align-items: center;
  justify-content: center;
  padding: 8px;              /* margen mínimo alrededor */
}

.zoom-overlay-show {
  display: flex;             /* 🔧 SOLO CUANDO ABRIMOS EL ZOOM */
}

.zoom-overlay-inner {
  background: #111;
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-width: 92vw;           /* casi todo el ancho */
  max-height: 90vh;          /* casi toda la altura visible */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.zoom-header {
  margin-bottom: 8px;
}

.zoom-title {
  font-weight: 600;
  font-size: 1rem;
}

.zoom-caption {
  font-size: 0.85rem;
  color: #dddddd;
  margin-top: 2px;
}

.zoom-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.zoom-image-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 8px;
}

.zoom-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.15s ease-out, transform-origin 0.12s ease-out;
  cursor: zoom-in;
}

/* Evitar scroll del body cuando está abierto el zoom */
body.zoom-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .zoom-overlay-inner {
    padding: 12px 12px 16px;
  }
  .zoom-caption {
    font-size: 0.8rem;
  }
}
