.search-panel {
  border-radius: 18px;
  border: 1px solid rgba(8, 76, 60, 0.1);
  box-shadow:
    0 2px 4px rgba(8, 76, 60, 0.04),
    0 16px 40px rgba(8, 76, 60, 0.1);
  padding: 24px 28px 18px;
}

.search-fields {
  align-items: end;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
}

.search-field > .icon {
  flex-shrink: 0;
}

.search-field > span {
  display: block;
  flex: 1;
  min-width: 0;
}

.search-field b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #586d68;
  margin-bottom: 6px;
}

.combobox-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.combobox-wrap input {
  flex: 1;
  min-width: 0;
  padding-right: 40px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(8, 76, 60, 0.12) !important;
  background: #f6f4eb !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.combobox-wrap input:focus {
  outline: none;
  border-color: rgba(8, 76, 60, 0.35) !important;
  box-shadow: 0 0 0 3px rgba(197, 244, 93, 0.35);
}

.combobox-trigger {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4a6660;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.combobox-trigger:hover {
  background: rgba(8, 76, 60, 0.08);
  color: var(--green);
}

.combobox-trigger svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.combobox-wrap.is-open .combobox-trigger svg {
  transform: rotate(180deg);
}

.combobox-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  background: #fffdf9;
  border: 1px solid rgba(8, 76, 60, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(8, 76, 60, 0.14);
}

.combobox-list[hidden] {
  display: none;
}

.combobox-list li {
  margin: 0;
}

.combobox-option {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #3f5e57;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.combobox-option:hover,
.combobox-option:focus-visible {
  background: #edf5e5;
  color: var(--green);
  outline: none;
}

.combobox-option.is-active {
  background: rgba(8, 76, 60, 0.08);
  color: var(--green);
}

.combobox-empty {
  padding: 12px;
  font-size: 12px;
  color: #8a9a92;
  text-align: center;
}

.categories {
  border-top: 1px solid rgba(8, 76, 60, 0.08);
  margin-top: 18px !important;
  padding-top: 16px !important;
}

.categories-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  align-items: center;
}

/* Must beat .search-panel .categories-row button[type="submit"] { display: inline-flex } */
.search-panel .categories-row.is-collapsed button.category-extra {
  display: none !important;
}

/* Match category pill sizing (override homepage flex:1 stretch) */
.search-panel .categories-row button[type="submit"],
.search-panel .categories-toggle {
  flex: 0 1 auto;
  min-height: 43px;
  border: 0;
  background: #f5f3ea;
  border-radius: 99px;
  padding: 9px 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--green);
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.search-panel .categories-row button[type="submit"]:hover,
.search-panel .categories-toggle:hover {
  background: #e5efdb;
  box-shadow: 0 4px 12px rgba(8, 76, 60, 0.08);
}

.search-panel .categories-row button[type="submit"] .icon,
.search-panel .categories-toggle .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.search-panel .categories-toggle {
  border: 1px solid rgba(8, 76, 60, 0.12);
  background: #eef5e3;
  min-width: 43px;
  padding: 9px 16px;
}

.search-panel .categories-toggle .toggle-chevron {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.search-panel .categories-row:not(.is-collapsed) .categories-toggle .toggle-chevron {
  transform: rotate(180deg);
}

.search-panel .categories-row button[type="submit"] span {
  line-height: 1;
}

@media (max-width: 760px) {
  .search-panel {
    padding: 18px 16px 14px;
  }

  .combobox-list {
    max-height: 200px;
  }
}

.search-panel .categories {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.search-panel .categories-row {
  width: 100%;
}

.search-panel .categories-row.is-collapsed .categories-toggle {
  margin-left: auto;
}
