/* ===================== */
/* PRODUCTOS - PÁGINA */
/* ===================== */

.products-page {
  background: #000;
  padding: 60px 0 100px;
}

/* Título principal */
.products-page h1 {
  font-size: 2.4rem;
  margin-bottom: 40px;
  text-align: center;
}

/* ===================== */
/* GRID DE PRODUCTOS */
/* ===================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

/* ===================== */
/* CARD PRODUCTO - BASE */
/* ===================== */

.product-card {
  background: #111;
  border-radius: 18px;
  padding: 25px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.product-card:hover {
  background: #161616;
  transform: translateY(-6px);
}

/* Imagen */
.product-card img {
  max-height: 220px;
  margin: 0 auto 20px;
  object-fit: contain;
}

/* Título */
.product-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  text-align: center;
}

/* Texto */
.product-card p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 15px;
  text-align: center;
}

/* ===================== */
/* PRODUCTO SIMPLE */
/* ===================== */

.product-card.simple .product-links {
  margin-top: 15px;
  text-align: center;
}

.product-card.simple .product-links a {
  display: inline-block;
  margin: 6px 10px;
  font-size: 0.9rem;
  color: #d40000;
  font-weight: 600;
}

.product-card.simple .product-links a:hover {
  text-decoration: underline;
}

/* ===================== */
/* PRODUCTO DETALLADO */
/* ===================== */

.product-card.detailed {
  padding: 30px;
}

/* Carrusel interno (futuro) */
.product-gallery {
  position: relative;
  margin-bottom: 20px;
}

.product-gallery img {
  width: 100%;
  border-radius: 14px;
}

/* Lista de características */
.product-features {
  list-style: none;
  margin: 15px 0 20px;
  padding: 0;
}

.product-features li {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 8px;
  padding-left: 16px;
  position: relative;
}

.product-features li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #d40000;
}

/* Botón */
.product-card .btn-product {
  display: block;
  width: 100%;
  padding: 12px 0;
  text-align: center;
  background: #d40000;
  border-radius: 25px;
  color: #fff;
  font-weight: 600;
  margin-top: 10px;
}

.product-card .btn-product:hover {
  background: #b80000;
}

/* ===================== */
/* CATEGORÍAS / FILTROS */
/* ===================== */

.products-filters {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.products-filters button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
  padding: 10px 22px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.9rem;
}

.products-filters button.active,
.products-filters button:hover {
  background: #d40000;
  border-color: #d40000;
  color: #fff;
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */

@media (max-width: 768px) {

  .products-page {
    padding: 40px 0 70px;
  }

  .products-page h1 {
    font-size: 2rem;
  }

  .product-card {
    padding: 20px;
  }

  .product-card img {
    max-height: 180px;
  }

}

@media (max-width: 480px) {

  .products-page h1 {
    font-size: 1.7rem;
  }

  .product-card h3 {
    font-size: 1rem;
  }

  .product-card p {
    font-size: 0.9rem;
  }

}

/* ===================== */
/* FILTROS PRODUCTOS */
/* ===================== */

.products-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 40px 0 50px;
}

.filter-btn {
  padding: 10px 18px;
  border-radius: 20px;
  background: #111;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
}

.filter-btn:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: #d40000;
  border-color: #d40000;
}


/* ===================== */
/* LIGHTBOX - ESTILOS PRINCIPALES */
/* ===================== */

#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  z-index: 999999;
  display: none;
  justify-content: center;
  align-items: center;
}

#lightbox.active {
  display: flex;
}

.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.95);
  z-index: 1;
  cursor: pointer;
}

.lightbox-inner {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transform-origin: center center;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 3;
  font-size: 36px;
  color: white;
  cursor: pointer;
  background: rgba(0,0,0,0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.lightbox-open {
  overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
  .lightbox-inner {
    max-width: 95vw;
    max-height: 85vh;
  }
  
  .lightbox-close {
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 30px;
  }
}

/* ===================== */
/* MEJORAS PARA DRAG */
/* ===================== */

#lightbox-img {
  /* ... tus estilos existentes ... */
  
  /* Mejoras para drag */
  touch-action: none; /* Importante para móviles */
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#lightbox-img:active {
  cursor: grabbing !important;
}

/* Estados de cursor */
#lightbox-img.grabbable {
  cursor: grab;
}

#lightbox-img.grabbing {
  cursor: grabbing;
}

/* Para móviles - mejor feedback táctil */
@media (hover: none) and (pointer: coarse) {
  #lightbox-img {
    cursor: pointer;
  }
  
  .lightbox-overlay:active {
    background: rgba(0,0,0,0.85);
  }
}


#lightbox-img {
  /* ... tus estilos existentes ... */
  
  /* CRÍTICO para touch en móviles */
  touch-action: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* Mejorar feedback táctil en móvil */
@media (hover: none) and (pointer: coarse) {
  #lightbox-img:active {
    opacity: 0.9;
  }
  
  .lightbox-close {
    min-width: 44px !important;  /* Tamaño mínimo para toques */
    min-height: 44px !important;
  }
}

/* Prevenir scroll durante interacción */
body.lightbox-open {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
}
