swiper-container:not(:defined) {
    display: block;
    overflow: hidden;
    position: relative;
}

/* Hide all slides except first to prevent CLS */

swiper-container:not(:defined) swiper-slide {
    display: none !important;
}

/* Show only first slide before Swiper initializes */

swiper-container:not(:defined) swiper-slide:first-child {
    display: block !important;
    width: 100%;
    opacity: 1;
}

/* === Header Slider Height Variations (Mobile) === */

swiper-container:not(:defined).header-slider.shortheight:not(.ratio__height) {
    height: 70vh;
    min-height: 400px;
}

swiper-container:not(:defined).header-slider.mediumheight:not(.ratio__height) {
    height: 80vh;
    min-height: 560px;
}

swiper-container:not(:defined).header-slider.tallheight:not(.ratio__height) {
    height: 80vh;
    min-height: 600px;
}

swiper-container:not(:defined).header-slider.fullheight:not(.ratio__height) {
    height: 100vh;
    min-height: 560px;
}

/* === Header Slider Height Variations (Desktop) === */

@media (min-width: 768px) {
    swiper-container:not(:defined).header-slider.shortheight:not(.ratio__height) {
        height: 40vh;
        min-height: 400px;
    }
    swiper-container:not(:defined).header-slider.mediumheight:not(.ratio__height) {
        height: 60vh;
        min-height: 660px;
    }
    swiper-container:not(:defined).header-slider.tallheight:not(.ratio__height) {
        height: 70vh;
        min-height: 760px;
    }
    swiper-container:not(:defined).header-slider.fullheight:not(.ratio__height) {
        height: 100vh;
        min-height: 700px;
    }
}

@media (max-width: 767px) {
    swiper-container:not(:defined).header-slider.content_below:not(.ratio__height) .slider-media {
        height: 40vh;
        min-height: 360px;
        width: 100%;
    }
}

/* === Hide Navigation & Pagination Before Init === */

/* Navigation buttons */

.swiper-wrapper__custom:has(swiper-container:not(:defined)) .custom-swiper-navigation {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Pagination dots */

swiper-container:not(:defined)~.swiper-pagination {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* === Smooth Transitions When Swiper Loads === */

swiper-container {
    transition: opacity 0.2s ease-in-out;
}

/* Show navigation with fade-in after initialization */

swiper-container:defined~.swiper-wrapper__custom .custom-swiper-navigation,
swiper-container:defined~.custom-swiper-navigation {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.3s ease-in-out 0.15s, visibility 0s 0.15s;
}

/* Show pagination with fade-in after initialization */

swiper-container:defined~.swiper-pagination {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.3s ease-in-out 0.15s, visibility 0s 0.15s;
}

/* === Optional: Subtle Loading Indicator === */

swiper-container:not(:defined)::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    animation: swiper-skeleton-pulse 1.5s ease-in-out infinite;
    z-index: 1;
}

@keyframes swiper-skeleton-pulse {
    0%,
    100% {
        opacity: 0.3;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translateX(-50%) scale(1.3);
    }
}

/* Remove loading indicator once initialized */

swiper-container:defined::after {
    display: none;
}

/* === Ratio Height Support === */

swiper-container:not(:defined).header-slider.ratio__height .slider-media {
    position: relative;
    width: 100%;
}

/* === Prevent Flash of Unstyled Content === */

swiper-container:not(:defined) .slider-content {
    position: relative;
    z-index: 2;
}

/* === Global carousel slider loaded === */

swiper-container:not(:defined):not(.header-slider):not(.product-slider) swiper-slide {
    opacity: 0;
}

swiper-container:not(:defined):not(.header-slider) {
    animation: blink-bg 0.5s infinite;
}

@keyframes blink-bg {
    0%,
    100% {
        background-color: #F6F6F6;
    }
    50% {
        background-color: #E8E8E8;
    }
}