/* Header search + /search — under KarpFisher tokens (yellow nav, orange CTA) */
.kf-header-search {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
  z-index: 30;
}

.kf-header-search__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid var(--set-main-color, #ffc531);
  border-radius: 24px;
  background: #fff;
  cursor: pointer;
  color: var(--set-black-kf, #000);
  box-sizing: border-box;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}

.kf-header-search__toggle:hover,
.kf-header-search__toggle:focus {
  outline: none;
  color: var(--set-button-kf, #ff6b00);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.kf-header-search__icon,
.kf-header-search__go img {
  width: 22px;
  height: 22px;
  display: block;
}

.kf-header-search__panel {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: stretch;
  width: 0;
  max-width: min(340px, 72vw);
  height: 48px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  background: #fff;
  border: 2px solid var(--set-main-color, #ffc531);
  border-radius: 24px;
  box-sizing: border-box;
  transition: width 0.28s ease, opacity 0.2s ease;
  z-index: 31;
}

.kf-header-search.is-open .kf-header-search__panel {
  width: 280px;
  opacity: 1;
  pointer-events: auto;
}

.kf-header-search.is-open .kf-header-search__toggle {
  visibility: hidden;
  pointer-events: none;
}

.kf-header-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0 0.85rem 0 1rem;
  font-family: inherit;
  font-size: 15px;
  color: var(--set-black-kf, #000);
  outline: none;
  background: transparent;
  border-radius: 24px 0 0 24px;
}

.kf-header-search__input::placeholder {
  color: var(--set-dark-kf, #5b5b5b);
  opacity: 0.75;
}

.kf-header-search__go {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  padding: 0;
  border: none;
  border-radius: 0 22px 22px 0;
  background: var(--set-button-kf, #ff6b00);
  cursor: pointer;
  color: #fff;
}

.kf-header-search__go img {
  filter: brightness(0) invert(1);
}

.kf-header-search__go:hover,
.kf-header-search__go:focus {
  outline: none;
  background: #e05f00;
}

/* Mobile: slightly smaller, opens to the left of cabinet icon */
.kf-header-search--mobile .kf-header-search__toggle {
  width: 40px;
  height: 40px;
  border-radius: 20px;
}

.kf-header-search--mobile .kf-header-search__panel {
  right: auto;
  left: 0;
  height: 40px;
  border-radius: 20px;
}

.kf-header-search--mobile.is-open .kf-header-search__panel {
  width: min(210px, 56vw);
}

.kf-header-search--mobile .kf-header-search__input {
  font-size: 14px;
  padding: 0 0.55rem 0 0.75rem;
  border-radius: 20px 0 0 20px;
}

.kf-header-search--mobile .kf-header-search__go {
  width: 38px;
  border-radius: 0 18px 18px 0;
}

/* Live suggestions dropdown */
.kf-header-search__suggest {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, 86vw);
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 40;
  padding: 4px 0;
}

.kf-header-search--mobile .kf-header-search__suggest {
  right: auto;
  left: 0;
  width: min(280px, 86vw);
}

.kf-header-search__suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-decoration: none !important;
  color: var(--set-black-kf, #000);
  border: 0;
  background: transparent;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.kf-header-search__suggest-item:hover,
.kf-header-search__suggest-item.is-active,
.kf-header-search__suggest-all:hover,
.kf-header-search__suggest-all.is-active {
  background: #fff8e6;
}

.kf-header-search__suggest-img {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  background: #f4f4f4;
}

.kf-header-search__suggest-img--empty {
  display: inline-block;
}

.kf-header-search__suggest-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kf-header-search__suggest-title {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kf-header-search__suggest-price {
  font-size: 13px;
  color: var(--set-dark-kf, #5b5b5b);
}

.kf-header-search__suggest-empty {
  padding: 12px 14px;
  font-size: 14px;
  color: var(--set-dark-kf, #5b5b5b);
}

.kf-header-search__suggest-all {
  display: block;
  padding: 10px 14px;
  margin-top: 2px;
  border-top: 1px solid #eee;
  font-size: 14px;
  font-weight: 600;
  color: var(--set-button-kf, #ff6b00) !important;
  text-decoration: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* /search page */
.kf-search-page {
  margin-bottom: 2rem;
}

.kf-search-page__title {
  margin: 1.25rem 0 0.75rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--set-black-kf, #000);
}

.kf-search-page__hint,
.kf-search-page__empty {
  margin: 0 0 1rem;
  color: var(--set-dark-kf, #5b5b5b);
  font-size: 1rem;
}

.kf-search-page__empty a {
  color: var(--secondary, #ff805a);
}

.kf-search-page__form {
  display: flex;
  gap: 0.5rem;
  max-width: 520px;
  margin-bottom: 1.5rem;
  align-items: stretch;
}

.kf-search-page__input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 1rem;
  border: 2px solid var(--set-main-color, #ffc531);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--set-black-kf, #000);
}

.kf-search-page__input:focus {
  outline: none;
  border-color: var(--set-button-kf, #ff6b00);
}

.kf-search-page__submit {
  padding: 0.55rem 1.25rem;
  border: 1px solid #c15100;
  border-radius: 8px;
  background: var(--set-button-kf, #ff6b00);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.kf-search-page__submit:hover,
.kf-search-page__submit:focus {
  outline: none;
  filter: brightness(0.95);
}

.kf-search-results__noimg {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f4f4f4;
}

@media (max-width: 575px) {
  .kf-search-page__title {
    font-size: 1.35rem;
  }

  .kf-search-page__form {
    flex-direction: column;
  }
}
