/* Búsqueda en vivo */
.search { position: relative; }
.search.loading::after { content: ""; position: absolute; right: 74px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 2px solid #ccc; border-top-color: #555; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.search-results { position: absolute; z-index: 45; top: calc(100% + 10px); left: 0; right: 0; background: #2a2a2d; color: var(--fg); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.55); padding: 8px; max-height: min(70vh, 520px); overflow-y: auto; animation: pop .14s ease-out; }
.search-results[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.sr-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 10px 12px 4px; }
.sr-item { display: flex; align-items: center; gap: 14px; padding: 8px 12px; border-radius: 12px; color: var(--fg); }
.sr-item:hover, .sr-item.active { background: #3a3a3f; color: var(--fg); }
.sr-thumb { flex: none; width: 52px; height: 64px; border-radius: 8px; background: #444; overflow: hidden; }
.sr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sr-body { flex: 1; min-width: 0; display: grid; }
.sr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-sub { font-size: .8rem; color: var(--muted); }
.sr-price { flex: none; text-align: right; display: grid; font-size: .9rem; }
.sr-price s { color: var(--muted); font-size: .78rem; }
.sr-price strong { font-weight: 500; }
.sr-sold { color: var(--muted); }
.sr-chip { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #444; display: grid; place-items: center; color: var(--accent); }
.sr-cat { padding-top: 6px; padding-bottom: 6px; }
.sr-all { justify-content: center; margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; padding: 14px; font-weight: 500; color: var(--accent); }
.sr-empty { padding: 22px 16px; text-align: center; color: var(--muted); }
.search-results mark { background: rgba(201, 184, 255, .28); color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 960px) { .search-results { border-radius: 14px; } }
