/*
 * Makerique Boutique theme for OpenCart 4
 * Copyright (c) 2026 Heliopsy. All Rights Reserved.
 * https://makerique.com
 * SPDX-License-Identifier: LicenseRef-Proprietary
 * Proprietary and confidential. Unauthorized copying, distribution, or
 * modification of this file, by any means, is strictly prohibited.
 */

/* =========================================================================
   Makerique Boutique — predictive header search dropdown.
   Host markup: .mr-livesearch > form + .mr-livesearch-panel (see search.twig).
   Wired in footer.twig. Uses the --mr-* design tokens only.
   ========================================================================= */
.mr-livesearch { position: relative; }

.mr-livesearch-panel {
  position: absolute;
  top: calc(100% - .75rem);
  left: 0;
  right: 0;
  z-index: 1050;
  background: var(--mr-surface, #fff);
  border: 1px solid var(--mr-border, #e7dfd5);
  border-radius: var(--mr-radius, 14px);
  box-shadow: var(--mr-shadow, 0 4px 18px rgba(0,0,0,.12));
  overflow: hidden;
  max-height: 70vh;
  overflow-y: auto;
}

.mr-livesearch-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .9rem;
  color: var(--mr-text, #2b2723);
  text-decoration: none;
  border-bottom: 1px solid var(--mr-border, #e7dfd5);
}
.mr-livesearch-item:last-of-type { border-bottom: 0; }
.mr-livesearch-item:hover,
.mr-livesearch-item.is-active {
  background: var(--mr-surface-2, #f4ece3);
  color: var(--mr-text, #2b2723);
}

.mr-livesearch-thumb {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: cover;
  border-radius: var(--mr-radius-sm, 9px);
  background: var(--mr-surface-2, #f4ece3);
}
.mr-livesearch-info { min-width: 0; flex: 1 1 auto; }
.mr-livesearch-name {
  display: block;
  font-family: var(--mr-font-heading, inherit);
  font-size: .95rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mr-livesearch-price { font-size: .85rem; color: var(--mr-primary, #b4694e); font-weight: 600; }

.mr-livesearch-all {
  display: block;
  padding: .65rem .9rem;
  text-align: center;
  font-weight: 600;
  font-size: .9rem;
  color: var(--mr-primary, #b4694e);
  text-decoration: none;
  background: var(--mr-surface-2, #f4ece3);
}
.mr-livesearch-all:hover { color: var(--mr-primary-600, #9e5842); }

.mr-livesearch-empty {
  padding: .9rem;
  text-align: center;
  color: var(--mr-muted, #8a8078);
  font-size: .9rem;
}
