/* Bố cục form gốc (tắt được trong WooCommerce → Mecom Search → Giao diện nếu theme đã có).
   Màu sắc nằm ở mspc-search.css và lấy từ trang quản trị. */
.trangchu-header-search {
  flex: 0 1 var(--mspc-max-width, 638px);
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--mspc-max-width, 638px);
  height: var(--mspc-height, 48px);
  margin-left: auto;
  padding: 4px 4px 4px 12px;
  border: 1px solid;
  border-radius: var(--mspc-radius, 4px);
  box-sizing: border-box;
}
.trangchu-header-search p { margin: 0; }
.trangchu-header-searchdanhmuc { position: relative; flex: none; padding-right: 20px; margin-right: 20px; border-right: 1px solid; }
.trangchu-header-searchdanhmuc select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0 20px 0 0;
  height: auto;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  cursor: pointer;
  outline: 0;
  box-shadow: none;
}
.trangchu-header-searchinput { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.trangchu-header-searchinput p { flex: none; }
.trangchu-header-searchinput p svg { display: block; }
.trangchu-header-searchinput input { flex: 1; min-width: 0; height: auto; padding: 0; border: 0; outline: 0; background: none; box-shadow: none; font-size: 16px; }
.trangchu-header-searchbtn {
  flex: none;
  width: 120px;
  height: calc(var(--mspc-height, 48px) - 8px);
  padding: 0;
  border: 0;
  border-radius: var(--mspc-radius, 4px);
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 767px) {
  .trangchu-header-search { flex-basis: 100%; max-width: none; height: 44px; padding-left: 10px; }
  .trangchu-header-searchdanhmuc { padding-right: 10px; margin-right: 10px; max-width: 40%; }
  .trangchu-header-searchdanhmuc select { max-width: 100%; text-overflow: ellipsis; font-size: 13px; }
  .trangchu-header-searchinput { gap: 8px; }
  .trangchu-header-searchinput input { font-size: 16px; } /* 16px để iOS không tự zoom */
  .trangchu-header-searchbtn { width: 84px; height: 36px; font-size: 14px; }
}
