/* ── SAEBA SEARCH OVERLAY ── */

.hm-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.hm-search-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Backdrop */
.hm-search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 43, 58, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Modal */
.hm-search-modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  background: #f2f5f7;
  border-radius: 2px;
  overflow: hidden;
  transform: translateY(-12px);
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}
.hm-search-overlay.active .hm-search-modal {
  transform: translateY(0);
}

/* Search bar */
.hm-search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 0.5px solid rgba(28, 43, 58, 0.1);
  background: #f2f5f7;
  flex-shrink: 0;
}
.hm-search-bar svg {
  color: rgba(28, 43, 58, 0.35);
  flex-shrink: 0;
}
.hm-search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: #1c2b3a;
}
.hm-search-bar input::placeholder {
  color: rgba(28, 43, 58, 0.3);
}
.hm-search-close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(28, 43, 58, 0.35);
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color 0.2s;
  flex-shrink: 0;
}
.hm-search-close:hover { color: #1c2b3a; }

/* Body */
.hm-search-body {
  padding: 24px;
  overflow-y: auto;
}

.hm-search-hint {
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(28, 43, 58, 0.35);
  text-align: center;
  padding: 24px 0;
}
.hm-searching { animation: hmPulse 1s ease-in-out infinite; }
@keyframes hmPulse { 0%,100%{opacity:0.35;} 50%{opacity:0.7;} }

.hm-search-label {
  font-family: 'Jost', sans-serif;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(28, 43, 58, 0.4);
  margin-bottom: 16px;
}

/* Product grid */
.hm-search-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.hm-search-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.hm-search-card-img {
  aspect-ratio: 1/1;
  background: #fff;
  border: 0.5px solid rgba(28, 43, 58, 0.07);
  overflow: hidden;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hm-search-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.3s ease;
}
.hm-search-card:hover .hm-search-card-img img { transform: scale(1.04); }
.hm-search-no-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #dde8ee, #c8d8e2);
}
.hm-search-card-info { padding: 0 2px; }
.hm-search-card-name {
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #1c2b3a;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hm-search-card-price {
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  color: rgba(28, 43, 58, 0.55);
}

@media (max-width: 768px) {
  .hm-search-overlay { padding-top: 20px; align-items: flex-start; }
  .hm-search-modal { max-width: 100%; border-radius: 0; max-height: 100vh; }
  .hm-search-grid { grid-template-columns: repeat(2, 1fr); }
}
