/* Estilos para products-gallery */
.products-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 2rem;
  margin: 0 auto;
  width: 80%;
}

.loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  margin: 8rem auto;
}

.loader {
  width: 15px;
  aspect-ratio: 1;
  border-radius: 50%;
  animation: l5 1s infinite linear alternate;
}

/* Estilos para el estado de carga de imágenes */
.product-image-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.image-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 8px;
}

.image-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--color-primary, #007bff);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes l5 {
  0% {
    box-shadow: 20px 0 #000, -20px 0 #0002;
    background: #000
  }

  33% {
    box-shadow: 20px 0 #000, -20px 0 #0002;
    background: #0002
  }

  66% {
    box-shadow: 20px 0 #0002, -20px 0 #000;
    background: #0002
  }

  100% {
    box-shadow: 20px 0 #0002, -20px 0 #000;
    background: #000
  }
}

@media screen and (max-width: 1024px) {
  .products-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
  }

}

@media (max-width: 768px) {
  .products-gallery {
    box-sizing: border-box;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
    width: 100%;
  }
}

@media screen and (max-width: 480px) {
  .products-gallery {
    gap: .5rem;
    width: 100%;
    padding: 0.5rem;
  }
}

@media screen and (max-width: 320px) {
  .products-gallery {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem;
    padding: 0.25rem;
  }
}