/* Only targets items inside #gallery, not carousel or other items */

#gallery .item {
    position: relative;
    overflow: hidden;
    margin-left: 2px;
    margin-bottom: 20px;
}

#gallery .item a.glightbox {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    background: #e0e0e0;
    overflow: hidden;
}

#gallery .lazy-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #e0e0e0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#gallery .lazy-image.loaded {
    opacity: 1;
}

/* Loading animation - only for gallery */
#gallery .lazy-image:not(.loaded) {
    background: linear-gradient(
        90deg,
        #e0e0e0 0%,
        #f0f0f0 50%,
        #e0e0e0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}