:root {
  --accent: #D8BC73;
}

/* === CONTAINER === */
.car-search-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 50px;
  padding: 10px 18px;
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.0);
  max-width: 100%;
  margin: 0 auto;
  flex-wrap: wrap;
  position: relative;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
  --z-index: 9999;
}

/* === SEARCH AREA === */
.search-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
}

.car-search-input {
  border: none;
  outline: none;
  flex: 1;
  padding: 10px 10px;
  min-width: 150px;
  font-size: 15px;
  background: transparent;
}

.car-search-input::placeholder {
  color: #999;
}

/* === FILTER TAGS === */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 10px;
  align-items: center;
}

.filter-tag {
   background: #f9f3e3;
  color: #856d2e;
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  transition: background 0.3s ease;
}

.filter-tag i {
  cursor: pointer;
  font-size: 12px;
  transition: color 0.2s ease;
}

.filter-tag i:hover {
  color: #333;
}

/* === BUTTONS === */
.search-btn {
  background-color: var(--accent);
  border: none;
  color: #fff;
  padding: 12px 25px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  margin-left: 8px;
}

.search-btn:hover {
  background-color: #c4aa60;
  transform: translateY(-1px);
}

.filter-btn {
  background: #fff;
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 8px;
}

.filter-btn:hover {
  background: #f6f6f6;
  color: var(--accent);
  transform: none;
}

/* === DROPDOWN === */
.filter-dropdown {
  position: absolute;
  top: 70px;
  right: 0;
  background: #fff;
  border: 1px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  padding: 20px;
  width: 320px;
  display: none;
  z-index: 99999;
  animation: fadeDown 0.3s ease;
}

.filter-dropdown.active {
  display: block;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.filter-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
}

.filter-group select,
.filter-group input[type="range"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
}

/* === RANGE STYLING === */
input[type="range"] {
  -webkit-appearance: none;
  height: 6px;
  border-radius: 5px;
  background: #f3f3f3;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.price-value {
  font-size: 14px;
  color: #666;
  margin-top: 6px;
  text-align: right;
}

/* === RESPONSIVE === */
.button-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: 10px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .car-search-container {
    flex-direction: column;
  border-radius: 25px;
    padding: 15px;
  }

  .search-input-wrapper {
    width: 100%;
  }

  .filter-tags {
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
  }

  .button-group {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    margin-top: 10px;
  }

  /* ✅ Make search button full width, keep filter icon round */
  .search-btn {
    flex: 1;
    border-radius: 30px;
    margin: 0;
  }

  .filter-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    flex: none; /* Prevents it from stretching */
    margin: 0;
  }

  .filter-dropdown {
    position: relative;
    width: 100%;
    top: 0;
    margin-top: 15px;
  }
}

/* ✅ NEW: Search Suggestions Dropdown */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--accent);
  ---border-top: none;
  ---border-radius: 0 0 16px 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 99999;
  margin-top: -1px;
}

.search-suggestions.active {
  display: block;
}

.suggestion-item {
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #333;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: #f9f3e3;
  color: var(--accent);
}

.suggestion-item mark {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}

.search-suggestions-loading {
  padding: 15px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.search-suggestions-empty {
  padding: 15px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

/* Ensure input wrapper has relative positioning */
.search-input-wrapper {
  position: relative;
}

/* Adjust border radius when suggestions are showing 
.car-search-container.suggestions-active {
  border-radius: 50px 50px 0 0;
}
*/

/*
* @media (max-width: 768px) {
  .search-suggestions {
    ---border-radius: 0 0 12px 12px;
  }
}
*/
