/* ========== SEARCH OVERLAY ========== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 20001;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  will-change: opacity;
  display: flex;
  justify-content: center;
}
.search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.search-overlay-inner {
  width: 100%;
  max-width: 720px;
  margin: 60px 24px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
}
.search-overlay-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.search-overlay-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-header-bg);
  border: none;
  cursor: pointer;
  color: #fff;
  transition: opacity 0.2s;
}
.search-overlay-close:hover {
  opacity: 0.8;
}
.search-overlay-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  padding: 0 20px;
  border-bottom: 2px solid var(--color-accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.search-input-wrap svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-light);
  flex-shrink: 0;
}
.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: var(--font-body);
  padding: 18px 0;
  color: var(--color-text);
  background: transparent;
}
.search-input-wrap input::placeholder {
  color: #bbb;
}
.search-results {
  background: #fff;
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.search-results-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-light);
  font-size: 14px;
}
.search-group {
  padding: 8px 0;
}
.search-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}
.search-group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.search-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}
.search-item:hover {
  background: var(--color-bg-alt);
}
.search-item-img {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  overflow: hidden;
  border-radius: 4px;
}
.search-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.search-item-info {
  flex: 1;
  min-width: 0;
}
.search-item-title {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item-sub {
  font-size: 12px;
  color: var(--color-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary-dark);
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .search-overlay-inner {
    margin: 0;
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
  }
  .search-overlay-header {
    padding-top: 16px;
    padding-right: 16px;
  }
  .search-results {
    flex: 1;
    min-height: 0;
  }
}
