/* ===== CONFIGURACIÓN DE IMÁGENES ===== */

/* Optimización de carga de imágenes */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Excepción para imágenes del logo */
.brand-name img,
.logo img {
  display: inline-block;
}

/* Lazy loading para mejor rendimiento */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[data-src].loaded {
  opacity: 1;
}

/* Fallback para imágenes que no cargan */
img {
  border-radius: inherit;
}

/* Preloader para imágenes */
.image-loader {
  position: relative;
  overflow: hidden;
}

.image-loader::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Estilos responsivos para imágenes */
@media (max-width: 768px) {
  .floating-donut {
    width: 60px;
    height: 60px;
  }

  .product-donut {
    width: 100px;
    height: 100px;
  }

  .ingredient-float {
    width: 40px;
    height: 40px;
  }

  .product-image {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 480px) {
  .floating-donut,
  .product-donut {
    display: none; /* Ocultar en pantallas muy pequeñas para mejor rendimiento */
  }

  .product-image {
    width: 120px;
    height: 120px;
  }
}
