
.search-box {
  position: relative;
  height: var(--search-box-height); 
  top: 0; 
  left: 0; 
  right: 0; 
  padding: 10px;
  background: var(--card-bg);     
  display: flex;    
  justify-content: space-around; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.15); 
  z-index: 1010;    
}

.search-box.show {
  display: flex; 
  flex-direction: column;
}


.search-controls {
  position: relative; 
  display: flex;
  align-items: center;
  border-radius: 10px;
  gap: 5px; 
  background: transparent;  
}

.search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-results {
  position: absolute;
  top: 50%;
  right: 0; /* чтобы не залезать на clear-all-btn */
  transform: translateY(-50%) translateX(10px);

  /* display: none; */
  padding: 5px 10px;
  
  white-space: nowrap;

  background: var(--btns-search-box-bg);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;

  box-shadow: var(--el-search-box-shadow);
  z-index: 1020;
  visibility: hidden;
  /* анимация выезда */
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0.75s; 
}


.search-results.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);

  transition:
    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s;
}


.search-input {
  flex: 1; 
  padding: 10px;
  border-radius: 10px;
  border: none;
  font-size: 12px;
  background: var(--card-bg);  
  box-shadow: var(--el-search-box-shadow)
}

.filter-btn {
  background: var(--btns-search-box-bg);
  box-shadow: var(--el-search-box-shadow);
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;
  border-color: 0.2s ease;
}
/* Кнопка фильтров меняет цвет, если есть активные фильтры */
.search-box.has-active-filters .filter-btn {
  background: #7ac78c; /* зелёный цвет */
  border-color: #7ac78c; /* зелёный цвет */
  color: white;
}

.clear-all-btn {
  background: var(--btns-search-box-bg);
  box-shadow: var(--el-search-box-shadow);
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  display: none; 
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.search-box.has-filters .clear-all-btn {
  display: flex;
  opacity: 1;
  transform: scale(1);
}

.filters-contents {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card-bg);
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15); 
  z-index: 1010;
  display: none; /* ← скрыт по умолчанию */
  /* Можно добавить анимацию */
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s, transform 0.2s;
}

.filters-contents.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.filter-section {
  margin-bottom: 15px;
}

.filter-section label {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
}

.filters-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 15px;
}

.apply-filters, .reset-filters {
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}

.categories-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 6px 0;
  -webkit-overflow-scrolling: touch; 
  scrollbar-width: none; 
}
.categories-scroll::-webkit-scrollbar {
  display: none; 
}

.category-card {                        
  flex: 0 0 auto; 
  padding: 5px 10px;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 8px;
  white-space: nowrap;
  font-size: 0.9em;
  cursor: pointer;
  transition: background 0.2s;
}
.category-card.active {
  background: var(--highlight-bg);
  color: var(--highlight-color);
}



.price-inputs {
  display: flex;
  align-items: center;
  gap: 8px; /* отступ между полями и "–" */
  width: auto; /* или auto, как тебе нужно */
}

.price-separator {
  color: var(--text-secondary, #666);
  font-weight: 500;
  user-select: none; 
}

.price-min,
.price-max {
  width: 40%;
  border-radius: 8px;  
  padding: 5px 5px;
  font-size: 14px;  
  background: var(--card-bg); 
  color: var(--text);         
  border: 1px solid var(--border-color, #ddd); 
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);  
  text-align: center;
}

.price-min:focus,
.price-max:focus {
  outline: none;
  border-color: var(--primary, #007aff);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.category-card, .clear-all-btn, .filter-btn, .reset-filters {
    -webkit-tap-highlight-color: transparent; 
    -webkit-touch-callout: none;              
    user-select: none;  
}