.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 92px 16px 28px;
  background: rgba(248, 251, 253, .82);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
}

.search-overlay.open {
  opacity: 1;
  visibility: visible;
}

.search-box {
  width: min(920px, 100%);
  max-height: calc(100vh - 118px);
  overflow: hidden;
  border: 1px solid #dbe7f0;
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .18);
}

.search-input-wrap {
  min-height: 64px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid #dbe7f0;
  background: #ffffff;
}

.search-input-wrap svg {
  width: 24px;
  height: 24px;
  stroke: #0798bd;
  fill: none;
  stroke-width: 1.8;
}

.search-input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 18px;
  font-weight: 650;
}

.search-input-wrap input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.search-close-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #64748b;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.search-close-btn:hover {
  background: #0798bd;
  transform: scale(1.04);
}

.search-results {
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  padding: 12px 0;
  background: #ffffff;
}

.search-results::-webkit-scrollbar {
  width: 8px;
}

.search-results::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.search-section-label {
  padding: 8px 28px 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.search-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 86px;
  padding: 10px 28px;
  color: #111827;
  text-decoration: none;
  transition: background .16s ease;
}

.search-item:hover {
  background: #f5fbfd;
}

.search-item-img,
.search-item-ph {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid #dbe7f0;
  background: #f8fbfd;
  object-fit: contain;
  display: grid;
  place-items: center;
  color: #0798bd;
  font-size: 22px;
  font-weight: 850;
}

.search-item-name {
  min-width: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
}

.search-item-price {
  color: #056f8d;
  font-size: 16px;
  font-weight: 850;
  white-space: nowrap;
}

.search-item-price-old {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
  text-decoration: line-through;
}

.search-empty {
  padding: 42px 28px;
  color: #64748b;
  text-align: center;
  font-size: 15px;
}

.search-footer {
  padding: 16px 28px 18px;
  border-top: 1px solid #e5edf4;
  text-align: center;
}

.search-footer a {
  color: #0798bd;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
}

.search-footer a:hover {
  text-decoration: underline;
}

.search-loading {
  padding: 34px;
  text-align: center;
}

.search-loading::after {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 3px solid #dbe7f0;
  border-top-color: #0798bd;
  display: inline-block;
  animation: search-spin .7s linear infinite;
}

@keyframes search-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 767.98px) {
  .search-overlay {
    padding: 152px 8px 18px;
    background: rgba(248, 251, 253, .92);
  }

  .search-box {
    max-height: calc(100vh - 166px);
    border-radius: 16px;
  }

  .search-input-wrap {
    min-height: 54px;
    grid-template-columns: 22px minmax(0, 1fr) 28px;
    gap: 9px;
    padding: 0 12px;
  }

  .search-input-wrap input {
    font-size: 16px;
  }

  .search-close-btn {
    width: 26px;
    height: 26px;
    font-size: 17px;
  }

  .search-results {
    max-height: calc(100vh - 228px);
  }

  .search-section-label {
    padding-left: 18px;
    padding-right: 18px;
  }

  .search-item {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    min-height: 78px;
    padding: 10px 18px;
  }

  .search-item-img,
  .search-item-ph {
    width: 58px;
    height: 58px;
  }

  .search-item-price {
    grid-column: 2;
    font-size: 15px;
  }
}
