/* === Custom Shop Filters Styles (RTL) === */

#custom-filters {
     direction: rtl;
    text-align: right;
    padding: 10px 10px 10px;
    /* margin-bottom: 20px; */
    background: #fff;
    border-radius: 0px;
    max-width: 400px;
    font-family: inherit;
}

#custom-filters .form-title h4 {
        padding: 0;
    margin: 0 0 10px;
    line-height: 2.4em;
    font-size: 16px;
    font-weight: 700;
    border-bottom: solid 1px #e2e2e2;
    color: var(--e-global-color-primary);
}

#custom-filters label {
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    color: #333;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

/* === Categories === */
#custom-filters .filter-categories {
  margin-bottom: 15px;
}

#custom-filters .filter-categories label {
  font-weight: normal;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* align checkbox and text properly */
  gap: 6px;
  margin-bottom: 5px;
}

/* === Price Filter === */
#custom-filters .filter-price {
  margin-bottom: 0px;
}

#custom-filters .price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  justify-content: flex-start; /* RTL alignment */
}

#custom-filters .price-input-group {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

#custom-filters .price-input-group label {
    font-weight: normal;
    margin: 0;
    white-space: nowrap;
    color: #333;
    position: absolute;
    top: -8px;
    right: 8px;
    font-size: 12px;
    background: white;
    padding: 0px 5px;
    line-height: 1;
}

#custom-filters .filter-price input[type='number'] {
  display: inline-block !important; /* prevent WooCommerce JS hiding */
  width: 80px; /* slightly smaller to fit in one row */
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  text-align: right;
}

#custom-filters #price-range {
  margin-top: 10px;
  background: #eee;
  border-radius: 4px;
  height: 8px;
  position: relative;
  direction: rtl;
}

#custom-filters #price-range .ui-slider-range {
  background-color: #0c5be2 !important; /* Glowebi style light blue */
}

#custom-filters #price-range .ui-slider-handle {
  width: 18px;
  height: 18px;
  background-color: #d2d0d2 !important; /* Glowebi style purple */
  border-radius: 50%;
  border: 2px solid #fff;
  top: -5px;
  cursor: pointer;
}
/* Manufacturer list with scroll */
#custom-filters .manufacturer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px; /* limit height */
  overflow-y: auto; /* enable scroll */
  border-radius: 4px;
  background: #fff;
}

/* Scrollbar styling */
#custom-filters .manufacturer-list::-webkit-scrollbar {
  width: 6px;
}
#custom-filters .manufacturer-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

#custom-filters .manufacturer-list li {
  margin: 0;
}

#custom-filters .manufacturer-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
  padding: 6px 8px;
  border-bottom: 1px solid #f2f2f2;
  transition: background 0.2s;
}

#custom-filters .manufacturer-list label:hover {
  background: #f7f7f7;
}

#custom-filters .manufacturer-list input[type='checkbox'] {
  accent-color: #0c5be2; /* Glowebi blue */
  transform: scale(1.1); /* slightly larger checkbox */
}

/* === Build Year Filter === */
#custom-filters .filter-build-year {
  margin-bottom: 15px;
}

#custom-filters .year-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  justify-content: flex-start; /* RTL alignment */
}

#custom-filters .year-input-group {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

#custom-filters .year-input-group label {
  font-weight: normal;
    margin: 0;
    white-space: nowrap;
    color: #333;
    position: absolute;
    top: -8px;
    right: 8px;
    font-size: 12px;
    background: white;
    padding: 0px 5px;
    line-height: 1;
}

#custom-filters .filter-build-year input[type='number'] {
  display: inline-block !important;
  width: 80px;
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  text-align: right;
}

#custom-filters #year-range {
  margin-top: 10px;
  background: #eee;
  border-radius: 4px;
  height: 8px;
  position: relative;
  direction: rtl;
}

#custom-filters #year-range .ui-slider-range {
  background-color: #0c5be2 !important; /* Glowebi style light blue */
}

#custom-filters #year-range .ui-slider-handle {
  width: 18px;
  height: 18px;
  background-color: #d2d0d2 !important;  /* Glowebi style purple */
  border-radius: 50%;
  border: 2px solid #fff;
  top: -5px;
  cursor: pointer;
}

/* === Mileage Filter === */
#custom-filters .filter-mileage {
  margin-bottom: 15px;
}

#custom-filters .mileage-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  justify-content: flex-start; /* RTL alignment */
}

#custom-filters .mileage-input-group {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

#custom-filters .mileage-input-group label {
  font-weight: normal;
    margin: 0;
    white-space: nowrap;
    color: #333;
    position: absolute;
    top: -8px;
    right: 8px;
    font-size: 12px;
    background: white;
    padding: 0px 5px;
    line-height: 1;
}

#custom-filters .filter-mileage input[type='number'] {
  display: inline-block !important;
  width: 80px;
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  text-align: right;
}

#custom-filters #mileage-range {
  margin-top: 10px;
  background: #eee;
  border-radius: 4px;
  height: 8px;
  position: relative;
  direction: rtl;
}

#custom-filters #mileage-range .ui-slider-range {
  background-color: #0c5be2 !important; /* Glowebi style light blue */
}

#custom-filters #mileage-range .ui-slider-handle {
  width: 18px;
  height: 18px;
  background-color: #d2cdd3 !important; /* Glowebi style purple */
  border-radius: 50%;
  border: 2px solid #fff;
  top: -5px;
  cursor: pointer;
}

/* === Buttons === */
#custom-filters button[type='submit'] {
    background: var(--e-global-color-primary);
    border: none;
    padding: 6px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    color: white;
    transition: background 0.3s;
    margin-left: 8px;
}

#custom-filters button[type='submit']:hover {
  background: var(--e-global-color-secondary);
}

#custom-filters .reset-filters {
       margin-right: 0;
    color: #0047b7;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
}

#custom-filters .reset-filters:hover {
  text-decoration: underline;
}

/* === Accordion Style === */
#custom-filters .filter-group {
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e2e2;
    border-radius: 0px;
    overflow: hidden;
}

#custom-filters .filter-title {
  background: #f0f0f0;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s;
  text-align: right;
}

#custom-filters .filter-title:hover {
  background: #e2e2e2;
}

#custom-filters .filter-content {
  display: none; /* hidden by default */
  padding: 0px 12px;
  background: #fff;
  text-align: right;
}
#custom-filters .filter-group.manufacturers .filter-content {
    padding: 0px;
}
#custom-filters .filter-group.price .filter-content, #custom-filters .filter-group.build-year .filter-content, #custom-filters .filter-group.mileage .filter-content {
  padding: 24px 12px 20px;
}
#custom-filters .filter-content br {
    display: none;
}

/* === Order Filter Styles === */
#custom-order-filter {
  direction: rtl;
    text-align: right;
    background: #fff;
    border: solid 1px #cdd1d4;
    border-radius: 4px;
    width: 150px;
    max-width: 400px;
}


/* Order list with scroll */
#custom-order-filter .order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px; /* limit height */
  overflow-y: auto; /* enable scroll */
  border-radius: 4px;
  background: #fff;
}

/* Scrollbar styling */
#custom-order-filter .order-list::-webkit-scrollbar {
  width: 6px;
}
#custom-order-filter .order-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

#custom-order-filter .order-list li {
  margin: 0;
}

#custom-order-filter .order-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
  padding: 6px 8px;
  border-bottom: 1px solid #f2f2f2;
  transition: background 0.2s;
  text-decoration: none;
  color: #333;
}

#custom-order-filter .order-option:hover {
  background: #f7f7f7;
  text-decoration: none;
  color: #333;
}

#custom-order-filter .order-option.active {
      background: transparent;
    color: var(--e-global-color-primary);
    font-weight: 400;
}

/* Accordion Style for Order Filter */
#custom-order-filter .filter-group {
    margin-bottom: 0;
    border-radius: 0px;
    position: relative;
}

#custom-order-filter .filter-title {
  background: #f0f0f0;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s;
  text-align: right;
}

#custom-order-filter .filter-title:hover {
  background: #e2e2e2;
}

#custom-order-filter .filter-content {
  display: none; /* hidden by default */
      padding: 0px;
    background: #fff;
    text-align: right;
    position: absolute;
    top: 50px;
    right: -1px;
    z-index: 1000;
    width: 151px;
    border: solid 1px #cdd1d4;
    border-radius: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #custom-order-filter {
    max-width: 100%;
    margin-bottom: 0px;
  }
}