.whb-general-header-inner .advanced-search-wrapper {
  position: relative;
  direction: rtl;
  font-family: "IRANSans", Arial, Helvetica, sans-serif;
  width: 100%;
}

.whb-general-header-inner .asw-search-input {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 0 12px;
  height: 44px;
  position: relative;
}

.whb-general-header-inner .asw-search-field {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0 8px 0 25px !important;
  height: 100%;
  outline: none;
  font-size: 14px;
  font-family: "IRANSans", Arial, Helvetica, sans-serif;
  padding-left: 40px;
  padding-right: 40px;
  border: none !important;
  box-shadow: none !important;
}

.whb-general-header-inner .asw-search-button {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: #666 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    left: 12px;
    padding: 0 !important;
}

.whb-general-header-inner .asw-search-button svg {
  width: 24px;
  height: 24px;
  fill: #8c8c8c;
}

.whb-general-header-inner .asw-clear-input {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: #666 !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    left: 50px !important;
    padding: 0 !important;
}

.whb-general-header-inner .asw-clear-input svg {
  width: 24px;
  height: 24px;
  fill: #404040;
}

.whb-general-header-inner .asw-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-top: 8px;
  padding: 16px;
  z-index: 1000;
  display: none;
}

.whb-general-header-inner .asw-search-input:focus-within + .asw-dropdown,
.whb-general-header-inner .asw-dropdown:hover {
  display: block;
}

.whb-general-header-inner .asw-banner {
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}

.whb-general-header-inner .asw-banner img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.whb-general-header-inner .asw-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 600;
  color: #333;
  font-family: "IRANSans", Arial, Helvetica, sans-serif;
}

.whb-general-header-inner .asw-section-header span {
  display: flex;
  align-items: center;
  font-family: "IRANSans", Arial, Helvetica, sans-serif;
}

.whb-general-header-inner .asw-section-header svg {
  margin-left: 8px;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.whb-general-header-inner .asw-clear-all {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: #888 !important;
    font-size: 12px !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

.whb-general-header-inner .asw-clear-all:hover {
  background: #f5f5f5;
}

.whb-general-header-inner .asw-recent-searches,
.whb-general-header-inner .asw-popular-searches {
  margin-bottom: 16px;
}

.whb-general-header-inner .asw-popular-searches {
  border-top: 1px solid #e0e0e0;
  padding-top: 16px;
}

.whb-general-header-inner .swiper {
  width: 100%;
  height: auto;
  overflow: hidden;
}

.whb-general-header-inner .asw-searches-list {
  display: flex;
  width: 100%;
}

.whb-general-header-inner .asw-search-term {
  display: inline-flex;
  align-items: center;
  background: #f5f5f5;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: "IRANSans", Arial, Helvetica, sans-serif;
  margin: 0 4px;
  height: 36px;
}

.whb-general-header-inner .asw-search-term:hover {
  background: #e0e0e0;
}

.whb-general-header-inner .asw-search-term svg {
  margin-right: 4px;
  width: 20px;
  height: 20px;
  fill: #404040;
}

.whb-general-header-inner .asw-no-results {
  color: #888;
  font-size: 14px;
  padding: 8px 0;
  font-family: "IRANSans", Arial, Helvetica, sans-serif;
  text-align: center;
  width: 100%;
}

.whb-general-header-inner .swiper-slide {
  width: auto !important;
  height: auto !important;
  margin: 0 4px !important;
}

.whb-general-header-inner .swiper-wrapper {
  padding: 5px;
  display: flex;
  flex-wrap: nowrap;
}

/* استایل هدر نتایج جستجو - اصلاح شده */
.whb-general-header-inner .asw-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.whb-general-header-inner .asw-results-header > div{
    display: flex;
}

.whb-general-header-inner .asw-results-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    order: 2; /* متن در سمت راست */
}

.whb-general-header-inner .asw-show-all-btn {
    background: #24ab9a !important;
    color: white !important;
    border: none !important;
    padding: 10px 10px !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    min-height: fit-content !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: 0 2px 8px rgba(36, 171, 154, 0.3) !important;
    order: 1; /* دکمه در سمت چپ */
}

.whb-general-header-inner .asw-show-all-btn:hover {
    background: #1d8a7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(36, 171, 154, 0.4);
}

.whb-general-header-inner .asw-show-all-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    margin-right: 8px; /* تغییر به سمت چپ */
    transform: rotate(180deg);
}

/* استایل محصولات عادی با تصویر در سمت راست */
.whb-general-header-inner .asw-product-item {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.whb-general-header-inner .asw-product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #24ab9a;
}

.whb-general-header-inner .asw-product-content {
    display: flex;
    height: 90px;
    flex-direction: row-reverse; /* تصویر در سمت راست */
}

.whb-general-header-inner .asw-product-image {
    width: 80px;
    height: auto;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    border-right: 1px solid #e0e0e0; /* تغییر border به راست */
}

.whb-general-header-inner .asw-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.whb-general-header-inner .asw-product-info {
    padding: 7px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.whb-general-header-inner .asw-product-info h4 {
    margin: 0 0 8px 0;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.4;
    color: #333;
    margin-bottom: 0px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.whb-general-header-inner .asw-product-price {
    color: #24ab9a;
    font-weight: 500;
    font-size: 11px;
    margin-bottom: 0px;
}

.whb-general-header-inner .asw-product-stock {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
}

.whb-general-header-inner .asw-product-stock.in-stock {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.whb-general-header-inner .asw-product-stock.out-of-stock {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* استایل مخصوص محصولات پروموت - رنگ نارنجی متمایز */
.whb-general-header-inner .asw-product-item.promoted {
    border: 2px solid #FF6B35;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    position: relative;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.whb-general-header-inner .asw-product-item.promoted:hover {
    border-color: #E55A2B;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    transform: translateY(-4px) scale(1.02);
}

.whb-general-header-inner .asw-product-item.promoted::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0; /* تغییر به سمت چپ */
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 40px 40px; /* تغییر جهت مثلث */
    border-color: #FF6B35 transparent #00000000 #FF6B35;
    z-index: 2;
}

.whb-general-header-inner .asw-product-item.promoted::after {
    content: "⭐";
    position: absolute;
    top: 2px;
    left: 4px; /* تغییر به سمت چپ */
    font-size: 14px;
    z-index: 3;
    color: white;
}

.whb-general-header-inner .asw-product-promoted-badge {
    position: absolute;
    bottom: -1px;
    left: 0px; /* تغییر به سمت راست */
    background: linear-gradient(45deg, #FF6B35, #FF5252);
    color: white;
    padding: 1px 8px;
    border-radius: 0 8px;
    font-size: 10px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* استایل محصول پروموت شده (بخش پایینی) */
.whb-general-header-inner .asw-promoted-product {
    border-top: 1px solid #e0e0e0;
    padding-top: 16px;
    margin-top: 16px;
}

.whb-general-header-inner .asw-promoted-item {
    position: relative;
    border: 2px solid #FF6B35;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.2);
}

.whb-general-header-inner .asw-promoted-item:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

.whb-general-header-inner .asw-promoted-badge {
    position: absolute;
    top: 12px;
    right: 12px; /* تغییر به سمت راست */
    background: linear-gradient(45deg, #FF6B35, #FF5252);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.whb-general-header-inner .asw-promoted-content {
    display: flex;
    height: 140px;
    flex-direction: row-reverse; /* تصویر در سمت راست */
}

.whb-general-header-inner .asw-promoted-image {
    width: 140px;
    height: 140px;
    background: #FFE0B2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-right: 2px solid #FF6B35; /* تغییر border به راست */
}

.whb-general-header-inner .asw-promoted-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.whb-general-header-inner .asw-promoted-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.whb-general-header-inner .asw-promoted-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.whb-general-header-inner .asw-promoted-price {
    color: #E53935;
    font-weight: 800;
    font-size: 16px;
}

/* گرید محصولات 3 ستونه */
.whb-general-header-inner .asw-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

/* استایل جدید برای دسته بندی های پیشنهادی */
.whb-general-header-inner .asw-suggested-categories {
    margin-bottom: 10px;
}

.whb-general-header-inner .categories-swiper {
    overflow: hidden;
}

.whb-general-header-inner .asw-categories-list {
    display: flex;
    gap: 15px;
    padding: 10px 0;
}

.whb-general-header-inner .asw-category-item {
    flex: 0 0 auto;
    width: 100px;
    text-align: center;
}

.whb-general-header-inner .asw-category-link {
    display: block;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s;
}

.whb-general-header-inner .asw-category-link:hover {
    transform: translateY(-2px);
    color: #333;
}

.whb-general-header-inner .asw-category-image {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 8px;
    background: #f5f5f5;
    border: 3px solid #24ab9a;
}

.whb-general-header-inner .asw-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.whb-general-header-inner .asw-category-count {
    position: absolute;
    top: 1px;
    left: 1px;
    background: #24ab9a;
    color: white;
    border-radius: 7px;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px 0px 15px;
}

.whb-general-header-inner .asw-category-name {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 5px;
    height: 30px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.whb-general-header-inner .categories-swiper .swiper-slide {
    width: auto !important;
}

.whb-general-header-inner .asw-live-results {
    position: relative;
    min-height: 200px;
}

.whb-general-header-inner .asw-live-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.whb-general-header-inner .asw-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #24ab9a;
    border-radius: 50%;
    animation: asw-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes asw-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.whb-general-header-inner .asw-live-content {
    animation: asw-fadeIn 0.3s ease-in;
}

@keyframes asw-fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.whb-general-header-inner .asw-no-results-found {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.whb-general-header-inner .asw-no-results-found svg {
    fill: #ccc;
}

/* موبایل پاپ آپ */
.whb-general-header-inner .asw-mobile-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 9999;
    flex-direction: column;
    transform: translateY(150%);
    transition: transform 0.3s ease-out;
    display: flex;
    overflow: hidden;
}

.whb-general-header-inner .asw-mobile-popup.active {
    transform: translateY(0);
}

.whb-general-header-inner .asw-mobile-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    height: auto;
    gap: 12px;
    flex-shrink: 0;
}

.whb-general-header-inner .asw-mobile-header .asw-search-input {
    flex: 1;
    margin: 0;
}

.whb-general-header-inner .asw-close-popup {
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    order: -1;
    padding: 0;
}

.whb-general-header-inner .asw-close-popup svg {
    width: 24px;
    height: 24px;
    fill: #404040;
}

.whb-general-header-inner .asw-mobile-content {
    flex: 1;
    overflow-y: auto;
    overflow-x:hidden;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

.whb-general-header-inner .asw-mobile-content .asw-dropdown {
    position: static;
    box-shadow: none;
    margin-top: 0;
    padding: 0;
    display: block;
}

.whb-general-header-inner .asw-mobile-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.whb-general-header-inner .asw-mobile-search-icon svg {
    width: 24px;
    height: 24px;
    fill: #24ab9a;
}

/* رسپانسیو */
@media (max-width: 1024px) {
    .whb-general-header-inner .asw-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .whb-general-header-inner .desktop-version {
        display: none;
    }
    
    .whb-general-header-inner .asw-dropdown {
        display: block !important;
        position: static;
        box-shadow: none;
        margin-top: 0;
    }
    
    .whb-general-header-inner .asw-results-header {
        gap: 12px;
        align-items: stretch;
    }
    
    .whb-general-header-inner .asw-show-all-btn {
        align-self: center;
        order: 2; /* در موبایل دکمه پایین تر */
    }
    
    .whb-general-header-inner .asw-results-title {
        order: 1; /* در موبایل متن بالاتر */
    }
    
    .whb-general-header-inner .asw-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
    }
    
    .whb-general-header-inner .asw-product-content {
        height: 90px;
        flex-direction: row-reverse; /* در موبایل تصویر بالا */
    }
    
    .whb-general-header-inner .asw-product-image {
        width: 80px;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .whb-general-header-inner .asw-promoted-content {
        flex-direction: column; /* در موبایل تصویر بالا */
        height: auto;
    }
    
    .whb-general-header-inner .asw-promoted-image {
        width: 100%;
        height: 160px;
        border-right: none;
        border-bottom: 2px solid #FF6B35;
    }
    
    .whb-general-header-inner .asw-mobile-content .swiper {
        overflow: visible;
    }
    
    .whb-general-header-inner .asw-mobile-content .swiper-wrapper {
        -webkit-overflow-scrolling: touch;
    }
    
    .whb-general-header-inner .asw-mobile-content .asw-search-term {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .whb-general-header-inner .asw-mobile-content .asw-section-header {
        font-size: 16px;
    }
    
    .whb-general-header-inner .asw-category-item {
        width: 90px;
    }
    
    .whb-general-header-inner .asw-category-image {
        width: 60px;
        height: 60px;
    }
    .whb-general-header-inner form.asw-search-form{
        width: 100%;
    }
    .whb-general-header-inner .asw-section-header span{
        font-size: 14px;
    }
}

@media (min-width: 769px) {
    .whb-general-header-inner .asw-mobile-search-icon {
        display: none;
    }
    
    .whb-general-header-inner .asw-mobile-popup {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .whb-general-header-inner .asw-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .whb-general-header-inner .asw-product-image {
        height: auto;
        width: 80px;
    }
    
    .whb-general-header-inner .asw-promoted-image {
        height: 140px;
    }
    
    .whb-general-header-inner .asw-product-info h4 {
        font-size: 13px;
    }
    
    .whb-general-header-inner .asw-promoted-info h3 {
        font-size: 14px;
    }
    .whb-general-header-inner .asw-mobile-content {
        padding: 16px 7px;
    }
}

.whb-general-header-inner .asw-search-term {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.whb-general-header-inner body.asw-mobile-popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* استایل برای آیکون های بخش ها */
.whb-general-header-inner .asw-section-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-left: 8px;
}

.whb-general-header-inner .asw-clear-all img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.whb-general-header-inner .asw-results-header .asw-section-icon {
    width: 24px;
    height: 24px;
    margin-left: 6px;
}

.whb-general-header-inner ul.asw-suggestions-list li {
    list-style: none;
}

/* اسپینر بهبود یافته */
.whb-general-header-inner .asw-live-loading.searching-active {
    animation: pulse-opacity 1.5s ease-in-out infinite;
}

@keyframes pulse-opacity {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.whb-general-header-inner .asw-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #24ab9a;
    border-radius: 50%;
    animation: asw-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes asw-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* پیام حداقل کاراکتر */
.whb-general-header-inner .asw-min-chars-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.whb-general-header-inner .asw-min-chars-message svg {
    width: 32px;
    height: 32px;
    fill: #ccc;
    margin-bottom: 10px;
}

/* استایل ساده برای سوییپرها   */
.whb-general-header-inner .categories-swiper,
.whb-general-header-inner .recent-searches-swiper,
.whb-general-header-inner .popular-searches-swiper {
    overflow: hidden !important;
    padding: 5px 0 !important;
}

.whb-general-header-inner .categories-swiper .swiper-wrapper,
.whb-general-header-inner .recent-searches-swiper .swiper-wrapper,
.whb-general-header-inner .popular-searches-swiper .swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    padding: 5px 0 !important;
}

.whb-general-header-inner .categories-swiper .swiper-slide,
.whb-general-header-inner .recent-searches-swiper .swiper-slide,
.whb-general-header-inner .popular-searches-swiper .swiper-slide {
    width: auto !important;
    height: auto !important;
}

/* بهبود عملکرد سوییپرها */
.whb-general-header-inner .categories-swiper .swiper-wrapper,
.whb-general-header-inner .recent-searches-swiper .swiper-wrapper,
.whb-general-header-inner .popular-searches-swiper .swiper-wrapper {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* جلوگیری از flash of unstyled content */
.whb-general-header-inner .swiper {
    visibility: hidden;
}

.whb-general-header-inner .swiper-initialized {
    visibility: visible;
}

/* فعال کردن اسکرول لمسی برای موبایل */
@media (max-width: 768px) {
    .whb-general-header-inner .categories-swiper,
    .whb-general-header-inner .recent-searches-swiper,
    .whb-general-header-inner .popular-searches-swiper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}




.whb-general-header-inner .swiper-horizontal {
    overflow: -moz-scrollbars-none;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.whb-general-header-inner .swiper-horizontal::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none;
}