/* Carousel Wrapper */
.scf-carousel-wrapper {
    position: relative;
    width: 100%;
    margin: 25px 0;
    box-sizing: border-box;
    direction: rtl;
}

@media (max-width: 767px) {
    .scf-carousel-wrapper { 
        padding: 0 10px; 
    }
}

.scf-carousel-wrapper .swiper {
    width: 100%;
    overflow: hidden;
}

/* Fallback پیش از لود جاوااسکریپت */
.scf-carousel-wrapper .swiper:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
}

.scf-carousel-wrapper .swiper:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 calc(100% / 1.25);
}

@media (min-width: 1024px) {
    .scf-carousel-wrapper .swiper:not(.swiper-initialized) .swiper-slide {
        flex: 0 0 calc(100% / 6.5);
    }
}

/* Slide Styles */
.scf-carousel-wrapper .swiper-slide {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.25s ease;
}

.scf-carousel-wrapper .swiper-slide:hover { 
    transform: scale(0.95); 
}

.scf-carousel-wrapper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.scf-carousel-wrapper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    cursor: pointer;
}

/* دکمه‌های ناوبری (فلش‌ها) */
.scf-carousel-wrapper .swiper-button-next,
.scf-carousel-wrapper .swiper-button-prev {
    color: #222;
    background: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.83) !important;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -18px;
    top: 50%;
    z-index: 10;
}

.scf-carousel-wrapper .swiper-button-next {
    left: 3px !important;
    right: auto !important;
}

.scf-carousel-wrapper .swiper-button-prev {
    right: 3px !important;
    left: auto !important;
}

.scf-carousel-wrapper .swiper-button-next:after,
.scf-carousel-wrapper .swiper-button-prev:after {
    display: none !important;
}

.scf-carousel-wrapper .swiper-button-next svg,
.scf-carousel-wrapper .swiper-button-prev svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.scf-carousel-wrapper .swiper-button-next:hover,
.scf-carousel-wrapper .swiper-button-prev:hover {
    background: rgba(0,0,0,0.83);
    color: #fff;
}

.scf-carousel-wrapper .swiper-button-lock { 
    display: none !important; 
}

/* سفارشی‌سازی لایت‌باکس المنتور */
body .elementor-lightbox .dialog-lightbox-title,
body .elementor-lightbox .dialog-lightbox-description,
body .elementor-lightbox .dialog-header,
body .elementor-lightbox .dialog-footer {
    display: none !important;
}

body .elementor-lightbox .dialog-lightbox-button-prev,
body .elementor-lightbox .dialog-lightbox-button-next,
body .elementor-lightbox .elementor-swiper-button-prev,
body .elementor-lightbox .elementor-swiper-button-next {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: .8 !important;
    visibility: visible !important;
    z-index: 999999 !important;
    width: 46px !important;
    height: 46px !important;
    background: rgba(0,0,0,.45) !important;
    border-radius: 50% !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
}

body .elementor-lightbox .dialog-lightbox-button-prev:hover,
body .elementor-lightbox .dialog-lightbox-button-next:hover,
body .elementor-lightbox .elementor-swiper-button-prev:hover,
body .elementor-lightbox .elementor-swiper-button-next:hover {
    opacity: 1 !important;
    background: rgba(0,0,0,.85) !important;
}

body .elementor-lightbox .dialog-lightbox-button-prev,
body .elementor-lightbox .elementor-swiper-button-prev {
    left: 20px !important;
    right: auto !important;
}

body .elementor-lightbox .dialog-lightbox-button-next,
body .elementor-lightbox .elementor-swiper-button-next {
    right: 20px !important;
    left: auto !important;
}

body .elementor-lightbox .dialog-lightbox-button-prev > *,
body .elementor-lightbox .dialog-lightbox-button-next > *,
body .elementor-lightbox .elementor-swiper-button-prev > *,
body .elementor-lightbox .elementor-swiper-button-next > *,
body .elementor-lightbox .dialog-lightbox-button-prev:after,
body .elementor-lightbox .dialog-lightbox-button-next:after,
body .elementor-lightbox .elementor-swiper-button-prev:after,
body .elementor-lightbox .elementor-swiper-button-next:after {
    display: none !important;
}

body .elementor-lightbox .dialog-lightbox-button-prev::before,
body .elementor-lightbox .dialog-lightbox-button-next::before,
body .elementor-lightbox .elementor-swiper-button-prev::before,
body .elementor-lightbox .elementor-swiper-button-next::before {
    content: '' !important;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

body .elementor-lightbox .dialog-lightbox-button-prev::before,
body .elementor-lightbox .elementor-swiper-button-prev::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E") !important;
}

body .elementor-lightbox .dialog-lightbox-button-next::before,
body .elementor-lightbox .elementor-swiper-button-next::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E") !important;
}
