.searchwp-live-search-results {
    background: #fff;
    border-radius: 25px;
    -webkit-box-shadow: 0 0 2px 0 rgba(30,30,30,.4);
    box-shadow: 0 0 2px 0 rgba(30,30,30,.4);
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    max-height: 300px;
    min-height: 175px;
    min-width: 315px;
    width: 315px;
    overflow: hidden;
}

.searchwp-live-search-results-container {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 25px;
}

.searchwp-live-search-result {
    border-bottom: 1px solid rgba(30,30,30,.1);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* افکت hover برای هر نتیجه - فقط رنگ و سایه */
.searchwp-live-search-result:hover {
    background-color: #f8f9fa;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.searchwp-live-search-result:last-child {
    border-bottom: none;
}

.searchwp-live-search-result--img {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    background-color: #f5f5f5;
    position: relative;
}

/* ایجاد placeholder سفید برای عکس‌های نامعتبر */
.searchwp-live-search-result--img:has(img[src=""]),
.searchwp-live-search-result--img:has(img[src="#"]),
.searchwp-live-search-result--img:has(img:not([src*="."])) {
    background-color: #f5f5f5;
}

/* نمایش آیکون placeholder در وسط */
.searchwp-live-search-result--img:has(img[src=""])::before,
.searchwp-live-search-result--img:has(img[src="#"])::before,
.searchwp-live-search-result--img:has(img:not([src*="."]))::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background-color: #ddd;
    border-radius: 50%;
    opacity: 0.5;
}

.searchwp-live-search-result--img,
.searchwp-live-search-results-container.swp-ls--img-sm .searchwp-live-search-result--img {
    -ms-flex-preferred-size: 70px;
    flex-basis: 70px;
    min-width: 70px;
    max-width: 70px;
    height: 50px;
}

.searchwp-live-search-results-container.swp-ls--img-m .searchwp-live-search-result--img {
    -ms-flex-preferred-size: 110px;
    flex-basis: 110px;
    min-width: 110px;
    max-width: 110px;
    height: 110px;
}

.searchwp-live-search-results-container.swp-ls--img-l .searchwp-live-search-result--img {
    -ms-flex-preferred-size: 150px;
    flex-basis: 150px;
    min-width: 150px;
    max-width: 150px;
    height: 150px;
}

.searchwp-live-search-result--img img {
    display: block;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    -o-object-position: center;
    object-position: center;
    width: 100%;
    background-color: #f5f5f5;
}

/* مخفی کردن عکس‌های نامعتبر اما نگه داشتن container */
.searchwp-live-search-result--img img[src=""],
.searchwp-live-search-result--img img[src="#"],
.searchwp-live-search-result--img img:not([src*="."]) {
    opacity: 0;
    visibility: hidden;
}

/* نمایش placeholder برای عکس‌های نامعتبر */
.searchwp-live-search-result--img:has(img[src=""]) img,
.searchwp-live-search-result--img:has(img[src="#"]) img,
.searchwp-live-search-result--img:has(img:not([src*="."])) img {
    display: none;
}

.searchwp-live-search-result--info {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 calc(100% - 80px);
    flex: 1 1 calc(100% - 80px);
    overflow: visible; /* تغییر از hidden به visible */
    text-overflow: clip; /* تغییر از ellipsis به clip */
    max-width: calc(100% - 80px);
    white-space: normal; /* اجازه نمایش چند خط */
}

.searchwp-live-search-result--title {
    font-size: 0.82em;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 3px;
    color: #333;
    line-height: 1.4; /* افزایش line-height */
    width: 100%;
    overflow: visible; /* تغییر از hidden به visible */
    text-overflow: clip; /* تغییر از ellipsis به clip */
    white-space: normal; /* تغییر از nowrap به normal */
    word-wrap: break-word; /* شکستن کلمات طولانی */
    display: block; /* نمایش کامل عنوان */
    font-weight: normal;
    max-height: none; /* حذف محدودیت ارتفاع */
}

.searchwp-live-search-result--desc {
    font-size: 0.72em;
    color: #666;
    line-height: 1.4; /* افزایش line-height */
    margin-bottom: 3px;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.searchwp-live-search-result--ecommerce {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    margin-left: auto;
    text-align: end;
    min-width: 60px;
    align-self: flex-start; /* align به بالا */
    margin-top: 0; /* حذف margin-top اضافی */
}

.searchwp-live-search-result--ecommerce * {
    font-size: 0.78em;
}

.searchwp-live-search-no-min-chars .spinner {
    opacity: .3;
}

.searchwp-live-search-result--focused {
    background: #f7f7f7;
}

.searchwp-live-search-instructions {
    clip: rect(1px,1px,1px,1px)!important;
    border: 0!important;
    clip-path: inset(50%)!important;
    height: 1px!important;
    overflow: hidden!important;
    padding: 0!important;
    position: absolute!important;
    white-space: nowrap!important;
    width: 1px!important;
}

/* استایل اسکرولبار زیبا */
.searchwp-live-search-results-container::-webkit-scrollbar {
    width: 8px;
}

.searchwp-live-search-results-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 25px;
    margin: 5px 0;
}

.searchwp-live-search-results-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 25px;
}

.searchwp-live-search-results-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

@-webkit-keyframes searchwp-spinner-line-fade-more {
    0%,to {
        opacity: 0;
    }
    1% {
        opacity: 1;
    }
}

@keyframes searchwp-spinner-line-fade-more {
    0%,to {
        opacity: 0;
    }
    1% {
        opacity: 1;
    }
}

@-webkit-keyframes searchwp-spinner-line-fade-quick {
    0%,39%,to {
        opacity: .25;
    }
    40% {
        opacity: 1;
    }
}

@keyframes searchwp-spinner-line-fade-quick {
    0%,39%,to {
        opacity: .25;
    }
    40% {
        opacity: 1;
    }
}

@-webkit-keyframes searchwp-spinner-line-fade-default {
    0%,to {
        opacity: .22;
    }
    1% {
        opacity: 1;
    }
}

@keyframes searchwp-spinner-line-fade-default {
    0%,to {
        opacity: .22;
    }
    1% {
        opacity: 1;
    }
}