/* Reset de márgenes y padding */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Estilos generales del html y body */
html, body {
  overflow-x: hidden !important;
}

body * {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Botón regresar */
.regresar-container {
  position: relative;
  top: 20px;
  left: 20px;
  z-index: 100;
}

#regresarBtn {
  padding: 15px 30px;
  background-color: var(--color-primario);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

#regresarBtn:hover {
  background-color: #E65337;
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}

/* Contenedor de productos */
.product-list {
  padding: 30px;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  overflow-x: hidden; /* Prevención adicional */
}

/* Tarjeta de producto */
.product-card {
  width: 250px;
  margin: 15px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.product-card img {
  width: 100%;
  height: 9rem;
  object-fit: cover;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.product-card .product-info {
  padding: 15px;
  width: 100%;
}

.product-card .product-info h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 10px;
}

.product-card .product-info p {
  font-size: 14px;
  color: #666;
}

/* Lightbox / Modal estilos */
.lightbox,
.modal {
  display: none;
  position: fixed;
  inset: 0; /* reemplaza top/left/width/height */
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
  overflow: hidden; /* Previene scroll en modales */
}

/* Contenedor del modal */
.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
  position: relative;
}

/* Imagen dentro del modal/lightbox */
.lightbox-img,
.modal-image {
  width: 100%;
  max-width: 800px;
  max-height: 80vh;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

/* Botón de cerrar */
.close-btn,
.close-button {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 30px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  z-index: 10;
}

.close-btn:hover,
.close-button:hover {
  color: #E65337;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .product-list {
    padding: 10px;
    margin: 0;
    max-width: 100%;
    justify-content: space-around;
  }

  .product-card {
    width: 100%;
    margin: 10px 0;
  }

  #regresarBtn {
    padding: 10px 20px;
    font-size: 16px;
  }
}
