/* ===== MERCHANDISE LIGHTBOX MODAL STYLES ===== */
/* Nota: Usa clases estándar de lightbox-modal de casas-prefabricadas.css */

.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.98);
  z-index: 9999;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.lightbox-modal[aria-hidden="false"] {
  display: flex !important;
}

/* Contenedor principal */
.lightbox-modal__inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

/* Imagen ampliada - PANTALLA COMPLETA */
.lightbox-modal__image {
  width: calc(100% - 120px);
  max-width: calc(100vw - 120px);
  height: calc(100% - 120px);
  max-height: calc(100vh - 120px);
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  box-shadow: none;
  animation: slideInImage 0.3s ease;
}

@keyframes slideInImage {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Botón cerrar - FIJO ARRIBA DERECHA */
.lightbox-modal__close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #e3d043;
  border: 0;
  font-size: 36px;
  cursor: pointer;
  color: #172f3e;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  padding: 0;
}

.lightbox-modal__close:hover {
  background: #f5e16a;
  transform: scale(1.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.lightbox-modal__close:active {
  transform: scale(1.05);
}

.lightbox-modal__close:focus {
  outline: 3px solid rgba(227, 208, 67, 0.8);
  outline-offset: 2px;
}

/* Botones navegación - FIJO IZQUIERDA Y DERECHA */
.lightbox-modal__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(227, 208, 67, 0.95);
  border: 0;
  color: #172f3e;
  font-size: 40px;
  cursor: pointer;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  padding: 0;
}

.lightbox-modal__prev {
  left: 20px;
}

.lightbox-modal__next {
  right: 20px;
}

.lightbox-modal__nav:hover {
  background: #e3d043;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.lightbox-modal__nav:active {
  transform: translateY(-50%) scale(0.95);
}

.lightbox-modal__nav:focus {
  outline: 3px solid rgba(227, 208, 67, 0.8);
  outline-offset: 2px;
}

/* Contador de imágenes - FIJO ABAJO CENTRO */
.lightbox-modal__counter {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #e3d043;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 700;
  z-index: 10000;
  backdrop-filter: blur(10px);
  border: 2px solid #e3d043;
  letter-spacing: 0.5px;
}

/* Hace que las imágenes sean clicables */
.merchandise-lightbox-trigger {
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.merchandise-lightbox-trigger:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

.merchandise-lightbox-trigger:focus {
  outline: 3px solid #e3d043;
  outline-offset: 2px;
  border-radius: 8px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
  .lightbox-modal__image {
    width: calc(100% - 100px);
    height: calc(100% - 100px);
  }

  .lightbox-modal__nav {
    width: 60px;
    height: 60px;
    font-size: 36px;
  }

  .lightbox-modal__prev {
    left: 15px;
  }

  .lightbox-modal__next {
    right: 15px;
  }
}

@media (max-width: 768px) {
  .lightbox-modal__image {
    width: calc(100% - 80px);
    height: calc(100% - 80px);
  }

  .lightbox-modal__close {
    width: 48px;
    height: 48px;
    font-size: 28px;
    top: 15px;
    right: 15px;
  }

  .lightbox-modal__nav {
    width: 56px;
    height: 56px;
    font-size: 32px;
  }

  .lightbox-modal__prev {
    left: 12px;
  }

  .lightbox-modal__next {
    right: 12px;
  }

  .lightbox-modal__counter {
    font-size: 14px;
    padding: 10px 20px;
    bottom: 20px;
  }
}

@media (max-width: 600px) {
  .lightbox-modal__image {
    width: calc(100% - 60px);
    height: calc(100% - 60px);
  }

  .lightbox-modal__close {
    width: 44px;
    height: 44px;
    font-size: 24px;
    top: 12px;
    right: 12px;
  }

  .lightbox-modal__nav {
    width: 48px;
    height: 48px;
    font-size: 28px;
  }

  .lightbox-modal__prev {
    left: 10px;
  }

  .lightbox-modal__next {
    right: 10px;
  }

  .lightbox-modal__counter {
    font-size: 13px;
    padding: 8px 16px;
    bottom: 15px;
  }
}

@media (max-width: 480px) {
  .lightbox-modal__image {
    width: calc(100% - 40px);
    height: calc(100% - 40px);
  }

  .lightbox-modal__close {
    width: 40px;
    height: 40px;
    font-size: 20px;
    top: 10px;
    right: 10px;
  }

  .lightbox-modal__nav {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .lightbox-modal__prev {
    left: 8px;
  }

  .lightbox-modal__next {
    right: 8px;
  }

  .lightbox-modal__counter {
    font-size: 12px;
    padding: 8px 14px;
    bottom: 12px;
  }
}
