    /* استایل‌های autocomplete پیشرفته */

    /* کانتینر اصلی autocomplete */
    .autocomplete-container {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        background: white;
        border: 2px solid #0088ff;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        max-height: 500px;
        overflow-y: auto;
        direction: rtl;
        display: none;
        width: 100%;
        box-sizing: border-box;
    }


    /* نمایش کانتینر */
    .autocomplete-container.show {
        display: block !important;
    }


    /* بخش محصولات */
    .autocomplete-products {
        padding: 15px 20px;
        border-bottom: 1px solid #e0e0e0;
        background: #ffffff;
        min-height: 120px;
        position: relative;
        overflow: hidden;
    }


    .products-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 15px;
    }

    .products-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        color: #000000;
        display: flex;
        align-items: center;
        gap: 8px;
    }


    .scroll-hint {
        color: #6b7280;
        font-size: 12px;
        opacity: 0.7;
    }



    /* کانتینر کارت‌های افقی */
    .products-horizontal-scroll {
        display: flex;
        gap: 15px;
        overflow-x: auto;
        padding: 5px 0;
        scroll-behavior: smooth;
        min-height: 140px;
        align-items: flex-start;
        flex: 1;
        -webkit-overflow-scrolling: touch;
    }

    .products-horizontal-scroll::-webkit-scrollbar {
        height: 4px;
    }

    .products-horizontal-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }

    .products-horizontal-scroll::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        border-radius: 2px;
    }

    .products-horizontal-scroll::-webkit-scrollbar-thumb:hover {
        background: #1d4ed8;
    }

    /* کارت پیشنهادی محصول */
    .product-suggestion-card {
        min-width: 240px;
        max-width: 240px;
        background: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 12px;
        text-decoration: none;
        color: inherit;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        cursor: pointer;
        margin-left: 10px;
        flex-shrink: 0;
        min-height: 80px;
    }

    .product-suggestion-card:first-child {
        margin-left: 0;
    }

    .product-suggestion-card:hover {
        border-color: #3b82f6;
        text-decoration: none;
        color: inherit;
        background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 100%);
    }

    .product-suggestion-card:hover::before {
        animation: shimmer 1s infinite;
    }

    /* تصویر پیشنهادی محصول */
    .product-suggestion-image {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 8px;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: #6c757d;
        position: relative;
        overflow: hidden;
        border: none;
        flex-shrink: 0;
    }

    .product-suggestion-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        border-radius: 6px;
        display: block;
        background: transparent;
        border: none;
    }


    /* اگر تصویر لود نشود، آیکون نمایش داده شود */
    .product-suggestion-image:empty {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        color: white;
    }

    .product-suggestion-image:empty::before {
        content: '';
        font-size: 20px;
    }

    /* Fallback برای تصاویر لود نشده */
    .product-suggestion-image img[src=""],
    .product-suggestion-image img:not([src]) {
        display: none;
    }

    .product-suggestion-image:has(img[src=""]) {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        color: white;
    }

    .product-suggestion-image:has(img[src=""])::before {
        content: '';
        font-size: 20px;
    }

    .product-suggestion-image::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
        transform: translateX(-100%);
    }

    .product-suggestion-card:hover .product-suggestion-image::before {
        transform: translateX(100%);
    }

    .product-suggestion-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 12px;
    }


    /* محتوای کارت محصول */
    .product-suggestion-content {
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex: 1;
        justify-content: center;
        align-items: flex-start;
    }

    /* نام پیشنهادی محصول */
    .product-suggestion-name {
        font-size: 15px;
        font-weight: 600;
        color: #333;
        line-height: 1.3;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: right;
        padding: 1px 0;
    }

    /* قیمت محصول - حذف شده */
    .product-suggestion-price {
        display: none;
    }

    /* بخش دسته‌بندی‌ها */
    .autocomplete-categories {
        padding: 20px;
        border-bottom: 1px solid #e0e0e0;
        background: #ffffff;
    }

    .autocomplete-categories h3 {
        margin: 0 0 15px 0;
        font-size: 16px;
        font-weight: 600;
        color: #000000;
        display: flex;
        align-items: center;
        gap: 8px;
    }


    /* کانتینر دسته‌بندی‌های افقی */
    .categories-horizontal-scroll {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding: 5px 0;
        scroll-behavior: smooth;
    }

    .categories-horizontal-scroll::-webkit-scrollbar {
        height: 4px;
    }

    .categories-horizontal-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }

    .categories-horizontal-scroll::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        border-radius: 2px;
    }

    /* کارت دسته‌بندی */
    .category-card {
        background: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 8px 12px;
        text-decoration: none;
        color: #000000;
        display: inline-block;
        cursor: pointer;
        margin-left: 10px;
        flex-shrink: 0;
        width: auto;
        min-width: auto;
        max-width: none;
    }

    .category-card:hover {
        border-color: #3b82f6;
    }


    /* آیکون دسته‌بندی - حذف شده */
    .category-card-icon {
        display: none;
    }

    /* نام دسته‌بندی */
    .category-card-name {
        font-size: 13px;
        font-weight: 600;
        color: #333;
        line-height: 1.3;
        margin: 0;
        text-align: center;
        white-space: nowrap;
    }

    /* تعداد محصولات - حذف شده */
    .category-card-count {
        display: none;
    }

    /* بخش جستجوهای پرطرفدار */
    .autocomplete-popular {
        padding: 20px;
        background: #ffffff;
        border-bottom: 1px solid #e0e0e0;
    }

    .autocomplete-popular h3 {
        margin: 0 0 15px 0;
        font-size: 16px;
        font-weight: 600;
        color: #000000;
        display: flex;
        align-items: center;
        gap: 8px;
    }


    /* کانتینر جستجوهای پرطرفدار */
    .popular-searches {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* دکمه جستجوی پرطرفدار */
    .popular-search-btn {
        background: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 8px 12px;
        font-size: 13px;
        color: #000000;
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
        display: inline-block;
        text-align: center;
        margin-left: 10px;
        flex-shrink: 0;
    }

    .popular-search-btn:hover {
        border-color: #3b82f6;
        text-decoration: none;
        color: #000000;
    }

    /* بخش جستجوهای اخیر */
    .autocomplete-recent {
        padding: 20px;
        border-top: 1px solid #e0e0e0;
        background: #ffffff;
    }

    .autocomplete-recent h3 {
        margin: 0 0 15px 0;
        font-size: 16px;
        font-weight: 600;
        color: #000000;
        display: flex;
        align-items: center;
        gap: 8px;
    }


    /* لیست جستجوهای اخیر */
    .recent-searches-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .recent-searches-list li {
        margin-bottom: 8px;
    }

    .recent-search-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        background: #f8f9fa;
        border-radius: 8px;
        text-decoration: none;
        color: #495057;
        cursor: pointer;
        width: 100%;
    }

    .recent-search-item:hover {
        background: #e9ecef;
        text-decoration: none;
        color: #495057;
    }

    .recent-search-text {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
    }

    .recent-search-remove {
        background: none;
        border: none;
        color: #6c757d;
        cursor: pointer;
        padding: 4px;
        border-radius: 4px;
        flex-shrink: 0;
        z-index: 10;
        position: relative;
    }

    .recent-search-remove:hover {
        background: none;
        color: #dc3545;
    }


    /* پیام عدم وجود نتیجه */
    .no-results {
        padding: 40px 20px;
        text-align: center;
        color: #6c757d;
    }

    .no-results i {
        font-size: 48px;
        margin-bottom: 16px;
        opacity: 0.5;
    }

    .no-results h4 {
        margin: 0 0 8px 0;
        font-size: 18px;
        color: #495057;
    }

    .no-results p {
        margin: 0;
        font-size: 14px;
    }

    /* انیمیشن loading */
    .autocomplete-loading {
        padding: 40px 20px;
        text-align: center;
        background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    }

    .loading-dots {
        display: inline-flex;
        gap: 4px;
    }

    .loading-dot {
        width: 10px;
        height: 10px;
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        border-radius: 50%;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }

    .loading-dot:nth-child(1) {}

    .loading-dot:nth-child(2) {}

    .loading-dot:nth-child(3) {}


    /* هایلایت کلمات جستجو */
    .search-highlight {
        background: none;
        color: #3b82f6;
        padding: 0;
        border-radius: 0;
        font-weight: 600;
        text-shadow: none;
    }


    /* ریسپانسیو */
    @media (max-width: 768px) {
        .autocomplete-container {
            max-height: 400px;
            border-radius: 12px;
            top: calc(100% + 6px);
        }

        .product-suggestion-card {
            min-width: 140px;
            max-width: 140px;
            padding: 10px;
            border-radius: 10px;
            flex-direction: column;
            align-items: center;
            text-align: center;
            height: 160px;
            min-height: 160px;
        }

        .product-suggestion-image {
            width: 80px !important;
            height: 80px !important;
            border-radius: 8px;
            border: none;
            background: transparent;
            margin-bottom: 8px;
        }

        .product-suggestion-image img {
            border-radius: 6px;
            border: none;
            background: transparent;
            object-fit: contain;
            object-position: center;
        }

        .product-suggestion-name {
            font-size: 11px;
            text-align: center;
            line-height: 1.3;
            margin: 0;
        }

        .category-card {
            padding: 10px 16px !important;
            border-radius: 10px;
            min-width: 120px !important;
            max-width: 120px !important;
        }

        .category-card-icon {
            display: none;
        }

        .category-card-name {
            font-size: 13px !important;
            font-weight: 600 !important;
        }

        .autocomplete-products,
        .autocomplete-categories,
        .autocomplete-popular,
        .autocomplete-recent {
            padding: 16px;
        }

        .popular-searches {
            gap: 8px;
        }

        .popular-search-btn {
            padding: 6px 10px;
            font-size: 12px;
            border-radius: 8px;
        }

    }

    @media (max-width: 480px) {
        .autocomplete-container {
            border-radius: 12px;
            top: calc(100% + 4px);
        }

        .product-suggestion-card {
            min-width: 140px;
            max-width: 140px;
            padding: 4px;
            border-radius: 8px;
        }

        .product-suggestion-image {
            width: 35px;
            height: 35px;
            border-radius: 6px;
            border: none;
            background: transparent;
        }

        .product-suggestion-image img {
            border-radius: 4px;
            border: none;
            background: transparent;
            object-fit: contain;
            object-position: center;
        }

        .product-suggestion-name {
            font-size: 10px;
        }

        .category-card {
            padding: 4px 8px;
            border-radius: 8px;
        }

        .category-card-icon {
            display: none;
        }

        .category-card-name {
            font-size: 10px;
        }

        .category-card-count {
            display: none;
        }

        .popular-search-btn {
            padding: 10px 16px !important;
            font-size: 13px !important;
            border-radius: 8px;
            min-width: auto !important;
            max-width: none !important;
            width: auto !important;
        }


        .autocomplete-products,
        .autocomplete-categories,
        .autocomplete-popular,
        .autocomplete-recent {
            padding: 12px;
        }
    }

    /* اضافی برای موبایل - اولویت بالا */
    @media (max-width: 768px) {
        .product-suggestion-image {
            width: 70px !important;
            height: 70px !important;
            min-width: 70px !important;
            min-height: 70px !important;
            max-width: 70px !important;
            max-height: 70px !important;
        }

        .category-card {
            padding: 10px 16px !important;
            min-width: auto !important;
            max-width: none !important;
            width: auto !important;
            font-size: 13px !important;
            white-space: nowrap !important;
        }

        .category-card-name {
            font-size: 13px !important;
            font-weight: 600 !important;
        }

        /* حذف hover effects در موبایل */
        .product-suggestion-card:hover {
            border-color: #e0e0e0 !important;
            transform: none !important;
            box-shadow: none !important;
        }

        .category-card:hover {
            border-color: #e0e0e0 !important;
            transform: none !important;
            box-shadow: none !important;
        }

        .popular-search-btn:hover {
            border-color: #e0e0e0 !important;
            transform: none !important;
            box-shadow: none !important;
        }

        /* تنظیم عرض کارت‌های دسته‌بندی بر اساس محتوا */
        .category-card {
            min-width: auto !important;
            max-width: none !important;
            width: auto !important;
            white-space: nowrap !important;
        }
    }