/* 圖片輪播共用底層載入提示：圖片下載完成後由上層自然覆蓋。 */
:is(#banner_list, #type_banners, #product_photos, #creator_photos) .each {
    position: relative;
    isolation: isolate;
}

:is(#banner_list, #type_banners, #product_photos, #creator_photos) .each::before {
    content: '';
    position: absolute;
    left: calc(50% - 20px);
    top: calc(50% - 20px);
    width: 32px;
    height: 32px;
    box-sizing: content-box;
    border: 4px solid #d5e2e8;
    border-top-color: #3c6a83;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: pier2-slider-loading-spin .8s linear infinite;
}

/* 沿用每張投影片原本的背景圖、比例與裁切；不新增下載來源。 */
:is(#banner_list, #type_banners, #product_photos) .each::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background-image: inherit;
    background-size: inherit;
    background-position: inherit;
    background-repeat: inherit;
    pointer-events: none;
}

/* 文創人才已有大圖層，直接讓原層覆蓋底層提示。 */
#creator_photos .each > .in {
    position: relative;
    z-index: 1;
}

:is(#banner_list, #type_banners, #product_photos, #creator_photos) .slick-slide[aria-hidden="true"] .each::before {
    animation-play-state: paused;
}

@keyframes pier2-slider-loading-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    :is(#banner_list, #type_banners, #product_photos, #creator_photos) .each::before {
        animation-duration: 2.4s;
    }
}
