.new-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  margin: 1rem 0;
  width: 100%;
  box-sizing: border-box;
}

.custom-dropdown {
  position: relative;
  display: inline-block;
}

.custom-dropdown .dropdown-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
  transition: color 0.3s ease;
}

.custom-dropdown .dropdown-arrow {
  transition: transform 0.3s ease;
  font-size: 0.8em;
}

.custom-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.custom-dropdown .dropdown-options {
  position: absolute;
  top: 120%;
  left: 0;
  background-color: #fff;
  min-width: 200px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0.5rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 100;
  border: 1px solid #eee;
  display: block;
  pointer-events: auto;
}

.custom-dropdown.active .dropdown-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-dropdown:not(.active) .dropdown-options {
  pointer-events: none;
}

.custom-dropdown .dropdown-options li {
  padding: 0;
}

.custom-dropdown .dropdown-options li a,
.custom-dropdown .dropdown-options li {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--y-color-text-dark);
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-align: right;
}

.custom-dropdown .dropdown-options li:hover,
.custom-dropdown .dropdown-options li a:hover {
  background-color: var(--y-color-light);
  color: var(--y-main);
}

.custom-dropdown .dropdown-options li.selected {
  color: var(--y-main);
  font-weight: bold;
  background-color: var(--y-color-light);
}

.filter-right .custom-dropdown.products-dropdown .dropdown-trigger {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--y-color-text-dark);
}

.filter-right .custom-dropdown.products-dropdown .dropdown-trigger:hover {
  color: var(--y-main);
}

.filter-right .custom-dropdown .dropdown-options {
  right: 0;
  left: auto;
  min-width: 150px;
}

.filter-left .custom-dropdown.sort-dropdown .dropdown-trigger {
  border: 1px solid var(--y-main);
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  color: var(--y-color-text-dark);
  background-color: transparent;
}

.filter-left .custom-dropdown.sort-dropdown .dropdown-trigger:hover {
  background-color: var(--y-color-light);
}

.filter-left .custom-dropdown .dropdown-options {
  left: 0;
  right: auto;
  min-width: 220px;
  text-align: right;
}

html[dir="rtl"] .filter-left .custom-dropdown .dropdown-options {
  left: 0;
  right: auto;
}

.sub-filter-bar .filter-right {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.sub-filter-bar .custom-dropdown.filter-dropdown .dropdown-trigger {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--y-color-text-dark);
}

.sub-filter-bar .custom-dropdown.filter-dropdown .dropdown-trigger:hover {
  color: var(--y-main);
}

.sub-filter-bar .custom-dropdown.filter-dropdown .dropdown-options {
  right: 0;
  left: auto;
  min-width: 140px;
  text-align: right;
}

.sort-dropdown {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 820px) {
  .sub-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .sub-filter-bar .filter-right {
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .sub-filter-bar .filter-left {
    align-self: center;
  }
}
