/* Style the actual image */
.lazy-img {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: block;
    position: relative;
    width: 100%;
    height: auto;
    z-index: 2;
}

/* Custom loader */
.image-loader {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #ccc;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 1;
}
.lazy-img.loaded {
    opacity: 1;
}

/* Spinner animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}