/* =========================================================
   ESTILOS EXCLUSIVOS DE CATÁLOGO & VISOR LIGHTBOX
   ========================================================= */

/* Contenedor del panel de catálogo */
.catalogo-panel {
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
}

/* Visor principal dentro de la tarjeta */
.catalogo-visor-box {
  width: 100%;
  max-width: 380px;
  max-height: 60vh;
  margin: 0 auto 14px auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #090611;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.catalogo-visor-box img {
  max-width: 100%;
  max-height: 58vh;
  height: auto;
  width: auto;
  display: block;
  object-fit: contain;
  transition: opacity 0.15s ease-in-out;
}

/* Indicador flotante para ampliar */
.visor-hint-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

/* Barra de progreso de rotación */
.visor-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.15);
}

.visor-progress-fill {
  width: 0%;
  height: 100%;
  background: #a855f7;
  box-shadow: 0 0 8px #a855f7;
}

/* Tira de miniaturas inferiores */
.catalogo-thumbs-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.thumb-item {
  width: 48px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  opacity: 0.5;
  background: #000;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-item:hover {
  opacity: 0.85;
}

.thumb-item.active {
  opacity: 1;
  border-color: #a855f7;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.7);
  transform: scale(1.06);
}

/* =========================================================
   MODAL LIGHTBOX FULLSCREEN (PANTALLA COMPLETA)
   ========================================================= */
#modal-visor {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 2, 10, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 999999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.modal-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 26px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 1000000;
}

.modal-nav-arrow:hover {
  background: #a855f7;
  transform: translateY(-50%) scale(1.1);
}

.modal-arrow-left {
  left: 24px;
}

.modal-arrow-right {
  right: 24px;
}

.modal-btn-cerrar {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 1000001;
}

.modal-btn-cerrar:hover {
  background: #ef4444;
}

.modal-imagen-contenedor {
  max-width: 90vw;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal-imagen-contenedor img {
  max-width: 86vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  transition: opacity 0.15s ease;
}

.modal-contador {
  margin-top: 12px;
  color: #cbd5e1;
  font-size: 13.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 16px;
  border-radius: 20px;
}

/* =========================================================
   RESPONSIVE MÓVIL
   ========================================================= */
@media (max-width: 768px) {
  .catalogo-panel {
    padding: 18px 12px;
  }

  .catalogo-visor-box {
    max-width: 320px;
    max-height: 52vh;
  }

  .catalogo-visor-box img {
    max-height: 50vh;
  }

  .thumb-item {
    width: 42px;
    height: 56px;
  }

  .modal-nav-arrow {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .modal-arrow-left {
    left: 10px;
  }

  .modal-arrow-right {
    right: 10px;
  }

  .modal-imagen-contenedor img {
    max-width: 92vw;
    max-height: 74vh;
  }
}