/* استایل‌های سکشن بهترین مراکز */
.section-type-three {
    margin: 0px 0px 10px 0px;
}
.section-type-three > .container {
    max-width: 1146px;
    margin: 0 auto;
    padding: 0 30px;
}
.section-type-three .section-header {
    margin-bottom: 20px;
}
.section-type-three .section-header .title {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #000;
}
.section-type-three .section-header .description {
    font-size: 14px;
    color: #666;
    margin: 0;
}
.section-type-three .section-menu-cta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    position: relative;
    margin-bottom: 20px;
    pointer-events: auto !important;
}
.custom-scroller-menu {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    cursor: grab !important;
}
.custom-scroller-menu:active {
    cursor: grabbing !important;
}
.custom-scroller-menu::-webkit-scrollbar {
    display: none;
}
.custom-scroller-menu > .container {
    display: flex !important;
    flex: 0 0 auto !important;
    scroll-snap-type: none !important;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    min-width: max-content !important;
    width: max-content !important;
    max-width: none !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    /* اطمینان از اینکه container می‌تواند بزرگتر از scroller باشد */
    overflow: visible !important;
    position: relative !important;
}
.custom-scroller-menu .item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: none;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    cursor: grab;
}
.custom-scroller-menu .item:active {
    cursor: grabbing;
}
.custom-scroller-menu .item .cta {
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: none;
    padding: 4px 24px;
    border-radius: 8px;
    font-size: 16px;
    line-height: 2;
    color: var(--blck, #000);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    cursor: pointer;
    pointer-events: auto;
}
.custom-scroller-menu .item.current .cta {
    color: #fff;
    background-color: var(--primary, #0066ff);
    border-radius: 8px;
}
.custom-scroller-menu .item .cta .icon {
    margin-right: 6px;
}
.custom-scroller-menu .item .cta .icon svg {
    fill: currentColor;
    width: 18px;
    height: 18px;
}
.section-type-three .section-items-wrapper {
    position: relative;
    max-width: 100%;
}

.section-type-three .section-items {
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

/* برای نمایش کاروسل در دسکتاپ: نمایش 6 کارت بدون اسکرول */
@media screen and (min-width: 768px) {
    .section-type-three .section-items {
        grid-template-columns: repeat(6, 1fr);
        overflow-x: visible;
        cursor: default;
        user-select: auto;
        -webkit-user-select: auto;
        -moz-user-select: auto;
        -ms-user-select: auto;
    }
    
    .section-type-three .section-items .item {
        min-width: 0;
    }
    
    /* اطمینان از کاروسل تب شهرها در دسکتاپ - راه حل قطعی */
    .section-type-three .section-menu-cta {
        overflow: visible !important;
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .section-type-three .custom-scroller-menu,
    .custom-scroller-menu {
        display: flex !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        cursor: grab !important;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        position: relative !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        /* اطمینان از اینکه می‌تواند اسکرول کند */
        scroll-behavior: auto !important;
        overscroll-behavior-x: contain !important;
    }
    
    .section-type-three .custom-scroller-menu::-webkit-scrollbar,
    .custom-scroller-menu::-webkit-scrollbar {
        display: none !important;
    }
    
    .section-type-three .custom-scroller-menu:active,
    .custom-scroller-menu:active {
        cursor: grabbing !important;
    }
    
    /* این استایل باید حتماً override کند - با specificity بالاتر */
    .section-type-three .custom-scroller-menu > .container,
    .custom-scroller-menu > .container {
        min-width: max-content !important;
        width: max-content !important;
        max-width: none !important;
        flex-shrink: 0 !important;
        display: flex !important;
        margin: 0 !important;
        flex-wrap: nowrap !important;
        flex: 0 0 auto !important;
        box-sizing: border-box !important;
    }
    
    .section-type-three .custom-scroller-menu .item,
    .custom-scroller-menu .item {
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        flex-basis: auto !important;
        min-width: fit-content !important;
    }
}

/* استایل اضافی برای اطمینان از کاروسل در دسکتاپ - با specificity بالاتر */
@media screen and (min-width: 768px) {
    /* Override کامل استایل‌های موبایل */
    .section-type-three .section-menu-cta .custom-scroller-menu > .container {
        min-width: max-content !important;
        width: max-content !important;
        max-width: none !important;
    }
    
    /* اطمینان از اینکه custom-scroller-menu می‌تواند اسکرول کند */
    .section-type-three .section-menu-cta .custom-scroller-menu {
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }
}
.section-type-three .section-items .item {
    position: relative;
    border-radius: 10px;
    border: 1px solid #bac6d3;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}
.section-type-three .section-items .item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
/* حذف استایل .pic چون دیگر استفاده نمی‌شود */
.section-type-three .section-items .item .pic {
    display: none;
}

.section-type-three .section-items .item .title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    padding: 8px 8px 0 8px;
    margin: 0 0 8px 0;
    color: #000;
    height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: center;
}

/* استایل ردیف نمایندگی (ردیف دوم) */
.section-type-three .section-items .item .representative-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px;
    margin: 0 0 8px 0;
    gap: 8px;
    background-color: #fff8f5;
    border-radius: 4px;
}

.section-type-three .section-items .item .representative-text {
    flex: 0 0 50%;
    font-size: 13px;
    color: #6e7a86;
    line-height: 1.3;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
    min-height: 60px;
}

.section-type-three .section-items .item .representative-text-line {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    width: 100%;
}

.section-type-three .section-items .item .representative-image {
    flex: 0 0 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 60px;
}

.section-type-three .section-items .item .representative-image img {
    width: 100%;
    max-width: 60px;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
    background: transparent;
    background-color: transparent;
}

.section-type-three .section-items .item .address {
    display: flex;
    align-items: flex-start;
    color: var(--blck, #000);
    font-size: 12px;
    line-height: 1.5;
    margin: 7px 8px 4px 8px;
    padding-right: 0;
    padding-left: 8px;
    text-decoration: none;
    gap: 4px;
}

.section-type-three .section-items .item .address-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 12px;
    min-width: 0;
    max-width: calc(100% - 12px);
    box-sizing: border-box;
}

.section-type-three .section-items .item .address-lines p.address {
    white-space: nowrap;
    flex-shrink: 1;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* فقط خط دوم آدرس باید ellipsis داشته باشد */
.section-type-three .section-items .item .address-lines p.address:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.section-type-three .section-items .item .address svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: #6e7a86;
    margin-left: 0;
}
.section-type-three .section-items .item .phone {
    display: flex;
    align-items: center;
    color: var(--blck, #000);
    font-size: 12px;
    line-height: 1.5;
    margin: 0 8px 0 8px;
    text-decoration: none;
    gap: 4px;
}
.section-type-three .section-items .item .phone p.phone,
.section-type-three .section-items .item .phone p.phone-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    line-height: 1;
    margin: 0;
}
.section-type-three .section-items .item .phone svg {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    fill: #6e7a86;
    margin-bottom: 6px;
}
.section-type-three .section-items .item .distance {
    display: block;
    align-items: center;
    color: var(--blck, #000);
    font-size: 12px;
    margin: 16px 6px 20px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.section-type-three .section-items .item a::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    z-index: 10;
}
.loading-items,
.no-items {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}
.scroll-indicator {
    display: none;
    width: 40px;
    height: 7px;
    background-color: #d1d5db;
    border-radius: 10px;
    margin: 14px auto;
    position: relative;
    overflow: hidden;
}
.scroll-thumb {
    width: 25%;
    height: 100%;
    background-color: #6e7a86;
    border-radius: 10px;
    position: absolute;
    right: 0;
    top: 0;
}
@media screen and (max-width: 767px) {
    .section-type-three {
        margin: 30px 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .section-type-three > .container {
        padding: 0 15px;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }
    .section-type-three .section-menu-cta {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: visible;
        overflow-y: visible;
        position: relative;
    }
    .section-type-three .custom-scroller-menu {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
        cursor: grab;
    }
    .section-type-three .custom-scroller-menu:active {
        cursor: grabbing;
    }
    .section-type-three .custom-scroller-menu > .container {
        margin: 0 !important;
        width: auto !important;
        min-width: max-content !important;
        max-width: none !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        flex-shrink: 0 !important;
    }
    
    .section-type-three .section-header {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .section-type-three .section-header .title {
        padding: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    .section-type-three .section-header .description {
        padding: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    .scroll-indicator {
        display: block;
    }
    .section-type-three .section-items-wrapper {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    .section-type-three .section-items {
        padding: 0;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-flow: row;
        grid-template-rows: auto;
        overflow-x: visible;
        overflow-y: visible;
        cursor: default;
        scroll-behavior: auto;
        gap: 12px;
        user-select: auto;
        -webkit-user-select: auto;
        -moz-user-select: auto;
        -ms-user-select: auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .section-type-three .section-items .item {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .section-type-three .section-items .item .title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .section-type-three .section-items .item .address {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .section-type-three .section-items .item .address-lines {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .section-type-three .section-items .item .address-lines p.address {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        word-wrap: normal;
        overflow-wrap: normal;
    }
    
    .section-type-three .section-items .item .representative-row {
        flex-wrap: nowrap;
        flex-shrink: 0;
        min-width: 0;
    }
    
    .section-type-three .section-items .item .representative-text {
        font-size: 15px;
        flex: 0 0 64%;
        overflow: visible;
        flex-shrink: 1;
        min-width: 0;
        align-items: flex-end;
    }
    
    .section-type-three .section-items .item .representative-image {
        flex: 0 0 36%;
        flex-shrink: 0;
        min-width: 0;
        justify-content: center;
        height: 100%;
    }
    
    .section-type-three .section-items .item .representative-image img {
        max-width: 55px;
        background: transparent;
        background-color: transparent;
        object-fit: contain;
    }
    
    .section-type-three .section-items .item .phone {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .section-type-three .section-items .item .phone p.phone,
    .section-type-three .section-items .item .phone p.phone-text {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .section-type-three .carousel-nav {
        margin-top: 15px;
    }
    
    .section-type-three .carousel-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .section-type-three .section-menu-cta > .cta {
        display: none;
    }
}

/* استایل see-all-cta - نمایش در موبایل، مخفی در دسکتاپ */
.section-type-three .see-all-cta {
    display: flex;
    justify-content: flex-end;
    margin: 20px 20px 0;
}
.section-type-three .see-all-cta a {
    font-size: 14px;
    line-height: 1.7;
    padding: 9px;
    border-radius: 10px;
    border: 2px solid var(--primary, #0066ff);
    color: var(--primary, #0066ff);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.section-type-three .see-all-cta a svg {
    width: 18px;
    height: 18px;
    fill: var(--primary, #0066ff);
    margin-bottom: 2px;
}
/* مخفی کردن در دسکتاپ */
@media (min-width: 767px) {
    .section-type-three .see-all-cta {
        display: none !important;
    }
}

/* دکمه‌های ناوبری کاروسل */
.section-type-three .carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.section-type-three .carousel-nav.hidden {
    display: none;
}

.section-type-three .carousel-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #000;
    font-size: 20px;
    user-select: none;
}

.section-type-three .carousel-nav-btn:hover {
    background-color: var(--primary, #0066ff);
    border-color: var(--primary, #0066ff);
    color: #fff;
}

.section-type-three .carousel-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #f3f4f6;
    border-color: #e5e7eb;
}

.section-type-three .carousel-nav-btn:disabled:hover {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    color: #000;
}

.section-type-three .carousel-nav-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Version: 1765717730 */

/* IMPORTANT FIX - Version 20251214164609 */
/* If you see this comment in browser DevTools, the CSS is loading correctly */

/* ===============================================
   DEBUG: Force visibility of menu tabs
   =============================================== */
.section-type-three .section-menu-cta {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 50px !important;
    margin-bottom: 20px !important;
    z-index: 100 !important;
    position: relative !important;
    /* background: rgba(255, 0, 0, 0.1) !important;  */
}

.section-type-three .section-menu-cta .menu,
.section-type-three .section-menu-cta #best-shops-menu {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 40px !important;
    z-index: 101 !important;
    /*background: rgba(0, 255, 0, 0.1) !important; */
}

.section-type-three .section-menu-cta .container {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    /*background: rgba(0, 0, 255, 0.1) !important; */
}

.section-type-three .section-menu-cta .item {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 50px !important;
    min-height: 30px !important;
}

/* استایل‌های کارت‌های JetEngine در صفحه all-centers */
/* اعمال استایل‌های representative-row برای کارت‌های JetEngine */
.section-type-three-item .representative-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px;
    margin: 0 0 8px 0;
    gap: 8px;
    background-color: #fff8f5;
    border-radius: 4px;
}

.section-type-three-item .representative-text {
    flex: 0 0 50%;
    font-size: 13px;
    color: #6e7a86;
    line-height: 1.3;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
    min-height: 60px;
}

.section-type-three-item .representative-text-line {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    width: 100%;
}

.section-type-three-item .representative-image {
    flex: 0 0 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 60px;
}

.section-type-three-item .representative-image img {
    width: 100%;
    max-width: 60px;
    max-height: 34px;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
    background: transparent;
    background-color: transparent;
}

.section-type-three-item .title {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #000;
    line-height: 1.4;
}

.section-type-three-item .address {
    display: flex;
    align-items: flex-start;
    color: var(--blck, #000);
    font-size: 12px;
    line-height: 1.5;
    margin: 7px 8px 4px 8px;
    padding-right: 0;
    padding-left: 12px;
    text-decoration: none;
    gap: 4px;
}

.section-type-three-item .address-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    max-width: calc(100% - 12px);
}

.section-type-three-item .address-lines p.address {
    white-space: nowrap;
    flex-shrink: 1;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.section-type-three-item .address-lines p.address:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.section-type-three-item .address svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: #6e7a86;
}

.section-type-three-item .phone {
    display: flex;
    align-items: center;
    color: var(--blck, #000);
    font-size: 12px;
    line-height: 1.5;
    margin: 0 8px 0 8px;
    text-decoration: none;
    gap: 4px;
}

.section-type-three-item .phone svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: #6e7a86;
}

.section-type-three-item .phone p.phone {
    margin: 0;
    flex: 1;
    min-width: 0;
}

/* استایل‌های موبایل برای کارت‌های JetEngine */
@media screen and (max-width: 767px) {
    .section-type-three-item .representative-text {
        font-size: 12px;
        flex: 0 0 64%;
        overflow: visible;
        flex-shrink: 1;
        min-width: 0;
    }

    .section-type-three-item .representative-image {
        flex: 0 0 36%;
        flex-shrink: 0;
        min-width: 0;
        justify-content: center;
    }

    .section-type-three-item .representative-image img {
        max-width: 55px;
        max-height: 34px;
        background: transparent;
        background-color: transparent;
    }

    .section-type-three-item .address {
        padding-left: 8px;
    }

    .section-type-three-item .address-lines {
        max-width: calc(100% - 8px);
    }

    /* لیست مراکز JetEngine: ۲ آیتم در هر ردیف روی موبایل */
    .elementor-widget-pweb_jetengine_centers_listing .pweb-centers-grid,
    .pweb-centers-listing-wrapper .pweb-centers-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ========== ویجت کارت تصویر+لینک (pweb_profile_cards_link_section) — همان استایل پروفایل ========== */
.elementor-widget-pweb_profile_cards_link_section .elementor-widget-container {
    width: 100% !important;
    max-width: 100% !important;
}

/* لینک به‌جای div برای آیتم: بدون زیرخط، همان فلکس کارت */
.pweb-profile-cards-link a.item.pweb-profile-card-link-item,
.section-type-three.pweb-profile-cards-link a.item.pweb-profile-card-link-item {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* (ابعاد کارت لینک بعد از بلوک عمومی .item، بخش «ویجت تصویر+لینک: عرض کارت…») */

/* ========== ویجت کارت‌های پروفایل (pweb_profile_cards_section) - هم‌ظاهر با best-shops-items ========== */
/* پر کردن عرض داخل Elementor */
.elementor-widget-pweb_profile_cards_section .elementor-widget-container,
.section-type-three.pweb-profile-cards {
    width: 100% !important;
    max-width: 100% !important;
}
.section-type-three.pweb-profile-cards > .container {
    max-width: 1146px;
    margin: 0 auto;
    padding: 0 30px;
    width: 100%;
    box-sizing: border-box;
}

/* عنوان ویجت بالا سمت راست (در RTL با flex-start به راست می‌رود) */
.section-type-three.pweb-profile-cards .section-header-title-right {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
    width: 100%;
}
.section-type-three.pweb-profile-cards .section-header-title-right .title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #000;
    text-align: right;
    letter-spacing: -0.3px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    font-family: "Vazirmatn", "IRANSans", "Dana", sans-serif;
}
.section-type-three.pweb-profile-cards .section-header-title-right .title::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 72px;
    height: 3px;
    border-radius: 6px;
    background: var(--primary, #0066ff);
}

/* دسکتاپ: کاروسل افقی (یک ردیف با اسکرول) */
.section-type-three.pweb-profile-cards .section-items-wrapper {
    position: relative;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
}
.section-type-three.pweb-profile-cards .section-items,
.section-type-three.pweb-profile-cards .pweb-profile-cards-items {
    max-width: 100%;
    width: 100%;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 1rem;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    padding-bottom: 8px;
}
.section-type-three.pweb-profile-cards .section-items::-webkit-scrollbar,
.section-type-three.pweb-profile-cards .pweb-profile-cards-items::-webkit-scrollbar {
    height: 6px;
}
.section-type-three.pweb-profile-cards .section-items::-webkit-scrollbar-thumb,
.section-type-three.pweb-profile-cards .pweb-profile-cards-items::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

/* آیتم کارت دسکتاپ: عرض ثابت برای کاروسل، اسنپ */
.section-type-three.pweb-profile-cards .section-items .item,
.pweb-profile-cards .section-items .item {
    position: relative;
    border-radius: 10px;
    border: 1px solid #bac6d3 !important;
    overflow: hidden;
    background: #fff !important;
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    padding: 0;
    flex: 0 0 auto;
    min-width: 160px;
    max-width: 160px;
    width: 160px;
    box-sizing: border-box;
    scroll-snap-align: start;
}
.section-type-three.pweb-profile-cards .section-items .item:hover,
.pweb-profile-cards .section-items .item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/*
 * ویجت تصویر+لینک: عرض بیشتر از کارت پروفایل (۲۲۰px) برای گرافیک‌های پهن؛
 * aspect-ratio با همان ارتفاع ۲۸۷px (۲۲۰/۲۸۷)
 */
.section-type-three.pweb-profile-cards.pweb-profile-cards-link .section-items .item,
.pweb-profile-cards.pweb-profile-cards-link .section-items .item {
    position: relative;
    min-width: 220px;
    max-width: 220px;
    width: 220px;
    aspect-ratio: 220 / 287;
}

/* تصویر بالا - نسبت مربع */
.pweb-profile-cards .section-items .item .profile-item-image,
.section-type-three.pweb-profile-cards .section-items .item .profile-item-image {
    width: 100%;
    aspect-ratio: 1.15;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
}
.pweb-profile-cards .section-items .item .profile-item-image img,
.section-type-three.pweb-profile-cards .section-items .item .profile-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* ویجت تصویر+لینک: ناحیهٔ تصویر تمام .item را می‌پوشاند (بدون نوار سفید) */
.pweb-profile-cards.pweb-profile-cards-link .section-items .item .profile-item-image,
.section-type-three.pweb-profile-cards.pweb-profile-cards-link .section-items .item .profile-item-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    flex: none;
    aspect-ratio: unset;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    direction: ltr;
    unicode-bidi: isolate;
}

.pweb-profile-cards.pweb-profile-cards-link .section-items .item .profile-item-image img,
.section-type-three.pweb-profile-cards.pweb-profile-cards-link .section-items .item .profile-item-image img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    display: block;
    margin: 0;
    padding: 0;
    vertical-align: top;
}

/* متن زیر تصویر - همان فونت و فاصله best-shops */
.pweb-profile-cards .section-items .item .profile-item-info,
.section-type-three.pweb-profile-cards .section-items .item .profile-item-info {
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: center;
    flex: 1;
    min-width: 0;
}
.pweb-profile-cards .section-items .item .profile-name,
.section-type-three.pweb-profile-cards .section-items .item .profile-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}
.pweb-profile-cards .section-items .item .profile-field,
.section-type-three.pweb-profile-cards .section-items .item .profile-field {
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    color: #6e7a86;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pweb-profile-cards .section-items .item .profile-city,
.pweb-profile-cards .section-items .item .profile-rank,
.section-type-three.pweb-profile-cards .section-items .item .profile-city,
.section-type-three.pweb-profile-cards .section-items .item .profile-rank {
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    color: #6e7a86;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* موبایل: گرید ۲ ستون + فقط ۱۰ آیتم (مثل best-shops موبایل) */
@media screen and (max-width: 767px) {
    .section-type-three.pweb-profile-cards {
        margin: 30px 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .section-type-three.pweb-profile-cards > .container {
        padding: 0 15px;
        max-width: 100%;
        width: 100%;
    }
    .section-type-three.pweb-profile-cards .section-items,
    .section-type-three.pweb-profile-cards .pweb-profile-cards-items {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 12px;
        padding: 0 0 8px 0;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .section-type-three.pweb-profile-cards .section-items .item,
    .pweb-profile-cards .section-items .item {
        min-width: 0;
        width: auto;
        max-width: none;
        /* Avoid / operator in calc to keep minifiers from breaking it */
        flex: 0 0 calc((100% - 24px) * 0.4);
        scroll-snap-align: start;
    }
    .pweb-profile-cards .section-items .item:nth-child(n+11),
    .pweb-profile-cards .pweb-profile-cards-items .item:nth-child(n+11),
    .section-type-three.pweb-profile-cards .section-items .item:nth-child(n+11) {
        display: none !important;
    }
}

/* Profile cards detailed field styles */
.pweb-profile-cards .section-items .item .profile-item-info .profile-line,
.section-type-three.pweb-profile-cards .section-items .item .profile-item-info .profile-line {
    font-size: 11px;
    line-height: 1.4;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    text-align: center;
}

.pweb-profile-cards .section-items .item .profile-item-info .profile-line-label,
.section-type-three.pweb-profile-cards .section-items .item .profile-item-info .profile-line-label {
    color: #424242;
    font-weight: 400;
}

.pweb-profile-cards .section-items .item .profile-item-info .profile-line-value,
.section-type-three.pweb-profile-cards .section-items .item .profile-item-info .profile-line-value {
    color: #000000;
    font-weight: 700;
}

.pweb-profile-cards .section-items .item .profile-item-info .profile-name-line .profile-line-value,
.section-type-three.pweb-profile-cards .section-items .item .profile-item-info .profile-name-line .profile-line-value {
    color: #00f;
}

.pweb-profile-cards .section-items .item .profile-item-info .profile-exam-score .profile-line-value,
.section-type-three.pweb-profile-cards .section-items .item .profile-item-info .profile-exam-score .profile-line-value {
    color: #0000FF;
}

.pweb-profile-cards .section-items .item .profile-item-info .profile-rep-rank .profile-line-value,
.section-type-three.pweb-profile-cards .section-items .item .profile-item-info .profile-rep-rank .profile-line-value {
    color: #ff0000;
}

/* Rocket minify safe override: keep 2.5 cards visible on mobile */
@media screen and (max-width: 767px) {
    html body .section-type-three.pweb-profile-cards .section-items .item,
    html body .section-type-three.pweb-profile-cards .pweb-profile-cards-items .item,
    html body .pweb-profile-cards .section-items .item {
        min-width: 0 !important;
        width: auto !important;
        max-width: none !important;
        flex: 0 0 calc((100% - 24px) * 0.4) !important;
        scroll-snap-align: start;
    }
}

/*
 * کارت تصویر+لینک: اولویت بالاتر از استایل‌های عمومی img تم (max-width/height:auto باعث نوار سفید و برش ناهماهنگ می‌شود)
 */
html body .pweb-profile-cards.pweb-profile-cards-link .section-items .item,
html body .section-type-three.pweb-profile-cards.pweb-profile-cards-link .section-items .item {
    min-width: 220px !important;
    max-width: 220px !important;
    width: 220px !important;
    aspect-ratio: 220 / 287 !important;
    position: relative !important;
}

html body .pweb-profile-cards.pweb-profile-cards-link .section-items .item .profile-item-image,
html body .section-type-three.pweb-profile-cards.pweb-profile-cards-link .section-items .item .profile-item-image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    flex: none !important;
    aspect-ratio: unset !important;
    margin: 0 !important;
    overflow: hidden !important;
    direction: ltr !important;
    unicode-bidi: isolate !important;
}

html body .pweb-profile-cards.pweb-profile-cards-link .section-items .item .profile-item-image img,
html body .section-type-three.pweb-profile-cards.pweb-profile-cards-link .section-items .item .profile-item-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* موبایل: کارت لینک مثل بقیه عرض متغیر + نسبت همان ارتفای دسکتاپ */
@media screen and (max-width: 767px) {
    html body .pweb-profile-cards.pweb-profile-cards-link .section-items .item,
    html body .section-type-three.pweb-profile-cards.pweb-profile-cards-link .section-items .item {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        flex: 0 0 calc((100% - 24px) * 0.52) !important;
        aspect-ratio: 220 / 287 !important;
    }
}
