/* Live Search Dropdown */
.lwa-search-wrap {
  position: relative;
}
.lwa-search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: auto;
  min-width: 560px;
  max-width: 720px;
  z-index: 99999;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  max-height: 75vh;
  overflow-y: auto;
  scrollbar-width: thin;
}
.lwa-search-dropdown.is-open { display: block; }
.lwa-search-dropdown::-webkit-scrollbar { width: 4px; }
.lwa-search-dropdown::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

/* Section headers */
.lwa-search-section {
  padding: 10px 20px 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #9ca3af;
}

/* Collection cards */
.lwa-search-collection {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  text-decoration: none;
  color: #1e293b;
  transition: background 0.15s;
  border-bottom: 1px solid #f3f4f6;
}
.lwa-search-collection:hover { background: #f8fafc; color: #1e293b; }
.lwa-search-collection__img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: #f9fafb;
  flex-shrink: 0;
}
.lwa-search-collection__title {
  font-size: 14px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
}
.lwa-search-collection__badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6366f1;
  background: #eef2ff;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Product cards — two-row layout with full title */
.lwa-search-product {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  text-decoration: none;
  color: #1e293b;
  transition: background 0.15s;
  border-bottom: 1px solid #f3f4f6;
}
.lwa-search-product:hover { background: #f8fafc; color: #1e293b; }
.lwa-search-product:last-child { border-bottom: none; }
.lwa-search-product__img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  background: #f9fafb;
  padding: 2px;
}
.lwa-search-product__info {
  min-width: 0;
}
.lwa-search-product__cat {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9ca3af;
  margin-bottom: 2px;
}
.lwa-search-product__title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
  /* Allow wrapping — no more truncation */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lwa-search-product__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.lwa-search-product__price {
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
  white-space: nowrap;
}
.lwa-search-product__stock {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
}
.lwa-search-product__stock--in { color: #16a34a; background: #f0fdf4; }
.lwa-search-product__stock--low { color: #ca8a04; background: #fefce8; }
.lwa-search-product__stock--oos { color: #dc2626; background: #fef2f2; }

/* "See all results" link */
.lwa-search-all {
  display: block;
  text-align: center;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 700;
  color: #6366f1;
  text-decoration: none;
  border-top: 1px solid #e5e7eb;
  transition: background 0.15s;
}
.lwa-search-all:hover { background: #f8fafc; color: #4f46e5; }

/* Loading state */
.lwa-search-loading {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
}

/* No results */
.lwa-search-empty {
  padding: 28px 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}
.lwa-search-empty strong { color: #4b5563; display: block; margin-bottom: 4px; }

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 849px) {
  .lwa-search-dropdown {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    max-height: 70vh;
    border-radius: 16px 16px 0 0;
    border: none;
    box-shadow: 0 -8px 48px rgba(0,0,0,0.25);
    transform: none;
  }
  /* Pull handle indicator */
  .lwa-search-dropdown::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 8px auto 4px;
  }
  .lwa-search-product {
    grid-template-columns: 44px 1fr auto;
    padding: 8px 16px;
    gap: 10px;
  }
  .lwa-search-product__img { width: 44px; height: 44px; }
  .lwa-search-product__title {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }
  .lwa-search-product__price { font-size: 13px; }
  .lwa-search-collection { padding: 8px 16px; }
  .lwa-search-section { padding: 8px 16px 4px; }
  .lwa-search-all { padding: 12px 16px; }
}

/* ── Kill Flatsome search UI ────────────────────────── */
.live-search-results,
.search-results-container,
.autocomplete-suggestions,
.header-search-dropdown .nav-dropdown,
.header-search-form .nav-dropdown {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}
