/* Buscador con sugerencias (public/js/buscador.js) */
.js-search-form { position: relative; }

.sx-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 400px);
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(20, 30, 50, .14);
  z-index: 100000;
  overflow: hidden;
  text-align: left;
  font-size: 14px;
  line-height: 1.4;
}
.sx-panel[hidden] { display: none; }
.sx-panel.sx-right { left: auto; right: 0; }

.sx-section { padding: 6px 0; }
.sx-section + .sx-section { border-top: 1px solid #eef1f5; }
.sx-label {
  padding: 6px 14px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a94a6;
}

.sx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  color: #1f2a3c;
  text-decoration: none !important;
  cursor: pointer;
}
.sx-item:hover, .sx-item.sx-active { background: #f2f7fb; color: #1f2a3c; }
.sx-thumb {
  flex: 0 0 52px;
  width: 52px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: #eef2f6;
}
.sx-body { flex: 1 1 auto; min-width: 0; }
.sx-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
}
.sx-name mark { background: none; padding: 0; color: inherit; font-weight: 700; }
.sx-meta { font-size: 12px; color: #8a94a6; margin-top: 2px; }
.sx-price {
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--sx-accent, #1fb5e8);
  white-space: nowrap;
}

.sx-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 14px 10px; }
.sx-chip, .search-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid #dfe5ec;
  border-radius: 999px;
  color: #3b4659;
  background: #fff;
  font-size: 13px;
  text-decoration: none !important;
  cursor: pointer;
}
.sx-chip:hover, .sx-chip.sx-active, .search-chip:hover {
  border-color: var(--sx-accent, #1fb5e8);
  color: var(--sx-accent, #1fb5e8);
}
.sx-chip .sx-x { color: #a0a9b8; font-size: 15px; line-height: 1; }

.sx-all {
  display: block;
  padding: 11px 14px;
  border-top: 1px solid #eef1f5;
  color: var(--sx-accent, #1fb5e8) !important;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
}
.sx-all:hover, .sx-all.sx-active { background: #f2f7fb; }

.sx-note { padding: 8px 14px 2px; color: #5b6578; }
.sx-note a { color: var(--sx-accent, #1fb5e8); font-weight: 600; cursor: pointer; }
.sx-empty { padding: 14px; color: #5b6578; }
.sx-loading { padding: 14px; color: #8a94a6; }

/* encabezado de resultados en /tienda?q= */
.search-summary {
  background: #fff;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(20, 30, 50, .05);
}
.search-summary__title { margin: 0; font-size: 16px; color: #1f2a3c; }
.search-summary__clear { margin-left: 12px; font-size: 13px; color: var(--sx-accent, #1fb5e8); white-space: nowrap; }
.search-summary__note { margin: 8px 0 0; color: #5b6578; }
.search-summary__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

@media (max-width: 767px) {
  .sx-panel { width: calc(100vw - 24px); }
  .sx-item { padding: 10px 12px; }
}

/* el buscador del menu ya tiene su lupa: sin la "x" nativa del navegador encima */
.mainmenu__search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.mainmenu__search input[type="search"] { -webkit-appearance: none; }
