/* =========================================================
   TAHM — SEARCH: dropdown, header panel, mobile
   ========================================================= */

.tahm-search-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  max-height: 420px; overflow-y: auto; background: #fff;
  border: 1px solid var(--tahm-line); border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.10); z-index: 300;
}
.tahm-search-state {
  padding: 20px 18px; text-align: center; color: var(--tahm-muted); font-size: 14px;
}
.tahm-search-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px;
  color: var(--tahm-text); transition: background 0.15s ease;
  border-bottom: 1px solid #f4f4f4;
}
.tahm-search-item:last-of-type { border-bottom: none; }
.tahm-search-item:hover, .tahm-search-item.is-active { background: #f6fbff; }

.tahm-search-item__img {
  width: 48px; height: 48px; object-fit: contain;
  border-radius: 8px; background: #fbfcfd; flex-shrink: 0;
}
.tahm-search-item__body { flex: 1; min-width: 0; }
.tahm-search-item__title {
  font-size: 14px; font-weight: 600; color: var(--tahm-heading);
  line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tahm-search-item__sku { font-size: 12px; color: var(--tahm-muted); margin-top: 2px; }
.tahm-search-item__price {
  flex-shrink: 0; font-size: 15px; font-weight: 700;
  color: var(--tahm-blue-dark); white-space: nowrap;
}
.tahm-search-more {
  display: block; padding: 14px 18px; text-align: center;
  font-size: 14px; font-weight: 700; color: var(--tahm-blue-dark);
  border-top: 1px solid var(--tahm-line); transition: background 0.15s ease;
}
.tahm-search-more:hover { background: #f6fbff; }

/* Header search panel */
.tahm-header-search .tahm-search { border-radius: 16px; }
.tahm-header-search .tahm-search input { min-height: 50px; font-size: 15px; }
.tahm-header-search .tahm-search button { min-height: 50px; padding: 0 18px; font-size: 14px; }

@media (max-width: 768px) {
  .tahm-search-dropdown { max-height: 60vh; border-radius: 12px; }
  .tahm-search-item { padding: 10px 14px; gap: 10px; }
  .tahm-search-item__img { width: 40px; height: 40px; }

  .tahm-offcanvas .tahm-search {
    grid-template-columns: 1fr; gap: 8px; padding: 0;
    border: none; box-shadow: none; max-width: none;
  }
  .tahm-offcanvas .tahm-search input { min-height: 48px; border-radius: 12px; }
  .tahm-offcanvas .tahm-search button { min-height: 48px; border-radius: 12px; }
}
