/* Highend Buscador v1.0.0 */
.heb {
  --heb-bg: #0c0c0c;
  --heb-panel: #121212;
  --heb-line: rgba(255, 255, 255, .09);
  --heb-text: #ece8e1;
  --heb-muted: #9a958c;
  --heb-gold: #ab8a62;
  --heb-gold-2: #c9a979;
  --heb-head: "Barlow Condensed", "Oswald", system-ui, sans-serif;
  --heb-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  position: fixed; inset: 0; z-index: 2147483000;
  font-family: var(--heb-body); color: var(--heb-text);
  -webkit-font-smoothing: antialiased;
}
.heb[hidden] { display: none !important; }
.heb *, .heb *::before, .heb *::after { box-sizing: border-box; }
html.heb-lock, html.heb-lock body { overflow: hidden !important; }

.heb-backdrop {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s ease;
}
.heb-panel {
  position: relative; margin: 4vh auto 0; width: min(1180px, calc(100% - 32px));
  max-height: 92vh; display: flex; flex-direction: column;
  background: var(--heb-panel); border: 1px solid var(--heb-line); border-radius: 6px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(-12px); transition: opacity .2s ease, transform .2s ease;
  overflow: hidden;
}
.heb.is-open .heb-backdrop { opacity: 1; }
.heb.is-open .heb-panel { opacity: 1; transform: none; }

/* Barra */
.heb-bar {
  display: flex; align-items: center; gap: 14px; padding: 18px 22px;
  border-bottom: 1px solid var(--heb-line); background: var(--heb-bg);
}
.heb-bar-icon svg, .heb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.heb-bar-icon { color: var(--heb-gold); display: flex; }
.heb .heb-input {
  flex: 1; min-width: 0; height: 44px; margin: 0; padding: 0 !important;
  background: transparent !important; border: 0 !important; outline: 0 !important; box-shadow: none !important;
  color: var(--heb-text) !important; font: 400 22px/1.2 var(--heb-body) !important; letter-spacing: .01em;
  -webkit-appearance: none; appearance: none;
}
.heb .heb-input::placeholder { color: #6f6a63; }
.heb .heb-input::-webkit-search-cancel-button { display: none; }
.heb button { font-family: inherit; cursor: pointer; }
.heb .heb-clear, .heb .heb-close {
  background: transparent !important; border: 0 !important; color: var(--heb-muted) !important;
  font-size: 13px; padding: 6px 8px !important; border-radius: 4px; line-height: 1; box-shadow: none !important;
}
.heb .heb-clear:hover, .heb .heb-close:hover { color: var(--heb-text) !important; }
.heb-kbd { border: 1px solid var(--heb-line); border-radius: 4px; padding: 3px 7px; font-size: 11px; letter-spacing: .06em; }
.heb-x { display: none; font-size: 28px; line-height: 1; }

/* Cuerpo */
.heb-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; min-height: 180px; }
.heb h3 {
  margin: 0 0 12px; font: 500 13px/1 var(--heb-head); letter-spacing: .18em; text-transform: uppercase;
  color: var(--heb-gold);
}
.heb a { color: inherit; text-decoration: none; }
.heb mark { background: none; color: var(--heb-gold-2); font-weight: 700; padding: 0; }
.heb-muted { color: var(--heb-muted); font-size: 14px; }
.heb-pad { padding: 24px 0; }

/* Estado inicial */
.heb-start { padding: 26px 26px 18px; display: grid; gap: 28px; }
.heb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.heb-chips--center { justify-content: center; margin-top: 18px; }
.heb .heb-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent !important; color: var(--heb-text) !important;
  border: 1px solid var(--heb-line) !important; border-radius: 999px !important;
  padding: 8px 14px !important; font: 400 14px/1 var(--heb-body) !important; letter-spacing: 0; text-transform: none;
  transition: border-color .15s, background .15s, color .15s; box-shadow: none !important; min-height: 0;
}
.heb .heb-chip svg { width: 15px; height: 15px; color: var(--heb-muted); }
.heb .heb-chip em { font-style: normal; color: var(--heb-muted); font-size: 12px; }
.heb .heb-chip:hover, .heb .heb-chip.is-active { border-color: var(--heb-gold) !important; }
.heb .heb-chip.is-on { background: var(--heb-gold) !important; border-color: var(--heb-gold) !important; color: #111 !important; }
.heb .heb-chip.is-on em { color: rgba(0, 0, 0, .6); }
.heb .heb-chip--gold { border-color: var(--heb-gold) !important; color: var(--heb-gold-2) !important; }

.heb-brands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--heb-line); border: 1px solid var(--heb-line); }
.heb-brandtile {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 74px; padding: 10px;
  background: var(--heb-panel); font: 400 21px/1.1 var(--heb-head); letter-spacing: .12em; text-transform: uppercase;
  transition: background .15s, color .15s;
}
.heb-brandtile:hover, .heb-brandtile.is-active { background: #1b1915; color: var(--heb-gold-2); }
.heb-explore { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
.heb-explore a {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 2px;
  border-bottom: 1px solid var(--heb-line); font-size: 15px;
}
.heb-explore a svg { width: 16px; height: 16px; color: var(--heb-muted); transition: transform .15s, color .15s; }
.heb-explore a:hover svg, .heb-explore a.is-active svg { transform: translateX(3px); color: var(--heb-gold); }
.heb-tip { margin: 0; color: #6f6a63; font-size: 13px; }

/* Resultados */
.heb-results { display: grid; grid-template-columns: 250px 1fr; min-height: 300px; }
.heb-results--full { grid-template-columns: 1fr; }
.heb-side { padding: 22px 20px; border-right: 1px solid var(--heb-line); background: var(--heb-bg); display: grid; gap: 26px; align-content: start; }
.heb-link {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 8px 10px; margin: 0 -10px;
  border-radius: 4px; font-size: 15px; transition: background .15s;
}
.heb-link small { color: var(--heb-muted); font-size: 12px; }
.heb-link em { font-style: normal; color: var(--heb-muted); font-size: 12px; }
.heb-link:hover, .heb-link.is-active { background: #1c1a17; }
.heb-main { padding: 20px 24px 28px; min-width: 0; }
.heb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.heb-head p { margin: 0; color: var(--heb-muted); font-size: 14px; }
.heb-head strong { color: var(--heb-text); }
.heb-all {
  display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--heb-gold-2) !important;
  font: 500 13px/1 var(--heb-head); letter-spacing: .14em; text-transform: uppercase; padding: 6px 0;
}
.heb-all svg { width: 15px; height: 15px; }
.heb-all:hover, .heb-all.is-active { color: #fff !important; }
.heb-facets { margin-bottom: 10px; }
.heb-facets--brand { margin-bottom: 18px; }

.heb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px 16px; }
.heb-card { display: flex; flex-direction: column; gap: 10px; border-radius: 4px; outline: 0; }
.heb-img {
  position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1;
  background: #fff; border-radius: 3px; overflow: hidden; outline: 1px solid transparent; transition: outline-color .15s;
}
.heb-img img { width: 86%; height: 86%; object-fit: contain; transition: transform .35s ease; }
.heb-noimg { font: 400 44px/1 var(--heb-head); color: #bbb; }
.heb-card:hover .heb-img img, .heb-card.is-active .heb-img img { transform: scale(1.05); }
.heb-card:hover .heb-img, .heb-card.is-active .heb-img { outline: 2px solid var(--heb-gold); outline-offset: 2px; }
.heb-meta { display: flex; flex-direction: column; gap: 3px; }
.heb-brand { font: 500 12px/1.2 var(--heb-head); letter-spacing: .16em; text-transform: uppercase; color: var(--heb-gold); }
.heb-title { font-size: 14px; line-height: 1.35; color: var(--heb-text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.heb-cat { font-size: 12px; color: var(--heb-muted); }
.heb-morewrap { text-align: center; margin-top: 26px; }
.heb .heb-more {
  background: transparent !important; color: var(--heb-text) !important; border: 1px solid var(--heb-gold) !important; border-radius: 2px !important;
  padding: 12px 26px !important; font: 500 13px/1 var(--heb-head) !important; letter-spacing: .16em; text-transform: uppercase; box-shadow: none !important;
}
.heb .heb-more:hover { background: var(--heb-gold) !important; color: #111 !important; }

/* Sin resultados */
.heb-empty { padding: 48px 24px 40px; text-align: center; max-width: 620px; margin: 0 auto; }
.heb-empty h3 { font-size: 15px; color: var(--heb-text); letter-spacing: .12em; }
.heb-empty p { margin: 10px 0; }
.heb-wa {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 12px 22px;
  border: 1px solid var(--heb-gold); border-radius: 2px; color: var(--heb-gold-2) !important;
  font: 500 13px/1 var(--heb-head); letter-spacing: .14em; text-transform: uppercase;
}
.heb-wa:hover, .heb-wa.is-active { background: var(--heb-gold); color: #111 !important; }
.heb-wa svg { width: 17px; height: 17px; }

/* Cargando */
.heb-loading { display: flex; justify-content: center; gap: 6px; padding: 70px 0; }
.heb-loading span { width: 6px; height: 6px; border-radius: 50%; background: var(--heb-gold); animation: heb-pulse 1s infinite ease-in-out; }
.heb-loading span:nth-child(2) { animation-delay: .15s; }
.heb-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes heb-pulse { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

.heb .is-active:focus-visible, .heb a:focus-visible, .heb button:focus-visible { outline: 2px solid var(--heb-gold); outline-offset: 2px; }

/* Móvil */
@media (max-width: 767px) {
  .heb-panel { margin: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
  .heb-bar { padding: 10px 12px 10px 16px; gap: 10px; }
  .heb .heb-input { font-size: 18px !important; }
  .heb-kbd { display: none; }
  .heb-x { display: block; }
  .heb-start { padding: 20px 16px; gap: 24px; }
  .heb-brands { grid-template-columns: repeat(2, 1fr); }
  .heb-brandtile { min-height: 60px; font-size: 18px; }
  .heb-explore { grid-template-columns: 1fr; }
  .heb-results { grid-template-columns: 1fr; }
  .heb-side { border-right: 0; border-bottom: 1px solid var(--heb-line); padding: 14px 16px; gap: 14px; }
  .heb-side section { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; align-items: center; }
  .heb-side section::-webkit-scrollbar { display: none; }
  .heb-side h3 { margin: 0 6px 0 0; flex: none; font-size: 11px; }
  .heb-link { flex: none; margin: 0; border: 1px solid var(--heb-line); border-radius: 999px; padding: 7px 12px; font-size: 14px; white-space: nowrap; }
  .heb-main { padding: 14px 16px 28px; }
  .heb-facets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .heb-facets::-webkit-scrollbar { display: none; }
  .heb .heb-facets .heb-chip { flex: none; white-space: nowrap; }
  .heb-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .heb-title { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .heb-backdrop, .heb-panel, .heb-img img { transition: none; }
}
