.ai-explore-wrapper {
    display: flex;
    height: 90vh;
    width: 100%;
    direction: rtl;
    background: #fff;
    overflow: hidden;
}

.ai-header h3{
    margin-top: 0px !important;
}


.ai-sidebar {
    width: 30%;
    background: #ffffff;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    z-index: 2;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.ai-header {
    padding: 10px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

#ai-cards-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
}

.biz-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    cursor: pointer;
}

.biz-card:hover,
.biz-card.active {
    border-color: #5143d9;
    box-shadow: 0 5px 15px rgba(81, 67, 217, 0.15);
    transform: translateY(-2px);
}

.biz-card h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.biz-card .desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

.biz-card .addr {
    font-size: 11px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.biz-link-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #f0f0f0;
    color: #333;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    transition: 0.2s;
}

.biz-link-btn:hover {
    background: #cfcfcf;
}

.ai-map-container {
    width: 70%;
    position: relative;
}

#ai-map {
    width: 100%;
    height: 100%;
}

.back-btn {
    padding: 15px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eee;
    color: #5143d9;
    text-decoration: none;
    font-weight: bold;
}

@media (max-width: 768px) {
    .ai-explore-wrapper {
        flex-direction: column-reverse;
        height: auto;
    }

    .ai-sidebar {
        width: 100%;
        height: 50vh;
    }

    .ai-map-container {
        width: 100%;
        height: 50vh;
    }
}

.biz-details-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #5143d9;
    color: #fff;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    transition: 0.2s;
}

.biz-details-btn:hover {
    background: #291e8f;
    color: #fff;
}

@media (min-width: 769px) {
    #load-more-btn {
        position: fixed;
        /* ثابت ماندن در صفحه */
        bottom: 20px;
        /* فاصله ۲۰ پیکسلی از پایین نمایشگر */
        left: 50%;
        /* انتقال به وسط افقی */
        transform: translateX(-50%);
        /* اصلاح موقعیت برای وسط‌چین دقیق */

        z-index: 9999;
        /* قرار گرفتن روی تمام المان‌ها و نقشه */

        background-color: #28a745;
        /* سبز متناسب با جستجو */
        color: white;
        padding: 12px 25px;
        border: none;
        border-radius: 50px;
        /* لبه‌های کاملاً گرد برای ظاهر مدرن */
        font-size: 15px;
        font-weight: bold;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        /* سایه برای جدا شدن از نقشه و کارت‌ها */

        display: flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s ease;
        /* انیمیشن نرم برای هاور */
    }

    #load-more-btn:hover {
        background-color: #218838;
        bottom: 25px;
        /* کمی جابجایی به بالا هنگام هاور برای جذابیت */
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }

    #load-more-btn:disabled {
        background-color: #6c757d;
        cursor: not-allowed;
        bottom: 20px;
    }

    /* برای اینکه دکمه روی موبایل خیلی بزرگ نباشد */
}




.ai-warning-box {
    background-color: #fff9c4;
    /* زرد ملایم */
    border-right: 5px solid #fbc02d;
    /* نوار رنگی سمت راست */
    color: #5d4037;
    padding: 15px 20px 15px 20px;


    position: relative;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    direction: rtl;
}

.ai-warning-box a {
    color: #d32f2f;
    text-decoration: underline;
    font-weight: bold;
}

.warning-content i {
    margin-left: 10px;
    color: #f57f17;
    font-size: 18px;
}

.close-warning {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    color: #8d6e63;
    transition: 0.3s;
}

.close-warning:hover {
    color: #000;
}











.mobile-view-toggle {
    display: none;
}
@media (max-width: 768px) {
    /* ۱. والد اصلی: اسکرول طبیعی */
    .ai-explore-wrapper {
        flex-direction: column;
        height: auto;
        overflow: visible;
        position: relative;
    }

    /* ۲. سایدبار و کارت‌ها */
    .ai-sidebar {
        width: 100%;
        height: auto;
        display: block;
        box-shadow: none;
        border-left: none;
    }

    #ai-cards-container {
        overflow-y: visible;
        height: auto;
    }

    /* ۳. تنظیمات نقشه */
    .ai-map-container {
        display: none;
        width: 100%;
        height: calc(100vh - 120px) !important;
        position: relative;
    }

    .ai-explore-wrapper.show-map {
        height: calc(100vh - 120px);
        overflow: hidden;
    }

    .ai-explore-wrapper.show-map .ai-sidebar {
        display: none;
    }

    .ai-explore-wrapper.show-map .ai-map-container {
        display: block;
    }

    /* ۴. نوار دکمه‌های پایین (فیکس شده) */
    .mobile-action-bar-fixed {
        display: flex !important;
        flex-direction: row; /* چیدمان افقی */
        position: fixed;
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10005;
        direction: rtl;
        filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
        align-items: center;
        justify-content: center;
    }

    /* حذف کردن بلاک بودن div های میانی برای کنار هم قرار گرفتن دکمه‌ها */
    #js-btn-placeholder, .mobile-view-toggle {
        display: contents; 
    }

    /* ۵. استایل دکمه سمت راست (نقشه) */
    #toggle-map-view {
        background-color: #5143d9 !important;
        border-radius: 50px 0px 0px 50px !important; /* گرد سمت راست */
        border: none !important;
        
        padding: 12px 18px;
        color: white;
        font-weight: bold;
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 6px;
        height: 48px;
        white-space: nowrap;
        cursor: pointer;
    }

    /* ۶. استایل دکمه سمت چپ (بیشتر) */
    #load-more-btn {
        background-color: #28a745 !important;
        border-radius: 0px 50px 50px 0px !important; /* گرد سمت چپ */
        border: none !important;
        border-left: 1px solid white !important;
        padding: 12px 18px;
        color: white;
        font-weight: bold;
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 6px;
        height: 48px;
        white-space: nowrap;
        cursor: pointer;
        position: static !important; /* لغو پوزیشن فیکس دسکتاپ */
        transform: none !important;
        margin: 0 !important;
    }

    .back-btn {
        display: none !important;
    }
}