/* Add this CSS to your main stylesheet */

/* Lazy loading states */
img[data-src] {
    transition: opacity 0.3s ease;
}

/* Loading state - shows skeleton/placeholder */
img.lazy-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-skeleton 1.5s infinite;
    min-height: 100px; /* Adjust based on your typical image size */
    opacity: 0.7;
}

/* Loaded state */
img.lazy-loaded {
    opacity: 1;
}

/* Error state */
img.lazy-error {
    background: #f8f8f8;
    border: 1px dashed #ccc;
    opacity: 0.5;
}

/* Skeleton animation */
@keyframes loading-skeleton {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Optional: Different skeleton for different image sizes */
.img-thumbnail[data-src] {
    min-height: 150px;
}

.img-large[data-src] {
    min-height: 300px;
}

/* Responsive skeleton heights */
@media (max-width: 768px) {
    img.lazy-loading {
        min-height: 80px;
    }
}