/* ==========================================
   HEADER SEARCH DROPDOWN PREMIUM
========================================== */

.header-search-wrap {
  position: relative !important;
}

.search-toggle-btn {
  border: none;
  outline: none;
  padding: 0;
}

.header-search-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 360px;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.14);
  padding: 14px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
}

.header-search-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-search-box {
  width: 100%;
}

.header-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f8f8;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 0 12px;
  height: 52px;
  transition: all 0.25s ease;
}

.header-search-input-wrap:focus-within {
  border-color: #ca1515;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(202, 21, 21, 0.08);
}

.header-search-input-wrap i {
  color: #777;
  font-size: 14px;
}

#headerSearchInput {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  height: 100%;
  font-size: 14px;
  color: #111;
  padding: 0;
}

#headerSearchInput::placeholder {
  color: #9a9a9a;
}

.header-search-clear {
  width: 30px;
  height: 30px;
  border: none;
  background: #ececec;
  color: #666;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-search-clear:hover {
  background: #ca1515;
  color: #fff;
}

.header-search-results {
  margin-top: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.header-search-results::-webkit-scrollbar {
  width: 6px;
}

.header-search-results::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}

.header-search-empty,
.header-search-loading,
.header-search-noresults,
.header-search-error {
  text-align: center;
  font-size: 13px;
  color: #666;
  padding: 20px 12px;
  border-radius: 14px;
  background: #fafafa;
}

.header-search-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.header-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #f1f1f1;
  transition: all 0.22s ease;
  text-decoration: none;
}

.header-search-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.08);
  border-color: rgba(202, 21, 21, 0.16);
}

.header-search-thumb {
  width: 62px;
  height: 74px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f4f4f4;
}

.header-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-search-info {
  min-width: 0;
  flex: 1;
}

.header-search-title {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  line-height: 1.45;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.header-search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.header-search-price {
  font-size: 14px;
  font-weight: 800;
  color: #ca1515;
}

.header-search-price-old {
  font-size: 12px;
  color: #9b9b9b;
  text-decoration: line-through;
  margin-left: 6px;
}

.header-search-arrow {
  color: #888;
  font-size: 13px;
  flex-shrink: 0;
}

.header-search-item:hover .header-search-arrow {
  color: #ca1515;
}

@media (max-width: 768px) {
  .header-search-dropdown {
    width: 320px;
    right: -20px;
  }
}

@media (max-width: 575px) {
  .header-search-dropdown {
    width: 290px;
    right: -35px;
    padding: 12px;
  }

  .header-search-thumb {
    width: 56px;
    height: 68px;
  }

  .header-search-title {
    font-size: 12px;
  }
}