/* Buscador de productos GEL — módulo para el sitio existente (Bootstrap / Bootstrap Icons) */
:root {
  --gelb-red: var(--heading-color, #cd0000);
  --gelb-teal: var(--accent-color, #1dc8cd);
  --gelb-teal-soft: #e9f7f8;
  --gelb-ink: #212529;
  --gelb-muted: #6c757d;
  --gelb-line: #e3e7ea;
}

/* Botón en el header */
#header .navmenu { margin-left: auto; }
.gelb-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: 16px; height: 40px; padding: 0 12px;
  border: 1px solid var(--gelb-line); border-radius: 50px;
  background: #fff; color: var(--gelb-muted); font-size: 14px; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.gelb-trigger:hover { border-color: var(--gelb-teal); color: var(--gelb-ink); }
.gelb-trigger .bi { font-size: 16px; color: var(--gelb-red); }
.gelb-trigger kbd {
  font: 11px/1 ui-monospace, monospace; padding: 3px 6px; border-radius: 4px;
  background: #f1f3f5; color: var(--gelb-muted); border: 1px solid var(--gelb-line);
}
@media (max-width: 1199px) {
  .gelb-trigger { margin-left: 0; margin-right: 12px; order: 1; width: 40px; padding: 0; justify-content: center; }
  .gelb-trigger .gelb-lbl, .gelb-trigger kbd { display: none; }
  #header .navmenu { margin-left: 0; order: 2; }
  #header .logo { margin-right: auto; }
}

/* Barra en línea (filtra las tarjetas de Prevención y Mantenimiento) */
.gelb-inline { padding: 40px 0 0; background: var(--background-color, #fff); }
.gelb-inline .gelb-box { max-width: 720px; margin: 0 auto; text-align: center; }
.gelb-inline h3 { font-size: 22px; font-weight: 700; color: var(--gelb-red); margin: 0 0 6px; }
.gelb-inline p { color: var(--gelb-muted); margin: 0 0 16px; }
.gelb-field { position: relative; }
.gelb-field .bi-search { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--gelb-muted); font-size: 18px; pointer-events: none; }
.gelb-field input {
  width: 100%; height: 56px; padding: 0 48px 0 52px; font-size: 16px;
  border: 2px solid var(--gelb-line); border-radius: 50px; outline: none; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.gelb-field input:focus { border-color: var(--gelb-teal); box-shadow: 0 0 0 4px rgba(29, 200, 205, .15); }
.gelb-field input::-webkit-search-cancel-button { display: none; }
.gelb-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f1f3f5; color: var(--gelb-muted);
  display: none; align-items: center; justify-content: center; cursor: pointer;
}
.gelb-field.has-value .gelb-clear { display: flex; }
.gelb-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.gelb-chip {
  border: 1px solid var(--gelb-line); background: #fff; border-radius: 50px;
  padding: 5px 14px; font-size: 14px; color: var(--gelb-ink); cursor: pointer; transition: all .2s;
}
.gelb-chip:hover { border-color: var(--gelb-teal); color: var(--gelb-teal); }
.gelb-status { margin-top: 12px; font-size: 14px; color: var(--gelb-muted); min-height: 21px; }
.gelb-status b { color: var(--gelb-ink); }

/* Estado de las tarjetas filtradas */
.gelb-hidden { display: none !important; }
.gelb-empty {
  text-align: center; padding: 32px 16px; border: 2px dashed var(--gelb-line); border-radius: 12px;
  color: var(--gelb-muted); background: #fff;
}
.gelb-empty a { color: var(--gelb-red); font-weight: 600; }
mark.gelb-mark { background: #fff3a3; color: inherit; padding: 0 1px; border-radius: 2px; }
.gelb-flash .feature-card { animation: gelb-flash 2s ease; }
@keyframes gelb-flash {
  0%, 60% { box-shadow: 0 0 0 4px var(--gelb-teal), 0 10px 30px rgba(0, 0, 0, .12); }
  100% { box-shadow: none; }
}

/* Ventana de búsqueda (⌘K / Ctrl K / "/") */
.gelb-modal { position: fixed; inset: 0; z-index: 99999; display: none; }
.gelb-modal.open { display: block; }
.gelb-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.gelb-panel {
  position: relative; width: min(640px, calc(100vw - 32px)); margin: 10vh auto 0;
  background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); overflow: hidden;
}
.gelb-panel .gelb-head { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--gelb-line); }
.gelb-panel .gelb-head .bi-search { color: var(--gelb-red); font-size: 18px; }
.gelb-panel .gelb-head input { flex: 1; height: 58px; border: 0; outline: none; font-size: 17px; }
.gelb-panel .gelb-close { border: 0; background: #f1f3f5; border-radius: 6px; font-size: 12px; padding: 4px 8px; color: var(--gelb-muted); cursor: pointer; }
.gelb-list { list-style: none; margin: 0; padding: 8px; max-height: min(60vh, 440px); overflow: auto; }
.gelb-list li { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.gelb-list li[aria-selected="true"] { background: var(--gelb-teal-soft); }
.gelb-list img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; background: #f1f3f5; }
.gelb-list .gelb-tx { min-width: 0; flex: 1; }
.gelb-list .gelb-t { font-weight: 600; color: var(--gelb-ink); font-size: 15px; }
.gelb-list .gelb-s { font-size: 13px; color: var(--gelb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gelb-list .gelb-cat { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--gelb-teal); flex: none; }
.gelb-list .gelb-none { display: block; text-align: center; color: var(--gelb-muted); padding: 24px 12px; cursor: default; }
.gelb-list .gelb-none a { color: var(--gelb-red); font-weight: 600; }
.gelb-foot { display: flex; gap: 16px; padding: 10px 16px; font-size: 12px; color: var(--gelb-muted); background: #f8f9fa; border-top: 1px solid var(--gelb-line); }
@media (max-width: 600px) {
  .gelb-panel { margin-top: 12px; }
  .gelb-foot { display: none; }
  .gelb-list .gelb-cat { display: none; }
}
