* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Argentum', sans-serif; background: #fdfdfd; color: #202020; }

.search-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0);
  animation: overlay-in .3s ease-out forwards;
}
.search-overlay.closing {
  animation: overlay-out 0.3s ease forwards;
}
@keyframes overlay-out {
  from { background: rgba(0,0,0,.5); }
  to   { background: rgba(0,0,0,0); }
}

.search-panel.closing {
  animation: slide-up 0.3s ease forwards;
}

@keyframes slide-up {
  from { transform: translateY(0); }
  to   { transform: translateY(-100%); }
}

@keyframes overlay-in { to { background: rgba(0,0,0,.5); } }

.search-panel {
  position: absolute; top: 0; left: 0; right: 0;
  background: #fdfdfd; max-height: 80vh; overflow-y: auto;
  animation: slide-down .35s cubic-bezier(.16,1,.3,1) forwards;
  transform: translateY(-100%);
}
@keyframes slide-down { to { transform: translateY(0); } }

.search-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 35px; border-bottom: 1px solid #ccc;
}
.search-input-wrap {
  flex: 1; display: flex; align-items: center; gap: 12px;
}
.search-icon { flex-shrink: 0; }
.search-input-wrap input {
  flex: 1; background: transparent; border: none;
  font-size: 16px; font-family: inherit; color: #202020;
  outline: none;
}
.search-input-wrap input::placeholder { color: #aaa; }

.close-btn {
  background: none; border: none; font-size: 28px;
  cursor: pointer; color: #202020; line-height: 1;
  transition: opacity .2s;
}
.close-btn:hover { opacity: .5; }

.search-results { padding: 24px 35px; }
.search-hint { color: #888; font-size: 13px; text-align: center; padding: 20px 0; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.result-card {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s;
}
.result-card:hover { transform: translateY(-4px); }
.result-card img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  background: #f5f5f5;
}
.result-card h3 { font-weight: 800; font-size: 13px; margin-top: 8px; }
.result-card .series { color: #888; font-size: 11px; margin-top: 2px; }
.result-card .price-row { font-size: 14px; line-height: 18px; margin-top: 4px; }
.result-card .price-row:has(.old) { font-size: 16px; line-height: 18px; }
.result-card .price-row .sale { color: #ba3d3d; font-weight: 700; }
.result-card .price-row .price-sep { color: #858585; font-weight: 400; }
.result-card .price-row .old { color: #858585; font-weight: 500; text-decoration: line-through; }
.no-results { color: #888; font-size: 13px; text-align: center; padding: 40px 0; }

@media (max-width: 640px) {
  .search-header { padding: 16px 16px; }
  .search-results { padding: 16px; }
  .results-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
