/* Header Search */
.header-search {
  margin: 0 20px;
  flex-grow: 1;
  max-width: 280px;
}

.header-search .search-form {
  position: relative;
  width: 100%;
}

.header-search .search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search .search-field {
  width: 100%;
  padding: 8px 18px; /* Adjusted padding since icon is hidden */
  font-size: 0.9375rem;
  color: var(--color-black);
  background-color: var(--color-white);
  border: 1px solid #767676; /* Standard border color, will be blue on focus or as requested */
  border-radius: 0; /* Rectangular as in production */
  outline: none;
  transition: border-color 0.1s ease;
}

/* Match production blue border */
.header-search .search-field {
  border: 1px solid #767676; /* Initial state */
}

.header-search .search-field:focus {
  border-color: #0056b3; /* Production-like blue */
  box-shadow: 0 0 2px rgba(0, 86, 179, 0.5);
}

.header-search .search-field::-webkit-search-decoration,
.header-search .search-field::-webkit-search-cancel-button,
.header-search .search-field::-webkit-search-results-button,
.header-search .search-field::-webkit-search-results-decoration {
  display: none;
}

.header-search .search-field::placeholder {
  color: #CCC;
}

/* Hide the search icon to match production image */
.header-search .search-submit {
  display: none;
}

@media screen and (max-width: 1200px) {
  .header-search {
    max-width: 200px;
    margin: 0 15px;
  }
}

@media screen and (max-width: 991.98px) {
  .header-search {
    margin: 0 10px;
  }
}

@media screen and (max-width: 767.98px) {
  .header-search {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    background: var(--color-white);
    padding: 15px 20px;
    z-index: 98;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  #header.search-open .header-search {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }

  #header-main .header-row {
    flex-wrap: nowrap;
  }

  .btn-toggle-search {
    margin-left: auto;
  }
}

/* Mobile Toggle Search */
.btn-toggle-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 10px;
  z-index: 100;
  transition: color 0.3s ease;
}

.btn-toggle-search .search-icon {
  width: 24px;
  height: 24px;
  color: #707070;
}

.btn-toggle-search span {
  font-size: 0.625rem;
  color: #707070;
  margin-top: 2px;
}

@media screen and (min-width: 768px) {
  .btn-toggle-search {
    display: none;
  }
}
