/* ============================================================
   Home.css — Emperatoory Bargh (Red / Gray / White)
   صفحه‌ی اصلی: اسلایدر محصولات، قاب بخش‌ها، اسلایدر برندها، نقطه‌های اسلایدر اصلی
   همه‌ی استایل‌ها زیر کلاس‌های .home-slider / .brand-slider / .ss-pagination
   نوشته شده تا روی صفحه‌ی لیست محصولات (Product.css) اثر نگذارد.
   این فایل باید بعد از style.css و Product.css لود شود.
   ============================================================ */

:root {
    --hm-ink: #23262b;
    --hm-text: #2d3035;
    --hm-muted: #8a9099;
    --hm-line: #e6e8ea;
    --hm-line-soft: #eef0f2;
    --hm-red: #e1251b;
    --hm-red-dark: #b31d15;
    --hm-red-soft: #fdeceb;
}

/* ============================================================
   1) اسلایدر محصولات
   ============================================================ */
.home-slider {
    position: relative;
    display: block !important;
    overflow: visible;
    padding: 6px 4px !important;
}

/* ظرف‌های style.css / Product.css ارتفاع ثابت می‌گیرند؛ اینجا آزاد می‌شوند */
.home-slider,
.home-slider .boxItem,
.home-slider .swipercontainerfilmstrip,
.home-slider .swiper-wrapper {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* فضای خالی بالا/پایین تا بالا‌آمدن کارت با hover بریده نشود */
.home-slider .boxItem {
    padding: 8px 0 14px !important;
}

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

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

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

.home-slider .gallery {
    width: 100%;
    height: 100%;
    display: flex;
    overflow: visible; /* Product.css: overflow:hidden */
}

/* ---------- کارت ---------- */
.home-slider .box1 {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    margin: 0 5px;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--hm-line);
    border-radius: 16px;
    box-shadow: none;
    transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s cubic-bezier(.22,.61,.36,1), border-color .3s ease;
}

    .home-slider .box1:hover {
        transform: translateY(-4px);
        border-color: var(--hm-red);
        box-shadow: 0 14px 28px rgba(35, 38, 43, .12);
    }

/* ---------- تصویر ---------- */
.home-slider .galleryIamge {
    position: relative;
    flex: 0 0 auto;
    display: block;
    width: 100%;
    height: 170px;
    overflow: hidden;
    border-radius: 0;
    background: linear-gradient(180deg, #fafafa 0%, #f4f5f6 100%);
}

    .home-slider .galleryIamge:after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--hm-line), transparent);
    }

    .home-slider .galleryIamge img {
        display: block !important;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        margin: 0;
        padding: 8px;
        box-sizing: border-box;
        object-fit: contain;
        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 {
    flex: 0 0 auto;
    height: 62px;
    margin: 0;
    padding: 14px 14px 6px;
    box-sizing: border-box;
    overflow: hidden;
    text-align: center;
}

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

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

/* ---------- قیمت ---------- */
.home-slider .galleryPrice {
    flex: 0 0 auto;
    height: 78px !important;
    margin-top: auto;
    padding: 8px 12px 10px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    text-align: center;
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}

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

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

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

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

/* قیمت نهایی: چیپ ملایم قرمز */
.home-slider .galleryPrice .pfirst2.all {
    display: inline-block;
    order: 0;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--hm-red-soft);
    color: var(--hm-ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 20px;
}

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

/* ناموجود */
.home-slider .hs-soldout {
    align-self: stretch;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .home-slider .hs-soldout span {
        display: inline-block;
        padding: 5px 18px;
        border-radius: 999px;
        background: var(--hm-muted);
        color: #fff;
        font-size: 11.5px;
        font-weight: 600;
        letter-spacing: .2px;
    }

/* کرایه (در صورت استفاده) */
.home-slider .Lpfirst {
    float: none;
    width: auto;
    margin-top: 4px;
    font-size: 11px;
    font-weight: normal;
    color: var(--hm-muted);
    text-align: center;
}

/* ---------- دکمه‌های راست/چپ ---------- */
.home-slider .swiper-button-next,
.home-slider .swiper-button-prev {
    position: absolute !important;
    top: 50% !important;
    bottom: auto !important;
    margin-top: 0 !important;
    width: 38px !important;
    height: 38px !important;
    transform: translateY(-50%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    background-color: var(--hm-ink) !important;
    background-image: none !important;
    box-shadow: 0 3px 8px rgba(35, 38, 43, .25);
    opacity: 1 !important;
    cursor: pointer;
    z-index: 20;
    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 #fff;
        border-top: 2px solid #fff;
    }

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

    .home-slider .swiper-button-prev:before {
        transform: translate(-50%, -50%) rotate(45deg) translate(-1px, 1px);
    }

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

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

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

.home-slider .swiper-button-disabled {
    opacity: .35 !important;
    pointer-events: none;
}

@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;
    }

    .home-slider .galleryTitle span {
        font-size: 12px;
    }

    .home-slider .galleryPrice .pfirst2.all {
        font-size: 14px;
    }
}

/* دستگاه لمسی: hover چسبنده نشود */
@media (hover: none) {
    .home-slider .box1:hover {
        transform: none;
        border-color: var(--hm-line);
        box-shadow: none;
    }

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

        .home-slider .box1:hover .galleryIamge img:first-child {
            opacity: 1;
            transform: none;
        }

        .home-slider .box1:hover .galleryIamge img:last-child {
            opacity: 0;
            transform: none;
        }
}

/* ============================================================
   2) قاب مینیمال دور عنوان + کارت‌ها
   (عنوان .Boxtitle و بدنه .BoxParent دو تگ جدا هستند؛ با :has فقط
   بخش‌های مربوط به .home-slider استایل می‌گیرند)
   ============================================================ */
.Boxtitle:has(+ .BoxParent .home-slider),
.BoxParent:has(.home-slider) {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-right: auto;
    margin-left: auto;
    background: #fff;
    border: 1px solid var(--hm-line);
    box-shadow: 0 1px 3px rgba(35, 38, 43, .04);
}

.Boxtitle:has(+ .BoxParent .home-slider) {
    position: relative;
    margin-top: 10px;
    margin-bottom: 0;
    padding: 12px 22px 8px;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    text-align: right;
}

    .Boxtitle:has(+ .BoxParent .home-slider) span {
        position: relative;
        display: inline-block;
        padding-right: 12px;
        font-size: 17px;
        font-weight: 700;
        line-height: 32px;
        color: var(--hm-ink);
        text-shadow: none;
    }

        .Boxtitle:has(+ .BoxParent .home-slider) span:before {
            content: "";
            position: absolute;
            right: 0;
            top: 50%;
            width: 4px;
            height: 18px;
            margin-top: -9px;
            border-radius: 3px;
            background: var(--hm-red);
        }

.BoxParent:has(.home-slider) {
    margin-bottom: 26px;
    padding: 6px 6px 10px;
    border-top: 1px solid var(--hm-line-soft);
    border-radius: 0 0 16px 16px;
}

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

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

/* ============================================================
   3) اسلایدر برندها
   ============================================================ */
.Boxtitle:has(+ .BoxParent .brand-slider),
.BoxParent:has(.brand-slider) {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-right: auto;
    margin-left: auto;
    background: #fff;
    border: 1px solid var(--hm-line);
    box-shadow: 0 1px 3px rgba(35, 38, 43, .04);
}

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

    .Boxtitle:has(+ .BoxParent .brand-slider) span {
        position: relative;
        display: inline-block;
        padding-right: 12px;
        font-size: 16px;
        font-weight: 700;
        line-height: 32px;
        color: var(--hm-ink);
        text-shadow: none;
    }

        .Boxtitle:has(+ .BoxParent .brand-slider) span:before {
            content: "";
            position: absolute;
            right: 0;
            top: 50%;
            width: 4px;
            height: 16px;
            margin-top: -8px;
            border-radius: 3px;
            background: var(--hm-red);
        }

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

    /* عرض ثابت .container سراسری فقط داخل قاب برندها خنثی می‌شود */
    .BoxParent:has(.brand-slider) > .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

#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;
        min-width: 0 !important;
        max-width: none !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;
        position: relative !important;
        overflow: hidden !important;
        background: #fff;
        border: 1px solid var(--hm-line-soft);
        border-radius: 14px;
        transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
    }

        #swiper-wrapper4 .swiper-slide:hover {
            border-color: var(--hm-red);
            box-shadow: 0 8px 18px rgba(35, 38, 43, .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;
    }

.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;
}

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

    #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 var(--hm-ink);
        border-top: 2px solid var(--hm-ink);
    }

#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: 1080px) {
    .Boxtitle:has(+ .BoxParent .brand-slider) {
        border-radius: 12px 12px 0 0;
    }

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

@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;
    }
}

/* ============================================================
   4) اسلایدر اصلی: تمام‌عرض + نقطه‌ها + دکمه‌ها
   ============================================================ */
#site-container.slider-full {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

.slidering {
    position: relative;
    width: 100%;
    height: auto !important;
    overflow: hidden;
}

    .slidering #mother {
        position: relative;
        display: block;
        float: none !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: hidden;
    }

    /* لیست اسلایدها: ارتفاع را اولین تصویر تعیین می‌کند، بقیه روی هم می‌افتند */
    .slidering #ss {
        position: relative;
        display: block;
        width: 100% !important;
        height: auto !important;
        margin: 0;
        padding: 0;
        list-style: none;
        overflow: hidden;
    }

        .slidering #ss li {
            height: auto !important;
        }

            .slidering #ss li img {
                display: block;
                width: 100% !important;
                height: auto !important;
            }

/* ---------- نقطه‌ها (پایین، وسط) ---------- */
.ss-pagination {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 50;
}

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

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

        .ss-pagination .ss-dot.active {
            width: 24px;
            border-radius: 4px;
            background: var(--hm-red);
        }

/* ---------- دکمه‌های چپ/راست ---------- */
.TopImage .flex-direction-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .TopImage .flex-direction-nav li {
        position: absolute !important;
        top: 50% !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: translateY(-50%);
        z-index: 60;
    }

    .TopImage .flex-direction-nav .flex-nav-prev {
        left: 22px !important;
        right: auto !important;
    }

    .TopImage .flex-direction-nav .flex-nav-next {
        right: 22px !important;
        left: auto !important;
    }

    .TopImage .flex-direction-nav a {
        display: block !important;
        position: relative !important;
        width: 46px !important;
        height: 46px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden;
        text-indent: -9999px;
        font-size: 0 !important;
        border: 0 !important;
        border-radius: 50% !important;
        background-color: rgba(255, 255, 255, .9) !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: 20px 20px !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
        opacity: 0;
        transition: background-color .25s ease, transform .25s ease, opacity .25s ease;
    }

/* با رفتن موس روی اسلایدر دکمه‌ها ظاهر می‌شوند */
.TopImage:hover .flex-direction-nav a {
    opacity: 1;
}

.TopImage .flex-direction-nav a:hover {
    background-color: var(--hm-red) !important;
    transform: scale(1.08);
}

/* فقط فلش را با SVG می‌کشیم؛ :before/:after غیرفعال */
.TopImage .flex-direction-nav a:before,
.TopImage .flex-direction-nav a:after {
    content: none !important;
    display: none !important;
}

/* فلش چپ  < */
.TopImage .flex-direction-nav .flex-prev {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2323262b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4l-8 8 8 8'/%3E%3C/svg%3E") !important;
}

    .TopImage .flex-direction-nav .flex-prev:hover {
        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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4l-8 8 8 8'/%3E%3C/svg%3E") !important;
    }

/* فلش راست  > */
.TopImage .flex-direction-nav .flex-next {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2323262b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4l8 8-8 8'/%3E%3C/svg%3E") !important;
}

    .TopImage .flex-direction-nav .flex-next:hover {
        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='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4l8 8-8 8'/%3E%3C/svg%3E") !important;
    }
@media (max-width: 700px) {
    .ss-pagination {
        bottom: 8px;
        gap: 6px;
        padding: 4px 9px;
    }

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

            .ss-pagination .ss-dot.active {
                width: 16px;
            }

    .TopImage .flex-direction-nav a {
        width: 34px !important;
        height: 34px !important;
        background-size: 16px 16px !important;
        opacity: 1;
    }

    .TopImage .flex-direction-nav .flex-nav-prev {
        left: 8px !important;
    }

    .TopImage .flex-direction-nav .flex-nav-next {
        right: 8px !important;
    }
}
/* ============================================================
   5) اسلایدر اصلی در موبایل: کارت‌های کناریِ نیمه‌دیده + سوایپ لمسی
   ============================================================ */
@media (max-width: 700px) {

    #site-container.slider-full {
        overflow: visible;
    }

    .slidering,
    .slidering #mother {
        overflow: hidden;
        background: transparent;
    }

        .slidering #mother {
            padding: 10px 0 4px;
        }

    /* دکمه‌ها در موبایل حذف می‌شوند */
    .TopImage .flex-direction-nav {
        display: none !important;
    }

    /* ریل اسلایدها: اسکرول افقی با snap */
    .slidering #ss {
        display: flex !important;
        flex-direction: row;
        direction: rtl;
        gap: 10px;
        width: 100% !important;
        padding: 0 6% !important;
        box-sizing: border-box;
        overflow-x: auto !important;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 6%;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

        .slidering #ss::-webkit-scrollbar {
            display: none;
        }

        /* استایل‌های inline اسکریپت (opacity / margin / z-index) را خنثی می‌کنیم */
        .slidering #ss li {
            flex: 0 0 88% !important;
            width: 88% !important;
            float: none !important;
            margin: 0 !important;
            opacity: 1 !important;
            z-index: auto !important;
            position: relative !important;
            display: block !important;
            scroll-snap-align: center;
            scroll-snap-stop: always;
            overflow: hidden;
            border-radius: 14px;
            background: #f4f5f6;
        }

            .slidering #ss li a {
                display: block;
            }

            .slidering #ss li img {
                display: block;
                width: 100% !important;
                height: auto !important;
                aspect-ratio: 2 / 1;
                object-fit: cover;
                object-position: center;
                border-radius: 14px;
                -webkit-user-drag: none;
                user-select: none;
            }

    /* نقطه‌ها سر جای خودشان (پایین، وسط) */
    .ss-pagination {
        bottom: 14px;
    }
}
/* ============================================================
   6) قاب قرمز اسلایدر محصولات (شبیه دیجی‌کالا)
   ============================================================ */
.BoxParent.hs-wonder:has(.home-slider) {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    margin-bottom: 26px;
    padding: 18px 18px 18px 10px;
    background: linear-gradient(135deg, #e1251b 0%, #c41e15 100%);
    border: 0;
    border-radius: 18px;
    box-shadow: 0 10px 26px -12px rgba(225, 37, 27, .55);
}

/* پنل عنوان (سمت راست) */
.hs-wonder-side {
    flex: 0 0 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    text-align: center;
}

.hs-wonder-title {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.7;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

    /* خط کوچک زیر عنوان */
    .hs-wonder-title::after {
        content: "";
        display: block;
        width: 36px;
        height: 4px;
        margin: 12px auto 0;
        border-radius: 3px;
        background: rgba(255, 255, 255, .85);
    }

/* اسلایدر بقیه‌ی عرض را بگیرد */
.hs-wonder .home-slider {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
}

/* تبلت و موبایل: عنوان بالا، اسلایدر پایین */
@media (max-width: 980px) {
    .BoxParent.hs-wonder:has(.home-slider) {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 12px 8px 12px;
        border-radius: 14px;
    }

    .hs-wonder-side {
        flex: none;
        align-items: flex-start;
        padding: 0 8px;
        text-align: right;
    }

    .hs-wonder-title {
        font-size: 18px;
        line-height: 1.6;
    }

        .hs-wonder-title::after {
            margin: 6px 0 0;
            width: 28px;
            height: 3px;
        }

    .hs-wonder .home-slider {
        width: 100% !important;
    }
}
/* ============================================================
   7) دکمه‌های اسلایدر داخل قاب قرمز
   ============================================================ */

/* دکمه‌ها را از لبه‌ی کارت‌ها داخل‌تر می‌آوریم */
.hs-wonder .home-slider .swiper-button-prev {
    right: 22px;
    left: auto;
}

.hs-wonder .home-slider .swiper-button-next {
    left: 22px;
    right: auto;
}

/* ظاهر نرم + سایه‌ی کمی بیشتر تا روی تصویر کارت‌ها دیده شوند */
.hs-wonder .home-slider .swiper-button-next,
.hs-wonder .home-slider .swiper-button-prev {
    box-shadow: 0 4px 12px rgba(35, 38, 43, .3);
    transition: background-color .2s ease, opacity .25s ease, transform .25s ease, visibility .25s ease;
}

/* ابتدا یا انتهای اسلایدر: دکمه کاملاً مخفی (نه فقط کم‌رنگ) */
.hs-wonder .home-slider .swiper-button-disabled {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
}
/* ============================================================
   8) رنگ دکمه‌های اسلایدر داخل قاب قرمز: طوسی
   ============================================================ */
.hs-wonder .home-slider .swiper-button-next,
.hs-wonder .home-slider .swiper-button-prev {
    background-color: #8a9099 !important;
}

    /* هاور: طوسی تیره‌تر (هم‌رنگ متن‌های خاکستری سایت) */
    .hs-wonder .home-slider .swiper-button-next:hover,
    .hs-wonder .home-slider .swiper-button-prev:hover {
        background-color: #52575c !important;
    }
/* ============================================================
   9) نسخه‌ی روشن قاب (یکی در میان): پس‌زمینه‌ی سفید + حاشیه‌ی قرمز + طرح
   ============================================================ */
.BoxParent.hs-wonder.hs-wonder-alt:has(.home-slider) {
    position: relative;
    background-color: #fff;
    background-image: radial-gradient(circle at 100% 0, rgba(225, 37, 27, .12) 0, rgba(225, 37, 27, 0) 40%), radial-gradient(circle at 0 100%, rgba(225, 37, 27, .07) 0, rgba(225, 37, 27, 0) 35%), repeating-linear-gradient(135deg, rgba(225, 37, 27, .045) 0 2px, transparent 2px 16px);
    border: 2px solid var(--hm-red);
    box-shadow: 0 10px 26px -14px rgba(225, 37, 27, .35);
}

/* نوار قرمز باریک بالای قاب */
.hs-wonder-alt::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(90deg, var(--hm-red-dark), var(--hm-red) 50%, var(--hm-red-dark));
    pointer-events: none;
}

/* عنوان: قرمز تیره روی زمینه‌ی روشن */
.hs-wonder-alt .hs-wonder-title {
    color: var(--hm-red-dark);
    text-shadow: none;
}

    .hs-wonder-alt .hs-wonder-title::after {
        width: 44px;
        background: var(--hm-red);
    }

/* کارت‌ها روی زمینه‌ی روشن کمی سایه بگیرند تا از پس‌زمینه جدا شوند */
.hs-wonder-alt .home-slider .box1 {
    border-color: #f0d6d4;
    box-shadow: 0 4px 12px rgba(35, 38, 43, .06);
}

    .hs-wonder-alt .home-slider .box1:hover {
        border-color: var(--hm-red);
        box-shadow: 0 14px 28px rgba(225, 37, 27, .18);
    }

@media (max-width: 980px) {
    .hs-wonder-alt::before {
        border-radius: 12px 12px 0 0;
    }
}
/* ============================================================
   10) ریسپانسیو قاب قرمز (سبک دیجی‌کالا): عنوان بالا، اسلایدر پایین
   ============================================================ */
@media (max-width: 980px) {

    .BoxParent.hs-wonder:has(.home-slider) {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin: 12px 8px 18px;
        padding: 12px 0 10px;
        overflow: hidden;
        border-radius: 16px;
    }

    /* باگ اصلی: اسلایدر نباید در حالت ستونی فشرده شود */
    .BoxParent.hs-wonder .home-slider {
        flex: 0 0 auto;
        width: 100% !important;
        min-width: 0;
        padding: 0 !important;
    }

    .hs-wonder .home-slider .boxItem {
        padding: 6px 0 4px !important;
        overflow: hidden;
    }

    /* هدر: عنوان سمت راست، بدون خط زیرش */
    .hs-wonder-side {
        flex: none;
        width: 100%;
        box-sizing: border-box;
        align-items: flex-start;
        padding: 0 16px 4px;
        text-align: right;
    }

    .hs-wonder-title {
        font-size: 18px;
        line-height: 1.6;
    }

        .hs-wonder-title::after {
            display: none;
        }

    /* اولین و آخرین کارت از لبه‌ی قاب فاصله بگیرند */
    .hs-wonder .home-slider .swiper-wrapper {
        padding: 0 6px;
        box-sizing: border-box;
    }
}

@media (max-width: 539px) {
    .BoxParent.hs-wonder:has(.home-slider) {
        margin: 10px 0 16px;
        border-radius: 0;
    }

    .hs-wonder-title {
        font-size: 16px;
    }
}

/* نسخه‌ی روشن در موبایل */
@media (max-width: 980px) {
    .BoxParent.hs-wonder.hs-wonder-alt:has(.home-slider) {
        border-width: 2px;
    }

    .hs-wonder-alt::before {
        height: 5px;
    }
}
/* ============================================================
   11) عنوان پررنگ‌تر + دکمه‌ی «مشاهده همه»
   ============================================================ */

/* عنوان: ضخیم‌تر و بزرگ‌تر (stroke برای فونت‌هایی که وزن ۹۰۰ ندارند) */
.hs-wonder-title {
    font-size: 27px;
    font-weight: 900;
    -webkit-text-stroke: .5px currentColor;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .22);
}

.hs-wonder-alt .hs-wonder-title {
    text-shadow: none;
}

/* دکمه: کپسول سفید با متن قرمز روی قاب قرمز */
.hs-wonder-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 20px;
    color: var(--hm-red-dark);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

    .hs-wonder-more::after {
        content: "";
        width: 7px;
        height: 7px;
        border-left: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
    }

    .hs-wonder-more:hover,
    .hs-wonder-more:focus {
        color: var(--hm-red-dark);
        text-decoration: none;
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, .25);
    }

/* نسخه‌ی روشن: دکمه‌ی قرمز با متن سفید */
.hs-wonder-alt .hs-wonder-more {
    color: #fff;
    background: var(--hm-red);
    box-shadow: 0 6px 14px -4px rgba(225, 37, 27, .55);
}

    .hs-wonder-alt .hs-wonder-more:hover,
    .hs-wonder-alt .hs-wonder-more:focus {
        color: #fff;
        background: var(--hm-red-dark);
    }

/* موبایل و تبلت: عنوان سمت راست، دکمه سمت چپ، در یک ردیف */
@media (max-width: 980px) {
    .hs-wonder-side {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .hs-wonder-title {
        font-size: 20px;
    }

    .hs-wonder-more {
        margin-top: 0;
        padding: 6px 14px;
        font-size: 12px;
    }
}

@media (max-width: 539px) {
    .hs-wonder-title {
        font-size: 18px;
    }
}
/* ============================================================
   12) بنرهای دوتایی بین لاین‌های محصولات
   ============================================================ */
.hs-banners {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    margin: 0 0 26px;
    box-sizing: border-box;
}

    .hs-banners:has(.hs-banner:only-child) {
        grid-template-columns: minmax(0, 1fr);
    }

.hs-banner {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: #f4f5f6;
    text-decoration: none;
    box-shadow: 0 6px 18px -8px rgba(35, 38, 43, .35);
    transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s cubic-bezier(.22,.61,.36,1);
}

    .hs-banner img {
        display: block;
        width: 100%;
        height: auto;
        transition: transform .5s cubic-bezier(.22,.61,.36,1);
    }

    .hs-banner:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 30px -10px rgba(225, 37, 27, .35);
    }

        .hs-banner:hover img {
            transform: scale(1.04);
        }

/* تبلت: فاصله و گردی کمتر */
@media (max-width: 980px) {
    .hs-banners {
        gap: 10px;
        margin: 0 8px 18px;
        width: auto;
    }

    .hs-banner {
        border-radius: 12px;
    }
}

/* موبایل: بنرها زیر هم */
@media (max-width: 600px) {
    .hs-banners {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        margin: 0 10px 16px;
    }
}

/* دستگاه لمسی: hover چسبنده نشود */
@media (hover: none) {
    .hs-banner:hover {
        transform: none;
        box-shadow: 0 6px 18px -8px rgba(35, 38, 43, .35);
    }

        .hs-banner:hover img {
            transform: none;
        }
}