/* Qbit smart search dropdown */
.search_five_res:has(.qs-panel) {
  height: auto !important;
  display: block !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
}

.qs-panel {
  background: var(--qb-surface, #fff);
  border: 1px solid var(--qb-line, #e7ebf1);
  border-radius: var(--qb-radius, 14px);
  box-shadow: 0 18px 48px rgba(16, 36, 58, 0.16);
  max-height: min(72vh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 0 6px;
  color: var(--qb-ink, #162033);
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  scrollbar-width: thin;
}

.qs-panel mark {
  background: rgba(226, 74, 34, 0.14);
  color: var(--qb-orange-deep, #c73c16);
  font-weight: 600;
  border-radius: 3px;
  padding: 0 1px;
}

.qs-section { padding: 6px 14px 8px; }
.qs-section + .qs-section { border-top: 1px solid var(--qb-line, #e7ebf1); }

.qs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--qb-muted, #5e6b7c);
  margin: 4px 0 8px;
}

.qs-clear {
  border: 0;
  background: none;
  color: var(--qb-navy, #0e4568);
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  cursor: pointer;
  padding: 2px 4px;
}
.qs-clear:hover { color: var(--qb-orange, #e24a22); }

.qs-item { color: inherit; text-decoration: none; cursor: pointer; }
.qs-item:hover, .qs-item:focus { text-decoration: none; color: inherit; }

/* history */
.qs-hrow { display: flex; align-items: center; border-radius: var(--qb-radius-sm, 10px); }
.qs-hrow:hover, .qs-hrow:has(.qs-active) { background: var(--qb-soft, #eef3f8); }
.qs-history { flex: 1; display: flex; align-items: center; gap: 10px; padding: 7px 8px; min-width: 0; }
.qs-history span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-hdel {
  border: 0; background: none; color: var(--qb-muted, #5e6b7c);
  font-size: 18px; line-height: 1; width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
}
.qs-hdel:hover { color: var(--qb-orange, #e24a22); background: #fff; }
.qs-hist-inline { padding-top: 2px; padding-bottom: 2px; }

.qs-ico {
  width: 16px; height: 16px; flex: 0 0 16px;
  fill: none; stroke: var(--qb-muted, #5e6b7c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* tip */
.qs-tip {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 4px 14px 8px; padding: 10px 12px;
  background: var(--qb-soft, #eef3f8); border-radius: var(--qb-radius-sm, 10px);
  color: var(--qb-navy, #0e4568); font-size: 13px;
}
.qs-tip .qs-ico { stroke: var(--qb-navy, #0e4568); margin-top: 1px; }

/* chips */
.qs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qs-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--qb-line, #e7ebf1);
  font-size: 13px; white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.qs-chip img { width: 20px; height: 20px; object-fit: contain; }
.qs-chip:hover, .qs-chip.qs-active {
  border-color: var(--qb-navy, #0e4568); background: var(--qb-soft, #eef3f8); color: var(--qb-navy, #0e4568);
}
.qs-chip.qs-brand { font-weight: 600; }

/* products */
.qs-list { display: flex; flex-direction: column; gap: 2px; }
.qs-product {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 8px; border-radius: var(--qb-radius-sm, 10px);
}
.qs-product:hover, .qs-product.qs-active { background: var(--qb-soft, #eef3f8); }
.qs-thumb {
  flex: 0 0 52px; width: 52px; height: 52px; border-radius: 8px; background: #fff;
  border: 1px solid var(--qb-line, #e7ebf1); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.qs-thumb img { width: 46px; height: 46px; object-fit: contain; }
.qs-noimg { width: 46px; height: 46px; background: var(--qb-bg, #f5f7fa); border-radius: 6px; }
.qs-pmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.qs-pname {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.qs-pcode { font-size: 12px; color: var(--qb-muted, #5e6b7c); }
.qs-pprice { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.qs-price { font-weight: 700; color: var(--qb-navy, #0e4568); }
.qs-old { font-size: 12px; color: var(--qb-muted, #5e6b7c); text-decoration: line-through; }

.qs-all {
  display: flex; justify-content: center; align-items: center; gap: 6px;
  margin: 4px 14px 6px; padding: 10px 12px; border-radius: var(--qb-radius-sm, 10px);
  background: var(--qb-navy, #0e4568); color: #fff !important; font-weight: 600;
}
.qs-all:hover, .qs-all.qs-active { background: var(--qb-orange, #e24a22); }

.qs-corrected { padding: 4px 22px 8px; font-size: 13px; color: var(--qb-muted, #5e6b7c); }
.qs-corrected a { color: var(--qb-navy, #0e4568); }
.qs-corrected a.qs-active, .qs-corrected a:hover { color: var(--qb-orange, #e24a22); }

.qs-empty { display: flex; flex-direction: column; gap: 4px; padding: 14px 22px 10px; }
.qs-empty span { color: var(--qb-muted, #5e6b7c); font-size: 13px; }

.qs-keys {
  padding: 8px 14px 4px; font-size: 11px; color: var(--qb-muted, #5e6b7c);
  border-top: 1px solid var(--qb-line, #e7ebf1); text-align: right;
}

@media (max-width: 768px) {
  .qs-panel { max-height: calc(100vh - 140px); border-radius: 12px; }
  .qs-keys { display: none; }
  .qs-pprice { font-size: 13px; }
}

/* keyboard selection: clearly visible */
.qs-product.qs-active,
.qs-hrow:has(.qs-active) {
  background: #e3ecf5;
  box-shadow: inset 3px 0 0 var(--qb-orange, #e24a22);
}
