/* Reset box-sizing برای تمام عناصر افزونه */
.ecsb-search-form-wrapper,
.ecsb-search-form-wrapper *,
.ecsb-search-form,
.ecsb-search-form *,
.ecsb-search-results,
.ecsb-search-results *,
.ecsb-popup-overlay,
.ecsb-popup-overlay *,
.ecsb-popup-content,
.ecsb-popup-content * {
  box-sizing: border-box;
}

/* رفع مشکل اسکرول افقی در کانتینرهای Elementor */
.elementor-container,
.elementor-container .elementor-row,
.elementor-container .elementor-column,
.elementor-widget-custom_search_box,
.elementor-widget-custom_search_box .elementor-widget-container {
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

/* رفع مشکل اسکرول افقی در تمام کانتینرهای Elementor که شامل ویجت سرچ هستند */
.elementor-section,
.elementor-section .elementor-container,
.elementor-column,
.elementor-column-wrap,
.elementor-widget-wrap {
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

/* اطمینان از اینکه body و html اسکرول افقی ندارند */
body.elementor-page,
body.elementor-page .elementor,
html {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* اطمینان از responsive بودن wrapper در داخل Elementor */
.elementor-widget-custom_search_box .ecsb-search-form-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* اطمینان از اینکه آیکون در سمت چپ باشد */
.elementor-widget-custom_search_box .ecsb-search-icon,
.ecsb-search-form .ecsb-search-icon {
  position: absolute !important;
  left: 15px !important;
  right: auto !important;
  top: 50% !important;
  transform: translateY(calc(-50% + 3px)) !important;
}

.ecsb-search-form-wrapper {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: hidden;
  position: relative;
}

.ecsb-search-form-wrapper[style*="text-align: left"] .ecsb-search-form {
  margin-left: 0;
  margin-right: auto;
}

.ecsb-search-form-wrapper[style*="text-align: center"] .ecsb-search-form {
  margin-left: auto;
  margin-right: auto;
}

.ecsb-search-form-wrapper[style*="text-align: right"] .ecsb-search-form {
  margin-left: auto;
  margin-right: 0;
}

.ecsb-search-form {
  display: flex;
  max-width: 600px;
  width: 100%;
  margin: 20px auto;
  position: relative;
  padding: 0;
  border-radius: 12px;
  z-index: 1;
  border: 2px solid #ff9800 !important;
  box-sizing: border-box;
  overflow: hidden;
}

/* اطمینان از responsive بودن form در تمام اندازه‌ها */
@media (max-width: 1200px) {
  .ecsb-search-form {
    max-width: 90% !important;
  }
}

@media (max-width: 992px) {
  .ecsb-search-form {
    max-width: 95% !important;
  }
}

/* جلوگیری از تداخل با مگا منو */
.ecsb-search-form,
.ecsb-search-results {
  z-index: 1 !important;
}

/* اطمینان از اینکه مگا منو بالاتر باشد */
.mega-menu,
.mega-menu *,
.dropdown-menu,
.nav-menu,
.menu-item-has-children {
  z-index: 9999 !important;
}

/* جلوگیری از تداخل با انواع مختلف منو */
.navigation,
.navbar,
.nav-item,
.dropdown,
.sub-menu,
.menu-item,
.menu-item-has-children,
.elementor-nav-menu,
.elementor-nav-menu--dropdown,
.elementor-nav-menu__container,
.elementor-nav-menu__align-center,
.elementor-nav-menu__align-right,
.elementor-nav-menu__align-left {
  z-index: 9999 !important;
  position: relative;
}

/* جلوگیری از تداخل با منوهای Elementor */
.elementor-nav-menu .elementor-nav-menu__container {
  z-index: 99999 !important;
}

/* اطمینان از اینکه جستجو زیر منوها باشد */
.ecsb-search-form {
  position: relative;
  z-index: 1 !important;
}

.ecsb-search-results {
  z-index: 2 !important;
}

/* بهبود منوهای Elementor */
.elementor-nav-menu--dropdown {
  z-index: 99999 !important;
  position: absolute !important;
}

.elementor-nav-menu__container {
  z-index: 99999 !important;
  position: relative !important;
}

/* جلوگیری از تداخل با منوهای مگا */
.mega-menu,
.mega-menu *,
.mega-menu-container,
.mega-menu-wrapper {
  z-index: 99999 !important;
  position: relative !important;
}

/* اطمینان از اینکه منوهای dropdown بالاتر باشند */
.dropdown-menu,
.sub-menu,
.menu-item-has-children > .sub-menu {
  z-index: 99999 !important;
  position: absolute !important;
}

/* جلوگیری از تداخل با منوهای خاص */
.main-navigation,
.primary-menu,
.secondary-menu,
.header-menu,
.footer-menu,
.top-menu,
.bottom-menu {
  z-index: 9999 !important;
  position: relative !important;
}

/* بهبود منوهای responsive */
@media (max-width: 768px) {
  .ecsb-search-form {
    z-index: 1 !important;
  }
  
  .ecsb-search-results {
    z-index: 1000 !important;
  }
  
  /* اطمینان از اینکه منوهای موبایل بالاتر باشند */
  .mobile-menu,
  .responsive-menu,
  .hamburger-menu {
    z-index: 99999 !important;
  }
}

.ecsb-search-form input[type="search"],
.ecsb-search-form .ecsb-search-input,
.ecsb-search-input {
  flex: 1;
  padding: 12px 20px 12px 45px !important;
  border: 2px solid #eef2f7 !important;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.5;
  color: #2c3e50;
  transition: all 0.3s ease !important;
  background: #f8fafc;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  box-sizing: border-box;
}

/* استایل focus برای فرم عادی (غیر popup) */
.ecsb-search-form input[type="search"]:focus,
.ecsb-search-form .ecsb-search-input:focus,
.ecsb-search-input:focus,
.elementor-widget-custom_search_box .ecsb-search-input:focus {
  outline: none !important;
  border-color: #eb7a61 !important;
  border: 2px solid #eb7a61 !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(235, 122, 97, 0.1) !important;
}

/* استایل focus برای popup - فقط outline را تنظیم می‌کنیم، بقیه توسط Elementor */
.ecsb-popup-overlay .ecsb-search-input:focus,
.ecsb-popup-overlay .ecsb-search-form input[type="search"]:focus {
  outline: none;
  /* بقیه استایل‌ها (border-color, background, box-shadow) توسط Elementor کنترل می‌شوند */
}

.ecsb-search-form input[type="search"]::placeholder {
  color: #94a3b8;
}

.ecsb-search-form button {
  display: none;
}

.ecsb-search-icon {
  position: absolute !important;
  left: 15px !important;
  right: auto !important;
  top: 50%;
  transform: translateY(calc(-50% + 3px));
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ecsb-search-icon svg {
  display: block;
}

.ecsb-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-top: 5px;
  max-height: 900px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1001;
  display: none;
  border: 1px solid #eef2f7;
  padding: 10px;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.ecsb-result-section {
  padding: 20px;
  border-bottom: 1px solid #eef2f7;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.ecsb-result-section:last-child {
  border-bottom: none;
}

.ecsb-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 0 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.ecsb-section-title {
  font-size: 14px;
  font-weight: 400;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.ecsb-section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 16px;
  background: #eb7a61;
  border-radius: 2px;
}

.ecsb-section-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding-right: 5px;
  -webkit-overflow-scrolling: touch;
  /* allow full height; scrolling handled by main results container */
  max-height: none;
  overflow-y: visible;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ecsb-section-content::after {
  content: "";
  position: sticky;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  pointer-events: none;
  background: none;
  z-index: 2;
  display: none;
}

.ecsb-section-content::-webkit-scrollbar {
  width: 8px;
  background: #f1f5f9;
}

.ecsb-section-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}

.ecsb-section-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.ecsb-result-item {
  display: flex;
  gap: 15px;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #2c3e50;
  transition: all 0.3s ease;
  border: 1px solid #eef2f7;
  background-color: #fcfdfe;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.ecsb-result-item:active {
  background-color: #f0f4f8;
  transform: scale(0.98);
}

.ecsb-result-item:hover {
  background-color: #f0f4f8;
  border-color: #c9d6ea;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.ecsb-result-image {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f1f5f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ecsb-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ecsb-result-item:hover .ecsb-result-image img {
  transform: scale(1.05);
}

.ecsb-result-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.ecsb-result-title {
  font-weight: 400 !important;
  margin-bottom: 6px;
  color: #1e293b;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ecsb-result-excerpt {
  font-size: 0.9em;
  color: #64748b;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.ecsb-result-meta {
  font-size: 0.85em;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ecsb-result-price {
  font-weight: 600;
  color: #eb7a61;
  font-size: 0.9em;
}

.ecsb-result-description {
  color: #64748b;
  font-size: 0.85em;
  line-height: 1.4;
}

.ecsb-product-count {
  background: #f1f5f9;
  color: #475569;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 500;
}

.ecsb-no-results {
  padding: 30px 20px;
  color: #64748b;
  text-align: center;
  font-size: 15px;
  background: #f8fafc;
  border-radius: 8px;
  margin: 20px;
}

@media (max-width: 768px) {
  /* رفع مشکل اسکرول افقی در کانتینرهای Elementor در موبایل */
  .elementor-container,
  .elementor-container .elementor-row,
  .elementor-container .elementor-column,
  .elementor-widget-custom_search_box,
  .elementor-widget-custom_search_box .elementor-widget-container,
  .elementor-section,
  .elementor-section .elementor-container,
  .elementor-column,
  .elementor-column-wrap,
  .elementor-widget-wrap {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* اطمینان از responsive بودن در موبایل */
  body.elementor-page,
  body.elementor-page .elementor,
  html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .ecsb-search-form-wrapper {
    padding: 0 10px;
    margin: 0;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .ecsb-search-form {
    margin: 10px auto;
    max-width: 100% !important;
    width: 100% !important;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    box-sizing: border-box !important;
  }

  .ecsb-search-form input[type="search"] {
    font-size: 16px;
    padding: 10px 15px 10px 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ecsb-search-results {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px 12px 0 0;
    margin: 0;
    padding: 15px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .ecsb-section-content {
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    max-height: 200px;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #ff9800 #f1f5f9;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ecsb-section-content::-webkit-scrollbar {
    width: 8px;
    background: #f1f5f9;
  }

  .ecsb-section-content::-webkit-scrollbar-thumb {
    background: #ff9800;
    border-radius: 6px;
  }

  .ecsb-section-content::-webkit-scrollbar-thumb:hover {
    background: #fb8c00;
  }

  .ecsb-section-content::after {
    height: 24px;
  }

  .ecsb-result-item {
    padding: 10px;
  }

  .ecsb-result-image {
    width: 60px;
    height: 60px;
  }

  .ecsb-section-header {
    padding: 0 10px;
  }

  .ecsb-section-title {
    font-size: 13px;
  }

  .ecsb-result-title {
    font-size: 14px;
  }

  .ecsb-result-excerpt {
    font-size: 12px;
  }

  .ecsb-result-meta {
    font-size: 12px;
  }

  .ecsb-result-price {
    font-size: 13px;
    padding: 3px 6px;
  }

  .ecsb-see-more-btn {
    font-size: 12px;
    padding: 3px 10px;
  }
}

.ecsb-see-more-btn {
  font-size: 13px;
  color: #eb7a61;
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid #eb7a61;
  border-radius: 4px;
  transition: all 0.3s ease;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ecsb-see-more-btn:hover {
  background: #eb7a61;
  color: #fff;
}

.ecsb-see-more-btn:active {
  transform: scale(0.98);
}

/* Search Results Page Styles */
.ecsb-search-results-page {
    padding: 40px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.ecsb-search-header {
    margin-bottom: 30px;
    text-align: center;
}

.ecsb-search-title {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 20px;
}

.ecsb-search-title span {
    color: #eb7a61;
    font-weight: 600;
}

.ecsb-search-filters {
    margin-bottom: 30px;
}

.ecsb-filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ecsb-filter-buttons a {
    padding: 8px 20px;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #eef2f7;
}

.ecsb-filter-buttons a:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.ecsb-filter-buttons a.active {
    background: #eb7a61;
    color: #fff;
    border-color: #eb7a61;
}

.ecsb-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.ecsb-pagination {
    text-align: center;
    margin-top: 40px;
}

.ecsb-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #eef2f7;
}

.ecsb-pagination .page-numbers:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.ecsb-pagination .page-numbers.current {
    background: #eb7a61;
    color: #fff;
    border-color: #eb7a61;
}

@media (max-width: 768px) {
    .ecsb-search-results-page {
        padding: 20px 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .ecsb-search-title {
        font-size: 20px;
    }

    .ecsb-filter-buttons {
        gap: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .ecsb-filter-buttons a {
        padding: 6px 15px;
        font-size: 14px;
        box-sizing: border-box;
    }

    .ecsb-results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* بهبود برای صفحه‌های خیلی کوچک */
@media (max-width: 480px) {
  /* رفع مشکل اسکرول افقی در کانتینرهای Elementor در صفحه‌های کوچک */
  .elementor-container,
  .elementor-container .elementor-row,
  .elementor-container .elementor-column,
  .elementor-widget-custom_search_box,
  .elementor-widget-custom_search_box .elementor-widget-container,
  .elementor-section,
  .elementor-section .elementor-container,
  .elementor-column,
  .elementor-column-wrap,
  .elementor-widget-wrap {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* اطمینان از responsive بودن در صفحه‌های کوچک */
  body.elementor-page,
  body.elementor-page .elementor,
  html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .ecsb-search-form-wrapper {
    padding: 0 5px;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .ecsb-search-form {
    margin: 5px auto;
    gap: 5px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .ecsb-search-form input[type="search"] {
    padding: 8px 12px 8px 35px;
    font-size: 14px;
  }

  .ecsb-popup-content {
    padding: 0 5px;
  }

  .ecsb-result-section {
    padding: 15px 10px;
  }

  .ecsb-section-header {
    padding: 0 5px;
    flex-wrap: wrap;
    gap: 5px;
  }

  .ecsb-result-item {
    padding: 8px;
    gap: 10px;
  }

  .ecsb-result-image {
    width: 50px;
    height: 50px;
  }
}

.ecsb-popup-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100vh !important;
  background: #fff;
  z-index: 9999999 !important;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* مخفی کردن هدر و سایر عناصر هنگام باز بودن پاپ‌آپ */
body:has(.ecsb-popup-overlay[style*="display: flex"]) header,
body:has(.ecsb-popup-overlay[style*="display: flex"]) .header,
body:has(.ecsb-popup-overlay[style*="display: flex"]) .site-header,
body:has(.ecsb-popup-overlay[style*="display: flex"]) .main-header,
body:has(.ecsb-popup-overlay[style*="display: flex"]) .elementor-location-header,
body:has(.ecsb-popup-overlay[style*="display: flex"]) nav:not(.ecsb-popup-overlay nav),
body:has(.ecsb-popup-overlay[style*="display: flex"]) .navbar,
body:has(.ecsb-popup-overlay[style*="display: flex"]) .navigation {
  z-index: 1 !important;
  position: relative !important;
}

/* استفاده از کلاس برای حالت باز بودن پاپ‌آپ - تمام انواع هدر */
body.ecsb-popup-open header,
body.ecsb-popup-open .header,
body.ecsb-popup-open .site-header,
body.ecsb-popup-open .main-header,
body.ecsb-popup-open .elementor-location-header,
body.ecsb-popup-open nav:not(.ecsb-popup-overlay nav),
body.ecsb-popup-open .navbar,
body.ecsb-popup-open .navigation,
body.ecsb-popup-open [class*="header"],
body.ecsb-popup-open [id*="header"],
body.ecsb-popup-open [class*="Header"],
body.ecsb-popup-open [id*="Header"],
body.ecsb-popup-open [class*="top-bar"],
body.ecsb-popup-open [class*="TopBar"],
body.ecsb-popup-open [class*="topbar"] {
  z-index: 1 !important;
  position: relative !important;
}

/* اطمینان از اینکه عناصر sticky یا fixed در header هم در زیر پاپ‌آپ باشند */
body.ecsb-popup-open header,
body.ecsb-popup-open .header,
body.ecsb-popup-open .site-header,
body.ecsb-popup-open .main-header,
body.ecsb-popup-open [class*="header"],
body.ecsb-popup-open [id*="header"] {
  z-index: 1 !important;
}

/* برای تمام عناصر fixed یا sticky که ممکن است هدر باشند */
body.ecsb-popup-open *[style*="position: sticky"],
body.ecsb-popup-open *[style*="position: fixed"] {
  z-index: 1 !important;
}

/* برای عناصر با position fixed یا sticky که در header هستند */
body.ecsb-popup-open header *,
body.ecsb-popup-open .header *,
body.ecsb-popup-open .site-header *,
body.ecsb-popup-open .main-header *,
body.ecsb-popup-open [class*="header"] *,
body.ecsb-popup-open [id*="header"] * {
  z-index: 1 !important;
}
.ecsb-popup-content {
  width: 95%;
  max-width: 95%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  min-height: 80vh;
  box-sizing: border-box;
  padding: 0 15px;
}
.ecsb-popup-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  margin-bottom: 0;
  gap: 12px;
  padding: 16px 0 0 0;
  box-sizing: border-box;
  overflow: hidden;
}
.ecsb-popup-header .ecsb-search-form {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
.ecsb-popup-content .ecsb-search-results {
  width: 100%;
  max-width: 100%;
  margin-top: 24px;
  position: static;
}

.ecsb-popup-close {
  display: inline-block;
  font-weight: 400;
  color: #df2f2f;
  text-align: center;
  white-space: nowrap;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  background-color: transparent;
  border: 1px solid #959595;
  padding: .5rem 1rem;
  font-size: 1rem;
  border-radius: 3px;
  transition: all .3s;
  margin-bottom: 0;
  cursor: pointer;
  position: static;
  top: auto;
  right: auto;
  z-index: 10010;
  margin-left: 12px;
}

.ecsb-popup-searchbox {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.ecsb-popup-searchbox form {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* نمایش ۲.۵ آیتم در هر بخش نتایج پاپ‌آپ (دسکتاپ) */
.ecsb-popup-overlay .ecsb-section-content {
  max-height: none !important;
  overflow-y: visible;
}

/* نمایش ۲.۵ آیتم در هر بخش نتایج پاپ‌آپ (موبایل) */
@media (max-width: 768px) {
  .ecsb-popup-overlay {
    padding: 0;
  }

  .ecsb-popup-content {
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
  }

  .ecsb-popup-overlay .ecsb-section-content {
    max-height: none !important;
    overflow-y: visible;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
  }
}

.ecsb-section-content.no-fade::after {
    display: none !important;
}

.ecsb-popup-overlay .ecsb-section-content.no-fade::after {
    display: none !important;
    opacity: 0 !important;
    height: 0 !important;
}
