/* Search suggest panel â€” keep independent so layout never relies on cache gaps */

.headMid,
.searchBarMain,
.searchForm {
  overflow: visible !important;
  position: relative;
}

.pageHeader {
  overflow: visible !important;
}

.searchForm {
  z-index: 1100;
}
.searchBarWrap:focus-within {
  border-color: transparent;
  box-shadow: none;
}
.searchBarWrap .searchBar:focus {
    border: none;
    outline: none;
}
.searchBarWrap .form-control {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.95rem;
  color: #333;
  padding-left: 0.5rem;
}

.searchBarWrap .form-control::placeholder {
  color: #9aa0a6;
}
.searchClearBtn {
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  background: transparent;
  color: #6b7280;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.searchClearBtn[hidden] {
  display: none !important;
}

.searchClearBtn svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
}

.searchBarWrap .searchBtn {
  width: 2.063rem;
  height: auto;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: var(--redColor, #760000);
  color: #fff;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.searchBarWrap .searchBtn svg {
  width: 1.2rem !important;
  height: auto !important;
  aspect-ratio: 1;
  max-width: 1.2rem !important;
  max-height: 1.2rem !important;
  display: block;
}

.searchSuggestBox {
  position: relative !important;
  left: 0;
  right: 0;
  top: calc(100% + 0.45rem);
  width: 100%;
  max-width: 100%;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  z-index: 1200 !important;
  overflow: hidden;
  padding: 20px 20px;
}

.searchSuggestBox[hidden] {
  display: none !important;
}

.js-search-suggest-list {
  max-height: min(70vh, 28rem);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 1.05rem 1.1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--redColor, #760000) #f0f0f0;
}
.js-search-suggest-list::-webkit-scrollbar {
  width: 6px;
}

.js-search-suggest-list::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}

.js-search-suggest-list::-webkit-scrollbar-thumb {
  background: var(--redColor, #760000);
  border-radius: 10px;
}

.searchPanelSection + .searchPanelSection {
  margin-top: 1.2rem;
}

.searchPanelHead {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.searchPanelHead .searchPanelIcon,
.searchPanelIcon {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  color: var(--redColor, #760000);
  flex: 0 0 18px;
  display: inline-block;
  vertical-align: middle;
}

.searchPanelHead-right {
  margin-left: auto;
}

.searchTrendList {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.searchTrendPill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ffd8d5;
    border-radius: 50rem;
    background: #fff7f7;
    color: #000000;
    font-size: 0.75rem;
    text-decoration: none !important;
    line-height: 1.25;
    white-space: nowrap;
}

.searchTrendPill:hover {
  background:#fff7f7;
  border-color: var(--redColor, #760000);
  color: #000000;
}

.searchCatGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.searchCatCard {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.55rem;
  text-decoration: none !important;
  color: #111 !important;
  background: #fff;
  min-width: 0;
}

.searchCatCard:hover {
  border-color: var(--redColor, #760000);
  background: var(--redColorSubtle, #ffe0b8);
}

.searchCatCard img {
  width: 32px !important;
  height: 32px !important;
  object-fit: cover;
  border-radius: 0.3rem;
  flex: 0 0 32px;
  background: #f3f4f6;
}

.searchCatCard span {
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.searchHistoryEmpty {
  color: #9ca3af;
  font-size: 0.9rem;
  margin: 0;
}

.searchHistoryList {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.searchHistoryItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.15rem;
  text-decoration: none !important;
  color: #4b5563 !important;
  font-size: 0.9rem;
}

.searchHistoryItem:hover {
  color: #111 !important;
}

.searchHistoryRemove,
.searchHistoryClear {
  border: 0;
  background: transparent;
  color: var(--redColor, #760000);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.searchHistoryRemove {
  color: #9ca3af;
  font-size: 1rem;
  line-height: 1;
}

.searchHistoryRemove:hover {
  color: #ef4444;
}

.searchHistoryItem a {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
  text-decoration: none !important;
  color: inherit !important;
}

.searchHistoryName {
  font-weight: 500;
  color: #374151;
}

.searchHistoryType,
.searchResultType {
  font-size: 0.72rem;
  color: #9ca3af;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.searchResultMeta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.searchResultList {
  display: flex;
  flex-direction: column;
  margin: -0.25rem -0.15rem;
}
.searchResultItem {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.4rem;
  text-decoration: none !important;
  color: #111 !important;
  border-radius: 0.4rem;
}

.searchResultItem:hover,
.searchResultItem.is-active {
  background:#e5e7eb;
}

.searchResultThumb {
  width: 42px !important;
  height: 42px !important;
  border-radius: 0.4rem;
  object-fit: cover;
  background: #eee;
  flex: 0 0 42px;
}

.searchResultName {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.searchResultEmpty {
  padding: 0.75rem 0.25rem;
  color: #6b7280;
  font-size: 0.92rem;
}

@media (max-width: 767.98px) {
  .searchCatGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .searchSuggestBox {
    top: 0rem;
    padding: 10px 10px;
}
  .js-search-suggest-list {
    max-height: min(70vh, 28rem);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--redColor, #760000) #f0f0f0;
}
.searchClose {
    right: 1rem;
    top: 3px;
    padding: 0;
}
.searchBar {
    font-size: 14px;
    padding: 0.7rem 0.5rem 0.7rem 2rem;
    background-position: 0.8rem center;
    background-size: 1.2rem auto;
}
.mb-4 {
    margin-bottom: 0.5rem !important;
}
}