/* ===== Search Wrapper ===== */
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
}

/* ===== Input ===== */
.search-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid var(--white-hover);
  outline: none;
}

.search-input:focus {
  border-color: #222;
}

/* ===== Dropdown ===== */
.search-dropdown {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  width: 100%;
  transform: translateX(0%);
  background: var(--bg-1);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 999;
  overflow: hidden;
}

/* Hide */
.search-dropdown.hidden {
  display: none;
}

/* ===== Results Container ===== */
.search-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}


/* ===== Single Item ===== */
.search-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  background: var(--white-hover);
  ;
  border: 1px solid #eee;
}

.search-item:hover {
  background: var(--text-4);
}


/* Image */
.search-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

/* Content */
.search-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-item-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.search-item-name mark {
  background: transparent;
  color: #e63946;
  font-weight: 700;
}

.search-item-code {
  font-size: 12px;
  color: #777;
}

.search-item-price {
  font-size: 13px;
  font-weight: 600;
}

/* ===== View All ===== */
.search-view-all {
  border-top: 1px solid #eee;
  padding: 10px;
  background: var(--bg-1);
  position: sticky;
  bottom: 0;
}

.search-view-all button {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: none;
  background: var(--black);
  color: var(--white);
  font-size: 14px;
  cursor: pointer;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    border-radius: 0;
    /* height: calc(100vh - 70px); */
  }

  .search-results {
    max-height: 300px
  }

  .search-results {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
  }


}