.home {
    margin-top: 6rem;
}

.home-main {
    --home-section-gap: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: var(--home-section-gap);
}

.home-main > .home-section {
    margin-bottom: 0;
}

/* ========== بنرها ========== */
/* موبایل/تبلت: inset افقی مشترک با home-mobile-header */
@media (max-width: 991.98px) {
    :root {
        --home-inline-inset: calc(4.5455% + 0.364px);
    }

    .home-banner .container {
        max-width: 100%;
        padding-inline: 0;
    }

    .home-main .product-carousel-section .container {
        padding-inline: var(--home-inline-inset);
    }

    .home-main .product-carousel-section .product-carousel-wrap {
        margin-inline: calc(var(--home-inline-inset) * -1);
    }

    .home-main .product-carousel-section .product-carousel {
        padding: 0 var(--home-inline-inset) 8px;
    }
}

.home-banner__carousel {
    position: relative;
    display: flex;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.home-banner__track {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    height: 100%;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab;
}

.home-banner__track::-webkit-scrollbar {
    display: none;
}

.home-banner__track.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

/* معادل slidesPerView: 1.1 و spaceBetween: 8 — موبایل ۳۷۵≈۳۴۰ و تبلت ۷۶۸≈۶۹۷ */
.home-banner__slide {
    flex: 0 0 calc((100% - 0.8px) / 1.1);
    width: calc((100% - 0.8px) / 1.1);
    height: 180px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

/* تا اسلاید اول و آخر هم بتوانند وسط‌چین شوند */
.home-banner__slide:first-child {
    margin-inline-start: var(--home-inline-inset, calc(4.5455% + 0.364px));
}

.home-banner__slide:last-child {
    margin-inline-end: var(--home-inline-inset, calc(4.5455% + 0.364px));
}

.home-banner__link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.home-banner__media {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.04);
}

.home-banner__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* بولت و فلش فقط دسکتاپ — در موبایل/تبلت مخفی */
.home-banner__pagination,
.home-banner__nav {
    display: none;
}

@media (min-width: 992px) {
    /* هم‌تراز با container بقیه بخش‌ها */
    .home-banner__carousel {
        height: 400px;
        overflow: hidden;
    }

    .home-banner__track {
        gap: 0;
    }

    .home-banner__slide {
        flex: 0 0 100%;
        width: 100%;
        height: 400px;
        scroll-snap-align: start;
    }

    .home-banner__slide:first-child,
    .home-banner__slide:last-child {
        margin-inline: 0;
    }

    .home-banner__media {
        border-radius: 8px;
    }

    .home-banner__pagination {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 16px;
        z-index: 2;
        pointer-events: auto;
    }

    .home-banner__bullet {
        width: 8px;
        height: 8px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(12, 12, 12, 0.35);
        cursor: pointer;
        transition: width .2s ease, background-color .2s ease;
    }

    .home-banner__bullet.is-active {
        width: 20px;
        background: #0c0c0c;
    }

    /* مثل دیجی‌کالا: هر دو دکمه کنار هم، پایین سمت راست بنر */
    .home-banner__nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        direction: ltr;
        position: absolute;
        right: 40px;
        bottom: 0;
        width: 100px;
        height: 100px;
        z-index: 3;
        pointer-events: none;
        opacity: 0;
        transition: opacity .2s ease;
    }

    .home-banner__carousel:hover .home-banner__nav,
    .home-banner__carousel:focus-within .home-banner__nav {
        opacity: 1;
    }

    .home-banner__nav-btn {
        pointer-events: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: #fff;
        color: #333;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
        cursor: pointer;
    }

    .home-banner__nav-btn:hover {
        background: #f5f5f5;
    }

    .home-banner__nav-btn svg {
        display: block;
    }
}
