/**
 * مگا تاپ ارو — عنوان راست | لینک + بعدی + قبلی + نوار (چپ، LTR)
 * دکمه‌های هدر بدون کلاس swiper-button-* تا CSS Swiper آن‌ها را روی کاروسل نبرد.
 */

.hpb-module.hpb-module--carousel.hpb-carousel-mega-product {
    direction: rtl;
    width: 100%;
    font-family: var(--hpb-font-primary);
}

header.hpb-mega-top-arrow-header {
    display: flex;
    position: relative;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 22px;
    font-family: inherit;
}

.hpb-mega-top-arrow-header__title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.4;
    color: #1a2d5c;
    text-align: right;
}

.hpb-mega-top-arrow-header__tools {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    flex-shrink: 0;
    gap: 0;
    direction: ltr;
}

/* هر فلشی داخل باکس کاروسل — مخفی (فقط هدر) */
section.hpb-carousel-mega-product .hpb-carousel .swiper-button-prev,
section.hpb-carousel-mega-product .hpb-carousel .swiper-button-next,
section.hpb-carousel-mega-product .hpb-carousel .hpb-carousel__arrow {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

section.hpb-carousel-mega-product .hpb-carousel--arrows-outside .hpb-carousel__frame,
section.hpb-carousel-mega-product .hpb-carousel--arrows-sides .hpb-carousel__frame {
    padding: 0 !important;
}

.hpb-mega-top-arrow-btn {
    position: relative;
    left: unset;
    right: unset;
    top: unset;
    bottom: unset;
    transform: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid gainsboro;
    margin: 0 2px;
    padding: 0;
    background: unset;
    box-shadow: none;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
}

.hpb-mega-top-arrow-btn i {
    display: block;
    font-size: 16px;
    line-height: 1;
    color: #000;
    pointer-events: none;
}

.hpb-mega-top-arrow-btn.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

a.hpb-mega-top-arrow-link,
span.hpb-mega-top-arrow-link {
    border: 1px solid #8080803b;
    background: #dcdcdc00;
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    margin: 0 0 0 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 40px;
}

a.hpb-mega-top-arrow-link:hover {
    border-color: #80808066;
    color: #000;
}

section.hpb-carousel-mega-product .hpb-mega-top-arrow-pagination {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    flex: 0 1 auto;
    min-width: 72px;
    max-width: 120px;
    width: auto !important;
    height: 3px !important;
    margin: 0 2px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

section.hpb-carousel-mega-product .hpb-mega-top-arrow-pagination .swiper-pagination-progressbar-fill {
    background: #000;
    border-radius: 999px;
}

.hpb-carousel.hpb-carousel-mega-product .hpb-carousel__frame {
    margin-top: 0;
}

.hpb-carousel.hpb-carousel-mega-product .swiper-wrapper {
    align-items: stretch;
}

.hpb-carousel.hpb-carousel-mega-product .swiper-slide {
    height: auto;
    display: flex;
}

.hpb-carousel.hpb-carousel-mega-product .swiper-slide > * {
    flex: 1 1 auto;
    width: 100%;
}

.hpb-carousel.hpb-carousel-mega-product .hamta-product-card,
.hpb-carousel.hpb-carousel-mega-product .hpb-preset-style-only-wrap {
    height: 100%;
    margin: 0;
    font-family: inherit;
}

@media (max-width: 767px) {
    header.hpb-mega-top-arrow-header {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
    }

    .hpb-mega-top-arrow-header__title {
        font-size: 1.15rem;
        text-align: right;
    }

    .hpb-mega-top-arrow-header__tools {
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    section.hpb-carousel-mega-product .hpb-mega-top-arrow-pagination {
        min-width: 40px;
        max-width: 80px;
    }
}

@media (min-width: 768px) {
    body.home main .home_mega_categoies .hpb-mega-top-arrow-header__title {
        font-size: 1.5rem;
    }
}
