/**
 * UltraHogar Plus – Estilos del formulario de búsqueda flexible.
 */

/* ── Formulario principal ─────────────────────────────────────────────── */
.uhp-search-form {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.uhp-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  overflow: visible;
  transition: border-color 0.2s;
  background: #fff;
}

.uhp-search-input-wrapper:focus-within {
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

.uhp-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 14px;
  font-size: 15px;
  background: transparent;
  color: #333;
  min-width: 0;
}

.uhp-search-input::placeholder {
  color: #aaa;
}

.uhp-search-submit {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: #0073aa;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
  border-radius: 0 4px 4px 0;
}

.uhp-search-submit:hover {
  background: #005a87;
}

.uhp-search-submit svg {
  flex-shrink: 0;
}

/* ── Autocompletado ───────────────────────────────────────────────────── */
.uhp-autocomplete-results {
  position: absolute;
  top: calc(100% + 4px);
  left: -2px;
  right: -2px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  max-height: 360px;
  overflow-y: auto;
  display: none;
}

.uhp-autocomplete-results.active {
  display: block;
}

.uhp-autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  color: #333;
  transition: background 0.15s;
}

.uhp-autocomplete-item:last-child {
  border-bottom: none;
}

.uhp-autocomplete-item:hover,
.uhp-autocomplete-item.focused {
  background: #f0f7ff;
}

.uhp-autocomplete-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.uhp-autocomplete-thumb-placeholder {
  width: 40px;
  height: 40px;
  background: #f5f5f5;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 18px;
}

.uhp-autocomplete-info {
  flex: 1;
  min-width: 0;
}

.uhp-autocomplete-title {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.uhp-autocomplete-price {
  font-size: 12px;
  color: #0073aa;
  margin-top: 2px;
}

.uhp-autocomplete-no-results {
  padding: 12px;
  color: #666;
  font-size: 13px;
  text-align: center;
}

.uhp-autocomplete-loading {
  padding: 12px;
  text-align: center;
  color: #aaa;
  font-size: 13px;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .uhp-search-submit span {
    display: none;
  }
  .uhp-search-submit {
    padding: 10px 14px;
  }
}
