.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  max-width: 1200px; /* Mantienes el ancho original */
  margin: 0 auto;
  padding: 20px;
  width: 100%;
}

.mech-card {
  width: 100%;
  max-width: 800px; /* O el ancho que prefieras */
  margin: 0 auto;
}

/* Encabezado de la tarjeta */
.mech-header {
  padding: 15px;
  background-color: var(--secondary-color);
  color: var(--white);
}

.mech-title {
  margin: 0;
  font-size: 1.2rem;
  text-align: center;
}

/* Contenedor de imagen */
.mech-image-container {
  position: relative;
  padding: 15px;
  background: var(--white);
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mech-image {
  max-width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  transition: var(--transition);
}

/* Overlay para efecto de zoom */
.mech-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mech-image-container:hover .mech-overlay {
  opacity: 1;
}


.mech-zoom:hover {
  background: var(--white);
  transform: scale(1.1);
}

/* Especificaciones del producto */
.mech-specs {
  padding: 15px;
  background: var(--white);
}

.spec-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.spec-icon {
  margin-right: 10px;
  color: var(--secondary-color);
  width: 20px;
  text-align: center;
}

.spec-text {
  font-size: 0.9rem;
}

/* Pie de tarjeta (botón de WhatsApp) */
.mech-footer {
  padding: 15px;
  background: var(--white);
  border-top: 1px solid #eee;
}

.mech-whatsapp {
  display: block;
  text-align: center;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: var(--transition);
}

.mech-whatsapp:hover {
  background-color: #128C7E;
  transform: translateY(-2px);
}

.mech-whatsapp i {
  margin-right: 8px;
}

/* Lightbox para imágenes */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

.lightbox-content {
  display: block;
  margin: 60px auto;
  max-width: 80%;
  max-height: 80%;
  border: 3px solid white;
  animation: zoomIn 0.3s;
}

@keyframes zoomIn {
  from {transform: scale(0.9);}
  to {transform: scale(1);}
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close-lightbox:hover {
  color: #ccc;
}

.lightbox-caption {
  color: #fff;
  text-align: center;
  padding: 10px 0;
  font-size: 1.1rem;
}
/* Previene que se muestren múltiples lightboxes */
#imageLightbox:not(:first-of-type) {
  display: none !important;
}
/* Responsive */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 10px;
  }
  
  .lightbox-content {
    max-width: 95%;
    max-height: 85%;
    margin: 50px auto;
  }
}