/* ============================================================
   Home.css
   بازطراحی کارت‌های اسلایدر محصولات (پروژکتور و مشابه) در صفحه اصلی
   محدوده (scope): همه چیز زیر کلاس .home-slider نوشته شده تا با
   کلاس‌های عمومی .gallery / .box1 / .galleryIamge ... که در
   صفحات دیگر (Product.css / style.css) استفاده می‌شن تداخل نکنه.
   تم: سرمه‌ای + طلایی
   ============================================================ */

.home-slider {
    --hs-navy: #0b1440;
    --hs-navy-2: #141c4d;
    --hs-gold: #d4a83c;
    --hs-gold-light: #f3d98b;
    --hs-red: #e0344a;
    --hs-text: #24273a;
    --hs-muted: #8a8f9d;
    --hs-radius: 14px;
    position: relative;
    overflow: visible;
    padding: 6px 4px 26px;
}

    .home-slider .swiper-wrapper {
        align-items: stretch;
    }

    .home-slider .swiper-slide {
        height: auto;
        display: flex;
    }

    .home-slider .gallery {
        width: 100%;
        display: flex;
    }

    .home-slider .swiper-slide > a {
        display: block;
        width: 100%;
    }

    /* ---------- کارت محصول ----------
   Product.css به .gallery .box1 مقدار padding:5px می‌دهد؛ اینجا صفر
   می‌کنیم چون هم برای طراحی جدید لازم نیست هم محاسبه‌ی top دکمه‌های
   next/prev را دقیق نگه می‌دارد. */
    .home-slider .box1 {
        position: relative;
        width: 100%;
        height: 100%;
        padding: 0 !important;
        background: #fff;
        border: 1px solid #efe9db;
        border-radius: 18px;
        overflow: hidden;
        box-sizing: border-box;
        margin: 0 5px;
        box-shadow: 0 1px 2px rgba(11, 20, 64, 0.04);
        transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s cubic-bezier(.22,.61,.36,1), border-color .3s ease;
        display: flex;
        flex-direction: column;
    }

    .home-slider .swiper-slide > a {
        height: 100%;
    }

    .home-slider .gallery {
        height: 100%;
    }

    .home-slider .gallery,
    .home-slider .box1 {
        width: 100%;
        max-width: none;
    }


        .home-slider .box1:hover {
            transform: translateY(-6px);
            box-shadow: 0 18px 34px rgba(11, 20, 64, 0.14);
            border-color: var(--hs-gold);
        }

    /* ---------- تصویر محصول ----------
   نکته مهم: همین بخش، مشکل ارتفاع نامنظم کارت‌ها (که باعث افتادن
   دکمه‌های next/prev می‌شد) را هم حل می‌کند، چون دو <img> داخل
   .galleryIamge را روی هم absolute می‌کند به‌جای استک زیر هم. */
    .home-slider .galleryIamge {
        position: relative;
        width: 100%;
        height: 170px;
        background: linear-gradient(180deg, #fcfaf5 0%, #f6f1e4 100%);
        overflow: hidden;
    }

        .home-slider .galleryIamge:after {
            /* خط ظریف جداکننده‌ی عکس از متن، به‌جای مرز سخت */
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, #eadfc0, transparent);
        }

        .home-slider .galleryIamge img {
            display: block !important; /* Product.css می‌گفت img:last-child { display:none }، اینجا override می‌کنیم */
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: contain;
            padding: 6px;
            transition: opacity .35s ease, transform .45s cubic-bezier(.22,.61,.36,1);
        }

            .home-slider .galleryIamge img:first-child {
                opacity: 1;
                z-index: 2;
            }

            .home-slider .galleryIamge img:last-child {
                opacity: 0;
                z-index: 1;
            }

    .home-slider .box1:hover .galleryIamge img:first-child {
        opacity: 0;
        transform: scale(1.04);
    }

    .home-slider .box1:hover .galleryIamge img:last-child {
        opacity: 1;
        transform: scale(1.04);
    }

    /* ---------- عنوان محصول ---------- */
    .home-slider .galleryTitle {
        padding: 14px 14px 6px;
        text-align: center;
        height: 62px;
        box-sizing: border-box;
        overflow: hidden;
        flex-shrink: 0;
    }

        .home-slider .galleryTitle span {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            font-size: 13px;
            font-weight: 500;
            line-height: 21px;
            color: var(--hs-text);
            font-family: yekan2, YEKAN, sans-serif;
            height: 42px;
            transition: color .2s ease;
        }

    .home-slider .box1:hover .galleryTitle span {
        color: var(--hs-navy);
    }

    /* ---------- قیمت (به سبک نمونه: قیمت قبل + برچسب درصد تخفیف، سپس قیمت نهایی) ---------- */
    .home-slider .galleryPrice {
        margin-top: auto;
        padding: 10px 14px 14px;
        text-align: right;
        background: linear-gradient(180deg, #ffffff 0%, #fdfbf5 100%);
        height: 74px !important;
        box-sizing: border-box;
        overflow: hidden;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

        .home-slider .galleryPrice.notTedad {
            height: 74px !important;
            padding: 10px 8px;
            text-align: center;
            align-items: center;
        }

            .home-slider .galleryPrice.notTedad span {
                display: inline-block;
                padding: 5px 18px;
                font-size: 11.5px;
                font-weight: 600;
                border-radius: 20px;
                background: var(--hs-navy);
                color: var(--hs-gold-light);
                letter-spacing: .2px;
            }

    /* ردیف قیمت قبل از تخفیف + برچسب درصد، کنار هم چیده می‌شوند */
    .home-slider .hs-price-row {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        margin-bottom: 5px;
    }

    .home-slider .galleryPrice .pfirst2 {
        display: block;
        font-family: iranNum, sans-serif;
    }

    .home-slider .hs-price-row .pfirst2.takh {
        display: inline-block;
        color: var(--hs-muted);
        font-size: 11.5px;
        text-decoration: line-through;
        margin-bottom: 0;
    }

    .home-slider .hs-discount-badge {
        display: inline-block;
        direction: ltr;
        background: #c23148;
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
        padding: 3px 7px;
        border-radius: 999px;
        font-family: iranNum, sans-serif;
        white-space: nowrap;
        letter-spacing: .2px;
    }

    /* قیمت نهایی به شکل یک چیپ ملایم طلایی، برجسته اما مینیمال */
    .home-slider .galleryPrice .pfirst2.all {
        display: inline-block;
        color: var(--hs-navy);
        font-size: 15px;
        font-weight: 800;
        background: #faf3de;
        border-radius: 8px;
        padding: 4px 9px;
    }

        .home-slider .galleryPrice .pfirst2.all::after {
            content: " تومان";
            font-size: 10.5px;
            font-weight: 600;
            color: var(--hs-gold);
            margin-right: 3px;
        }

    /* ردیف‌های قیمت اجاره (کرایه) */
    .home-slider .Lpfirst {
        font-size: 11px;
        color: var(--hs-muted);
        margin-top: 4px;
    }

    /* ---------- دکمه‌های راست/چپ سوایپر ----------
   نه Product.css و نه style.css رولی برای .swiper-button-next/prev
   ندارند؛ یعنی موقعیت پیش‌فرض از خود کتابخانه‌ی Swiper (top:50% کل
   ارتفاع اسلاید) میاد که باعث افتادن پایین‌تر از وسط عکس می‌شد.
   اینجا مقدار دقیق را نسبت به وسط .galleryIamge (که چون box1 padding
   صفر شده و margin آن ۶px است، دقیقاً قابل محاسبه است) ست می‌کنیم:
   6 (padding home-slider) + 6 (margin box1) + 95 (نصف ارتفاع عکس) -
   19 (نصف ارتفاع دکمه) = 88px */
    /* رفع تداخل: ظرف‌های .SelectBoxPro/.boxItem در style.css و Product.css
       ارتفاع ثابت/اضافه می‌گیرند و چون دکمه‌ها فرزند .home-slider هستند،
       top:50% روی آن ارتفاع بزرگ حساب می‌شد و دکمه‌ها می‌افتادند پایین. */
    .home-slider,
    .home-slider .boxItem,
    .home-slider .swipercontainerfilmstrip,
    .home-slider .swiper-wrapper {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

.home-slider {
    display: block !important;
    padding-bottom: 6px !important;
}

    .home-slider .swiper-button-next,
    .home-slider .swiper-button-prev {
        position: absolute !important;
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%);
        margin-top: 0 !important;
        width: 38px !important;
        height: 38px !important;
        border-radius: 50% !important;
        background-color: var(--hs-navy) !important;
        background-image: none !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 20;
        box-shadow: 0 3px 8px rgba(11,20,64,.25);
        opacity: 1 !important;
        cursor: pointer;
        transition: background-color .2s ease;
    }

        .home-slider .swiper-button-next:before,
        .home-slider .swiper-button-prev:before {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            width: 9px;
            height: 9px;
            border-right: 2px solid var(--hs-gold);
            border-top: 2px solid var(--hs-gold);
            transition: border-color .2s ease;
        }

    .home-slider .swiper-button-prev {
        right: 4px;
        left: auto;
    }

        .home-slider .swiper-button-prev:before {
            /* اول به مرکز، بعد چرخش، بعد جبران ضخامت بوردر */
            transform: translate(-50%, -50%) rotate(45deg) translate(-1px, 1px);
            margin: 0;
        }

    .home-slider .swiper-button-next {
        left: 4px;
        right: auto;
    }

        .home-slider .swiper-button-next:before {
            transform: translate(-50%, -50%) rotate(-135deg) translate(-1px, 1px);
            margin: 0;
        }


        .home-slider .swiper-button-next:hover,
        .home-slider .swiper-button-prev:hover {
            background-color: var(--hs-gold) !important;
        }

            .home-slider .swiper-button-next:hover:before,
            .home-slider .swiper-button-prev:hover:before {
                border-color: var(--hs-navy);
            }

@media (max-width: 1080px) {
    .home-slider .swiper-button-next,
    .home-slider .swiper-button-prev {
        display: none !important;
    }
}

@media (max-width: 539px) {
    .home-slider .galleryIamge {
        height: 150px;
    }
}

/* ============================================================
   قاب مینیمال دور عنوان + کارت‌ها
   عنوان (.Boxtitle) و بخش اسلایدر (.BoxParent) دو تگ جدا هستند؛
   با :has فقط آن‌هایی که مربوط به .home-slider اند استایل می‌گیرند
   تا صفحات دیگر دست‌نخورده بمانند.
   ============================================================ */

.Boxtitle:has(+ .BoxParent .home-slider),
.BoxParent:has(.home-slider) {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    margin-right: auto;
    margin-left: auto;
    background: #fff;
    border: 1px solid #ece7da;
    box-shadow: 0 1px 3px rgba(11, 20, 64, .04);
}

/* عنوان = سرِ قاب */
.Boxtitle:has(+ .BoxParent .home-slider) {
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    padding: 16px 22px 12px;
    margin-bottom: 0;
    text-align: right;
    position: relative;
}

    .Boxtitle:has(+ .BoxParent .home-slider) span {
        font-size: 17px;
        font-weight: 700;
        color: #0b1440;
        padding-right: 12px;
        position: relative;
        display: inline-block;
    }

        /* خط طلایی کوچک کنار عنوان */
        .Boxtitle:has(+ .BoxParent .home-slider) span:before {
            content: "";
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 18px;
            border-radius: 3px;
            background: #d4a83c;
        }

/* بدنه = کارت‌ها */
.BoxParent:has(.home-slider) {
    border-top: 1px solid #f2eee5;
    border-radius: 0 0 16px 16px;
    padding: 6px 6px 10px;
    margin-bottom: 26px;
}

    /* داخل قاب دیگر نیازی به سایه‌ی سنگین کارت‌ها نیست */
    .BoxParent:has(.home-slider) .home-slider .box1 {
        box-shadow: none;
    }

        .BoxParent:has(.home-slider) .home-slider .box1:hover {
            box-shadow: 0 10px 20px rgba(11, 20, 64, .10);
        }

    /* دکمه‌های ناوبری کمی داخل‌تر تا از قاب بیرون نزنند */
    .BoxParent:has(.home-slider) .home-slider .swiper-button-prev {
        right: 8px;
    }

    .BoxParent:has(.home-slider) .home-slider .swiper-button-next {
        left: 8px;
    }

@media (max-width: 1080px) {
    .Boxtitle:has(+ .BoxParent .home-slider),
    .BoxParent:has(.home-slider) {
        border-radius: 12px;
    }

    .Boxtitle:has(+ .BoxParent .home-slider) {
        border-radius: 12px 12px 0 0;
    }

    .BoxParent:has(.home-slider) {
        border-radius: 0 0 12px 12px;
    }
}
/* ============================================================
   اسلایدر برندها  |  Brands.css
   نحوه استفاده: به swiper مربوط به بخش برندها کلاس brand-slider
   بدهید (کنار کلاس‌های فعلی)، مثلاً:
   <div class="swiper-container brand-slider"> ... </div>
   بقیه‌ی مارک‌آپ و داده‌ها همان چیزی است که CMS می‌سازد.
   ============================================================ */

/* قاب مینیمال مثل بخش محصولات ولی سبک‌تر */
.Boxtitle:has(+ .BoxParent .brand-slider),
.BoxParent:has(.brand-slider) {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    margin-right: auto;
    margin-left: auto;
    background: #fff;
    border: 1px solid #ece7da;
    box-shadow: 0 1px 3px rgba(11, 20, 64, .04);
}

.Boxtitle:has(+ .BoxParent .brand-slider) {
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    padding: 14px 22px 10px;
    margin-bottom: 0;
    text-align: right;
}

    .Boxtitle:has(+ .BoxParent .brand-slider) span {
        font-size: 16px;
        font-weight: 700;
        color: #0b1440;
        padding-right: 12px;
        position: relative;
        display: inline-block;
    }

        .Boxtitle:has(+ .BoxParent .brand-slider) span:before {
            content: "";
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 16px;
            border-radius: 3px;
            background: #d4a83c;
        }

.BoxParent:has(.brand-slider) {
    border-top: 1px solid #f2eee5;
    border-radius: 0 0 16px 16px;
    padding: 14px 10px 16px;
    margin-bottom: 26px;
}

#swiper-container-filmstrip4 {
    position: relative !important;
    overflow: hidden !important;
    padding: 4px 0 !important;
    background-color: transparent;
}

    /* فید دو طرف */
    #swiper-container-filmstrip4:before,
    #swiper-container-filmstrip4:after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: 46px;
        z-index: 15;
        pointer-events: none;
    }

    #swiper-container-filmstrip4:before {
        right: 0;
        background: linear-gradient(to left, #fff 0%, rgba(255,255,255,0) 100%);
    }

    #swiper-container-filmstrip4:after {
        left: 0;
        background: linear-gradient(to right, #fff 0%, rgba(255,255,255,0) 100%);
    }

#swiper-wrapper4 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    height: auto !important;
    position: relative !important;
}
    #swiper-wrapper4 .swiper-slide {
        flex: 0 0 auto !important;
        max-width: none !important;
        min-width: 0 !important;
        height: 100px !important;
        min-height: 0 !important;
        max-height: none !important;
        padding: 12px 8px !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #fff;
        border: 1px solid #f0ece3;
        border-radius: 14px;
        position: relative !important;
        overflow: hidden !important;
        transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
    }

        #swiper-wrapper4 .swiper-slide:hover {
            border-color: #e3d6b4;
            box-shadow: 0 8px 18px rgba(11, 20, 64, .08);
            transform: translateY(-3px);
        }

    #swiper-wrapper4 .mobile-image-filter {
        display: none !important;
    }

    #swiper-wrapper4 .image {
        position: static !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #swiper-wrapper4 .filmstrip-image {
        position: static !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: contain !important;
        filter: grayscale(100%);
        opacity: .85;
        transition: filter .25s ease, opacity .25s ease;
    }

    #swiper-wrapper4 .swiper-slide:hover .filmstrip-image {
        filter: grayscale(0);
        opacity: 1;
    }

#swiper-container-filmstrip4 .swiper-button-next,
#swiper-container-filmstrip4 .swiper-button-prev {
    position: absolute !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
    width: 32px !important;
    height: 32px !important;
    background-image: none !important;
    background-color: #fff !important;
    border: 1px solid #eee7d8;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(11,20,64,.12);
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 20 !important;
    opacity: 1 !important;
    cursor: pointer;
}

    #swiper-container-filmstrip4 .swiper-button-next:before,
    #swiper-container-filmstrip4 .swiper-button-prev:before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 8px;
        height: 8px;
        border-right: 2px solid #0b1440;
        border-top: 2px solid #0b1440;
    }

#swiper-container-filmstrip4 .swiper-button-prev {
    right: 6px !important;
    left: auto !important;
}

    #swiper-container-filmstrip4 .swiper-button-prev:before {
        transform: translate(-50%, -50%) rotate(45deg);
    }

#swiper-container-filmstrip4 .swiper-button-next {
    left: 6px !important;
    right: auto !important;
}

    #swiper-container-filmstrip4 .swiper-button-next:before {
        transform: translate(-50%, -50%) rotate(-135deg);
    }

@media (max-width: 768px) {
    /* یک لاین (لِین) خالی در دو طرف باز می‌کنیم تا دکمه‌ها روی کارت‌ها نیفتند */
    #swiper-container-filmstrip4 {
        padding: 4px 32px !important;
    }

        #swiper-container-filmstrip4:before,
        #swiper-container-filmstrip4:after {
            width: 20px;
        }

        #swiper-container-filmstrip4 .swiper-button-next,
        #swiper-container-filmstrip4 .swiper-button-prev {
            width: 26px !important;
            height: 26px !important;
        }

        #swiper-container-filmstrip4 .swiper-button-prev {
            right: 2px !important;
        }

        #swiper-container-filmstrip4 .swiper-button-next {
            left: 2px !important;
        }

    #swiper-wrapper4 .swiper-slide {
        height: 76px !important;
    }

    .BoxParent:has(.brand-slider) {
        border-radius: 0 0 12px 12px;
    }

    .Boxtitle:has(+ .BoxParent .brand-slider) {
        border-radius: 12px 12px 0 0;
    }

}
/* عرض فیکس سراسریِ .container را فقط داخل قاب برندها خنثی می‌کنیم
   تا swiper-container-filmstrip4 دقیقا هم‌عرض قاب سفید BoxParent بماند
   و دکمه‌ها/نوار از کادر بیرون نزنند */
.BoxParent:has(.brand-slider) > .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* پیجینیشن نقطه‌ای اسلایدر اصلی، شبیه دیجی‌کالا */
.slidering {
    position: relative;
}

.ss-pagination {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 7px;
    z-index: 50;
}

    .ss-pagination .ss-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .55);
        cursor: pointer;
        transition: all .25s ease;
        display: inline-block;
    }

        .ss-pagination .ss-dot:hover {
            background: rgba(255, 255, 255, .85);
        }

        .ss-pagination .ss-dot.active {
            width: 22px;
            border-radius: 4px;
            background: #ffffff;
        }

@media (max-width: 700px) {
    .ss-pagination {
        bottom: 8px;
    }

        .ss-pagination .ss-dot {
            width: 6px;
            height: 6px;
        }

            .ss-pagination .ss-dot.active {
                width: 16px;
            }
}
.brand-slider .swiper-slide {
    position: relative;
}

.brand-slider .brand-link {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    z-index: 10;
}

.brand-slider .mobile-image-filter {
    pointer-events: none;
}