/**
 * Live search overlay — Figma demo-b · Search (en uso) `198:6396`.
 * Thumbs MUST be square (40×40); MUST NOT stretch product images.
 */

.hdr-search,
.header-search {
  position: relative;
  z-index: 1;
}

.hdr-search.is-live-open .search-box,
.header-search.is-live-open .search-box {
  border-color: var(--dpy-magenta, #e91e8c);
  box-shadow: 0 0 0 1px var(--dpy-magenta, #e91e8c);
}

body.dpy-live-search-open #main-header.dpy-chrome-header,
body.dpy-demo-b.dpy-live-search-open #main-header {
  z-index: 1110 !important;
  position: relative;
}

.dpy-live-search {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 2;
  background: #fff;
  border: 1px solid #e0e3e8;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(17, 18, 28, 0.16);
  overflow: hidden;
  font-family: 'Open Sans', sans-serif;
  pointer-events: auto;
}

.dpy-live-search[hidden] {
  display: none !important;
}

.dpy-live-search__scrim {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(17, 18, 28, 0.28);
  pointer-events: auto;
}

.dpy-live-search__scrim[hidden] {
  display: none !important;
}

.dpy-live-search__meta {
  padding: 12px 16px;
  font-size: 12px;
  color: #6b7380;
  border-bottom: 1px solid #eef0f3;
}

.dpy-live-search__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.dpy-live-search__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 16px;
  border-bottom: 1px solid #f0f2f5;
  box-sizing: border-box;
  min-height: 60px;
}

.dpy-live-search__row.is-active,
.dpy-live-search__row:hover {
  background: #f7f8fa;
}

.dpy-live-search__hit {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 2px 0;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.dpy-live-search__hit:hover,
.dpy-live-search__hit.is-active {
  background: transparent;
}

.dpy-live-search__add {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: none;
  background: var(--dpy-magenta, #e91e8c);
  color: #fff !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}

.dpy-live-search__add:hover {
  background: var(--dpy-magenta-dark, #c2185b);
  color: #fff !important;
}

.dpy-live-search__add.loading,
.dpy-live-search__add.added {
  opacity: 0.75;
  pointer-events: none;
}

.dpy-live-search__thumb {
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  border-radius: 4px;
  background: #f3f3f4;
  overflow: hidden;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa0a8;
}

.dpy-live-search__thumb img,
.dpy-live-search-thumb-img {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.dpy-live-search__thumb .material-icons {
  font-size: 22px;
}

.dpy-live-search__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dpy-live-search__title {
  font-size: 13px;
  font-weight: 700;
  color: #1a1c1c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dpy-live-search__category {
  font-size: 12px;
  color: #6b7380;
}

.dpy-live-search__price {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--dpy-magenta, #e91e8c);
  margin-left: auto;
}

.dpy-live-search__all {
  display: block;
  padding: 14px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--dpy-magenta, #e91e8c);
  text-decoration: none;
  border-top: 1px solid #eef0f3;
}

.dpy-live-search__all:hover {
  background: #fff0f6;
  color: var(--dpy-magenta-dark, #c2185b);
}

.dpy-live-search__empty {
  margin: 0;
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: #6b7380;
}

.dpy-live-search__loading {
  margin: 0;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: #6b7380;
}

@media (max-width: 768px) {
  .dpy-live-search {
    left: -8px;
    right: -8px;
  }
}
