.ecsb-search-form {
  display: flex;
  max-width: 600px;
  margin: 20px auto;
  position: relative;
  padding: 0;
  border-radius: 12px;
  z-index: 1;
  border: 2px solid #ff9800 !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 * {
  z-index: 99999 !important;
  position: relative !important;
}

.mega-menu,
.mega-menu-container,
.mega-menu-wrapper {
  z-index: 99999 !important;
}

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

/* ============================================
   مگا منو و زیرمنو - عرض برابر با کانتینر cv
   ============================================ */

/* استایل پایه برای تمام منوهای dropdown و mega menu */
.mega-menu,
.mega-menu-container,
.mega-menu-wrapper,
.dropdown-menu,
.sub-menu,
.menu-item-has-children > .sub-menu,
.elementor-nav-menu--dropdown,
.elementor-nav-menu__dropdown,
.elementor-menu-toggle__dropdown {
  box-sizing: border-box !important;
}

/* منوهای داخل کانتینر cv - عرض برابر با cv */
.cv .elementor-nav-menu--dropdown,
.cv .elementor-nav-menu__dropdown,
.cv .mega-menu,
.cv .mega-menu-container,
.cv .mega-menu-wrapper,
.cv .dropdown-menu,
.cv .sub-menu,
.cv .menu-item-has-children > .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}


/* منوهای داخل هر کانتینری که داخل cv است */
.cv * .elementor-nav-menu--dropdown,
.cv * .elementor-nav-menu__dropdown,
.cv * .mega-menu,
.cv * .mega-menu-container,
.cv * .mega-menu-wrapper,
.cv * .dropdown-menu,
.cv * .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* اطمینان از نمایش صحیح منوها حتی با overflow hidden */
.elementor-container,
.elementor-section,
.elementor-column,
.elementor-widget,
.elementor-nav-menu__container,
.elementor-location-header,
header,
.elementor-header,
.cv {
  overflow: visible !important;
}

/* کانتینر با کلاس cv - اطمینان از position relative */
.cv {
  position: relative !important;
}

/* منوهای Elementor - عرض برابر با کانتینر هدر (با JavaScript تنظیم می‌شود) */
.elementor-nav-menu--dropdown,
.elementor-nav-menu__dropdown,
.elementor-nav-menu .elementor-nav-menu__dropdown,
.elementor-menu-toggle__dropdown {
  position: absolute !important;
  box-sizing: border-box !important;
}

/* منوهای داخل هدر Elementor - عرض برابر با کانتینر هدر */
.elementor-location-header .elementor-nav-menu--dropdown,
.elementor-location-header .elementor-nav-menu__dropdown,
.elementor-header .elementor-nav-menu--dropdown,
.elementor-header .elementor-nav-menu__dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل کانتینر Elementor - عرض برابر با کانتینر */
.elementor-container .elementor-nav-menu--dropdown,
.elementor-container .elementor-nav-menu__dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* منوهای داخل section Elementor - عرض برابر با section */
.elementor-section .elementor-nav-menu--dropdown,
.elementor-section .elementor-nav-menu__dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل column Elementor - عرض برابر با column */
.elementor-column .elementor-nav-menu--dropdown,
.elementor-column .elementor-nav-menu__dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* مگا منوهای عمومی - عرض برابر با والد (با JavaScript تنظیم می‌شود) */
.mega-menu,
.mega-menu-container,
.mega-menu-wrapper {
  position: absolute !important;
  box-sizing: border-box !important;
}

/* منوهای dropdown عمومی - عرض برابر با والد (با JavaScript تنظیم می‌شود) */
.dropdown-menu,
.sub-menu,
.menu-item-has-children > .sub-menu,
.nav-menu .sub-menu,
.navigation .sub-menu,
.navbar .dropdown-menu,
.main-navigation .sub-menu,
.primary-menu .sub-menu,
.header-menu .sub-menu {
  position: absolute !important;
  box-sizing: border-box !important;
}

/* منوهای داخل کانتینر محدود - عرض برابر با کانتینر */
.elementor-container .mega-menu,
.elementor-container .mega-menu-container,
.elementor-container .mega-menu-wrapper,
.elementor-container .dropdown-menu,
.elementor-container .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل section - عرض برابر با section */
.elementor-section .mega-menu,
.elementor-section .mega-menu-container,
.elementor-section .mega-menu-wrapper,
.elementor-section .dropdown-menu,
.elementor-section .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل header - عرض برابر با header */
header .mega-menu,
header .mega-menu-container,
header .mega-menu-wrapper,
header .dropdown-menu,
header .sub-menu,
header .elementor-nav-menu--dropdown,
header .elementor-nav-menu__dropdown,
.elementor-header .mega-menu,
.elementor-header .mega-menu-container,
.elementor-header .mega-menu-wrapper,
.elementor-header .dropdown-menu,
.elementor-header .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل navigation - عرض برابر با navigation */
.navigation .mega-menu,
.navigation .dropdown-menu,
.navigation .sub-menu,
.navbar .mega-menu,
.navbar .dropdown-menu,
.navbar .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل widget Elementor - عرض برابر با widget */
.elementor-widget-nav-menu .elementor-nav-menu--dropdown,
.elementor-widget-nav-menu .elementor-nav-menu__dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل widget wrapper - عرض برابر با wrapper */
.elementor-widget-wrapper .elementor-nav-menu--dropdown,
.elementor-widget-wrapper .mega-menu,
.elementor-widget-wrapper .dropdown-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل nav-menu container - عرض برابر با container */
.elementor-nav-menu__container .elementor-nav-menu--dropdown,
.elementor-nav-menu__container .elementor-nav-menu__dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل header section - عرض برابر با header section */
.elementor-location-header .elementor-section .elementor-nav-menu--dropdown,
.elementor-location-header .elementor-section .elementor-nav-menu__dropdown,
.elementor-location-header .elementor-section .mega-menu,
.elementor-location-header .elementor-section .dropdown-menu,
.elementor-location-header .elementor-section .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل header container - عرض برابر با header container */
.elementor-location-header .elementor-container .elementor-nav-menu--dropdown,
.elementor-location-header .elementor-container .elementor-nav-menu__dropdown,
.elementor-location-header .elementor-container .mega-menu,
.elementor-location-header .elementor-container .dropdown-menu,
.elementor-location-header .elementor-container .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل widget - اتصال به header container اصلی نه widget */
.elementor-location-header .elementor-widget .elementor-nav-menu--dropdown,
.elementor-location-header .elementor-widget .elementor-nav-menu__dropdown,
.elementor-location-header .elementor-widget .mega-menu,
.elementor-location-header .elementor-widget .dropdown-menu,
.elementor-location-header .elementor-widget .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل column - اتصال به header container اصلی نه column */
.elementor-location-header .elementor-column .elementor-nav-menu--dropdown,
.elementor-location-header .elementor-column .elementor-nav-menu__dropdown,
.elementor-location-header .elementor-column .mega-menu,
.elementor-location-header .elementor-column .dropdown-menu,
.elementor-location-header .elementor-column .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل nav-menu container - اتصال به header container اصلی */
.elementor-location-header .elementor-nav-menu__container .elementor-nav-menu--dropdown,
.elementor-location-header .elementor-nav-menu__container .elementor-nav-menu__dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* اطمینان از اینکه column و widget overflow visible دارند */
.elementor-location-header .elementor-column,
.elementor-location-header .elementor-widget,
.elementor-location-header .elementor-widget-nav-menu {
  overflow: visible !important;
}

/* منوهای داخل nav-menu - اتصال به header container اصلی */
.elementor-location-header .elementor-nav-menu .elementor-nav-menu--dropdown,
.elementor-location-header .elementor-nav-menu .elementor-nav-menu__dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* اطمینان از اینکه منوها به nearest positioned ancestor متصل می‌شوند */
.elementor-location-header {
  position: relative !important;
}

.elementor-location-header .elementor-section {
  position: relative !important;
}

.elementor-location-header .elementor-container {
  position: relative !important;
}

/* منوهای داخل header - اتصال به header container اصلی */
.elementor-location-header .elementor-nav-menu--dropdown,
.elementor-location-header .elementor-nav-menu__dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل header section - اتصال به section container */
.elementor-location-header .elementor-section .elementor-nav-menu--dropdown,
.elementor-location-header .elementor-section .elementor-nav-menu__dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل header container - اتصال به container اصلی */
.elementor-location-header .elementor-container .elementor-nav-menu--dropdown,
.elementor-location-header .elementor-container .elementor-nav-menu__dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* مگا منوهای داخل header - اتصال به header container */
.elementor-location-header .mega-menu,
.elementor-location-header .mega-menu-container,
.elementor-location-header .mega-menu-wrapper,
.elementor-location-header .dropdown-menu,
.elementor-location-header .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل header section - اتصال به section container */
.elementor-location-header .elementor-section .mega-menu,
.elementor-location-header .elementor-section .mega-menu-container,
.elementor-location-header .elementor-section .mega-menu-wrapper,
.elementor-location-header .elementor-section .dropdown-menu,
.elementor-location-header .elementor-section .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل header container - اتصال به container اصلی */
.elementor-location-header .elementor-container .mega-menu,
.elementor-location-header .elementor-container .mega-menu-container,
.elementor-location-header .elementor-container .mega-menu-wrapper,
.elementor-location-header .elementor-container .dropdown-menu,
.elementor-location-header .elementor-container .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* اطمینان از اینکه منوها به header container متصل می‌شوند نه به والد کوچکتر */
.elementor-location-header .elementor-widget-nav-menu {
  position: relative !important;
}

.elementor-location-header .elementor-widget-nav-menu .elementor-nav-menu--dropdown,
.elementor-location-header .elementor-widget-nav-menu .elementor-nav-menu__dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
}

/* منوهای داخل column - اتصال به column container */
.elementor-location-header .elementor-column .elementor-nav-menu--dropdown,
.elementor-location-header .elementor-column .elementor-nav-menu__dropdown,
.elementor-location-header .elementor-column .mega-menu,
.elementor-location-header .elementor-column .dropdown-menu,
.elementor-location-header .elementor-column .sub-menu {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !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;
  }

  /* مگا منو و زیرمنو در موبایل - عرض برابر با هدر */
  .mega-menu,
  .mega-menu-container,
  .mega-menu-wrapper,
  .dropdown-menu,
  .sub-menu,
  .menu-item-has-children > .sub-menu,
  .elementor-nav-menu--dropdown,
  .elementor-nav-menu__dropdown,
  .elementor-menu-toggle__dropdown {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    position: absolute !important;
  }

  /* منوهای داخل کانتینر در موبایل */
  .elementor-container .elementor-nav-menu--dropdown,
  .elementor-container .mega-menu,
  .elementor-container .dropdown-menu,
  .elementor-container .sub-menu {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    position: absolute !important;
  }
}

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

.ecsb-search-form input[type="search"]:focus {
  outline: none;
  border-color: #eb7a61;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(235, 122, 97, 0.1);
}

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

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

.ecsb-search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
}

.ecsb-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  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;
  z-index: 1001;
  display: none;
  border: 1px solid #eef2f7;
  padding: 10px;
  -webkit-overflow-scrolling: touch;
}

.ecsb-result-section {
  padding: 20px;
  border-bottom: 1px solid #eef2f7;
}

.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;
}

.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;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
  position: relative;
}

.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;
}

.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;
}

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

.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) {
  .ecsb-search-form {
    margin: 10px auto;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
  }

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

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

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

  .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;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .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;
}

.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;
}

.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;
}

.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;
    }

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

    .ecsb-filter-buttons {
        gap: 10px;
    }

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

    .ecsb-results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.ecsb-popup-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 99999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}
.ecsb-popup-content {
  width: 95vw;
  max-width: 95vw;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  min-height: 80vh;
}
.ecsb-popup-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0;
  gap: 12px;
  padding: 16px 0 0 0;
}
.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;
}
.ecsb-popup-searchbox form {
  width: 100% !important;
  max-width: 100% !important;
}

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

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

.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;
}

/* ============================================
   تنظیم عرض mega-menu-dropdown به 984px
   با بالاترین specificity برای override استایل‌های دیگر
   ============================================ */

/* استایل با بالاترین specificity - باید در انتهای فایل باشد */
html body div.mega-menu-dropdown,
html body div.mega-menu-dropdown.mega-menu-dropdown,
html body .cv div.mega-menu-dropdown,
html body .cv div.mega-menu-dropdown.mega-menu-dropdown,
html body .elementor-location-header div.mega-menu-dropdown,
html body header div.mega-menu-dropdown,
html body .my-mega-menu-section div.mega-menu-dropdown,
html body .e-n-menu-title-2224 div.mega-menu-dropdown,
html body .my-mega-menu-section * div.mega-menu-dropdown,
html body .e-n-menu-title-2224 * div.mega-menu-dropdown,
html body .cv * div.mega-menu-dropdown,
html body .elementor-location-header * div.mega-menu-dropdown,
html body header * div.mega-menu-dropdown {
  width: 984px !important;
  max-width: 984px !important;
  min-width: 984px !important;
}

/* Override برای تمام انواع mega menu */
html body .mega-menu,
html body .mega-menu-container,
html body .mega-menu-wrapper,
html body .my-mega-menu-section .mega-menu,
html body .my-mega-menu-section .mega-menu-container,
html body .my-mega-menu-section .mega-menu-wrapper,
html body .e-n-menu-title-2224 .mega-menu,
html body .e-n-menu-title-2224 .mega-menu-container,
html body .e-n-menu-title-2224 .mega-menu-wrapper {
  width: 984px !important;
  max-width: 984px !important;
  min-width: 984px !important;
}

/* استایل با specificity بسیار بالا برای override استایل‌های دیگر افزونه‌ها */
html body[class] div.mega-menu-dropdown,
html body[class] div.mega-menu-dropdown[class],
html body[class] .cv div.mega-menu-dropdown,
html body[class] .cv div.mega-menu-dropdown[class],
html body[class] .elementor-location-header div.mega-menu-dropdown,
html body[class] header div.mega-menu-dropdown,
html body[class] .my-mega-menu-section div.mega-menu-dropdown,
html body[class] .e-n-menu-title-2224 div.mega-menu-dropdown {
  width: 984px !important;
  max-width: 984px !important;
  min-width: 984px !important;
}

/* استایل با بالاترین specificity ممکن - استفاده از id و class */
html body#wpbody div.mega-menu-dropdown,
html body#wpbody div.mega-menu-dropdown.mega-menu-dropdown,
html body.elementor-default div.mega-menu-dropdown,
html body.elementor-default div.mega-menu-dropdown.mega-menu-dropdown,
html body .elementor-page div.mega-menu-dropdown,
html body .elementor-page div.mega-menu-dropdown.mega-menu-dropdown,
html body .cv.elementor-element div.mega-menu-dropdown,
html body .cv.elementor-element div.mega-menu-dropdown.mega-menu-dropdown,
html body .my-mega-menu-section.elementor-element div.mega-menu-dropdown,
html body .e-n-menu-title-2224.elementor-element div.mega-menu-dropdown {
  width: 984px !important;
  max-width: 984px !important;
  min-width: 984px !important;
}

/* استایل برای override استایل‌های inline و دیگر افزونه‌ها */
div.mega-menu-dropdown[data-mega-index],
div.mega-menu-dropdown[data-mega-index][class],
.cv div.mega-menu-dropdown[data-mega-index],
.elementor-location-header div.mega-menu-dropdown[data-mega-index],
.my-mega-menu-section div.mega-menu-dropdown[data-mega-index],
.e-n-menu-title-2224 div.mega-menu-dropdown[data-mega-index] {
  width: 984px !important;
  max-width: 984px !important;
  min-width: 984px !important;
}
