/* Smart search panel — colors only use global theme variables from style.css. */
.site-search {
  position: relative;
  overflow: visible;
  z-index: 100;
}

.mc-smart-search-panel {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  display: none;
  box-sizing: border-box;
  max-height: min(68vh, 620px);
  overflow-y: auto;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  box-shadow: 0 14px 34px var(--shadow-12);
  z-index: 10000;
}

.mc-smart-search-panel.is-open {
  display: block;
}

.mc-smart-search-section + .mc-smart-search-section {
  margin-top: 20px;
}

.mc-smart-search-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mc-smart-search-section-head strong {
  color: var(--ink);
  font-size: .95rem;
  font-weight: 700;
}

.mc-smart-search-clear {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}

.mc-smart-search-clear:hover {
  color: var(--brand);
}

.mc-smart-search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mc-smart-search-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  box-sizing: border-box;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: .84rem;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
}

.mc-smart-search-chip:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.mc-smart-search-stores {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.mc-smart-search-store {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 10px 6px;
  border-radius: var(--field-radius);
}

.mc-smart-search-store:hover {
  background: var(--surface-soft);
}

.mc-smart-search-store-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  box-sizing: border-box;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}

.mc-smart-search-store-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mc-smart-search-store-name {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: .8rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-smart-search-live .mc-smart-search-section-head {
  margin-bottom: 8px;
}

.mc-smart-search-results {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mc-smart-search-results li + li {
  border-top: 1px solid var(--line);
}

.mc-smart-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 6px;
  border-radius: var(--field-radius);
}

.mc-smart-search-result:hover {
  background: var(--surface-soft);
}

.mc-smart-search-result-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.mc-smart-search-result-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mc-smart-search-result-name {
  min-width: 0;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-smart-search-empty {
  margin: 0;
  padding: 14px 4px 4px;
  color: var(--muted);
  font-size: .88rem;
}

@media (max-width: 768px) {
  .mc-smart-search-panel {
    top: calc(100% + 6px);
    max-height: calc(100vh - 190px);
    padding: 14px;
    border-radius: var(--card-radius);
  }

  .mc-smart-search-stores {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .mc-smart-search-store {
    padding: 8px 4px;
  }

  .mc-smart-search-store-logo {
    width: 48px;
    height: 48px;
    padding: 3px;
  }

  .mc-smart-search-section + .mc-smart-search-section {
    margin-top: 16px;
  }
}
