/* ===== Search Results Page ===== */
.lem-search-wrap {
  width: 90%; max-width: none; margin: 0 auto; padding: 24px 15px 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; color:#1f2937;
}

/* Page title */
.lem-search-title { font-size:32px; font-weight:800; color:#0f172a; letter-spacing:-.5px; margin:0 0 14px; white-space:nowrap; }

/* Search bar (on results page) */
.lem-search-bar {
  display:flex; gap:0; align-items:stretch; margin-bottom:24px; height: 52px;
  border:1.5px solid #e0e7ef; border-radius:8px; overflow:hidden; background:#fff;
  box-shadow:0 1px 3px rgba(15,23,42,.04);
}
.lem-search-bar:focus-within { border-color:#0a64e0; box-shadow:0 0 0 3px rgba(10,100,224,.12); }
.lem-search-bar input {
  flex:1; min-width:0; border:none; outline:none; padding:0 16px;
  font-size:15px; color:#1f2937; background:transparent; height: 100%;
}
.lem-search-bar input::placeholder { color:#9ca3af; }
.lem-search-bar .lem-search-clear {
  width:36px; border:none; background:#fff; color:#9ca3af; cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-size:13px;
}
.lem-search-bar .lem-search-clear:hover { color:#4b5563; }
.lem-search-bar .lem-search-btn {
  width:130px; border:none; background:#0a64e0; color:#fff; font-weight:600;
  font-size:14px; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; height: 100%;
}
.lem-search-bar .lem-search-btn:hover { background:#0854bd; }

/* ===== Status banner (exact match / no results) ===== */
.lem-search-banner {
  display:flex; align-items:center; gap:12px; padding:14px 18px;
  margin-bottom:18px; font-size:14px; color:#374151;
  background:#eff6ff; border:1px solid #bfdbfe; border-radius:6px;
}
.lem-search-banner.is-success i {
  width:26px; height:26px; background:#0a64e0; color:#fff; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0;
}
.lem-search-banner strong { font-weight:600; color:#0f172a; white-space:nowrap; }

/* ===== Button base ===== */
.lem-btn-primary, .lem-btn-secondary {
  display:inline-flex; align-items:center; gap:10px; padding:12px 24px;
  border-radius:8px; font-size:14px; font-weight:600; text-decoration:none; border:none;
  cursor:pointer; transition:all .15s; line-height:1; font-family:inherit;
}
.lem-btn-primary { background:#0a64e0; color:#fff; }
.lem-btn-primary:hover { background:#0854bd; color:#fff; transform:translateY(-1px); }
.lem-btn-secondary { background:#fff; color:#0a64e0; border:1.5px solid #bfdbfe; }
.lem-btn-secondary:hover { background:#eff6ff; }

/* ===== No Results card ===== */
.lem-search-empty {
  background:#eff6ff; border:none; border-radius:16px; padding:40px 48px;
  display:flex; flex-wrap:nowrap; gap:32px; align-items:flex-start;
}

.lem-search-empty-icon {
  flex:0 0 72px; width:72px; height:72px; background:#dbeafe;
  border:2px solid #bfdbfe; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color:#1d4ed8; font-size:30px;
}
.lem-search-empty-icon i { transform:scale(1); }

.lem-search-error .lem-search-empty-icon { background:#fef3c7; border-color:#fcd34d; color:#b45309; }
.lem-search-error .lem-search-empty-desc a { color:#0a64e0; text-decoration:underline; }

.lem-search-empty-body { flex:1 1 0; min-width:0; padding-top:2px; }

.lem-search-empty-body h2 {
  font-size:24px; font-weight:800; color:#0f172a; margin:0 0 12px;
  letter-spacing:-.3px; line-height:1.3;
  display:block; width:100%;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.lem-search-empty-body h2 span { color:#0a64e0; display:inline; white-space:nowrap; }

.lem-search-empty-desc {
  font-size:14.5px; line-height:1.7; color:#52606d; margin:0 0 22px;
}

.lem-search-empty-actions {
  display:grid; grid-template-columns:1fr 1fr; gap:32px;
  margin-bottom:10px;
}
.lem-search-empty-actions .lem-btn-primary,
.lem-search-empty-actions .lem-btn-secondary {
  width:60%; justify-content:center; justify-self:center;
  padding:14px 20px; font-size:14px;
  box-sizing:border-box;
}

.lem-search-empty-actions .lem-btn-primary i:last-child,
.lem-search-empty-actions .lem-btn-secondary i:last-child {
  margin-left:10px;
}

.lem-search-empty-hint {
  display:grid; grid-template-columns:1fr 1fr; gap:32px;
  font-size:12.5px; color:#64748b; line-height:1.6;
}
.lem-search-empty-hint-left { width:60%; justify-self:center; text-align:left; }
.lem-search-empty-hint-right { width:60%; justify-self:center; text-align:left; }
.lem-search-empty-hint-right .email { color:#0a64e0; font-weight:600; margin-right:6px; }
.lem-search-empty-hint-right .subject { display:block; margin-top:2px; }
.lem-search-empty-hint a { color:#0a64e0; text-decoration:none; }
.lem-search-empty-hint a:hover { text-decoration:underline; }

/* ===== Exact Match product card — 3-column layout ===== */
.lem-search-exact-card {
  background:#fff; border:1px solid #e5e7eb; border-radius:6px;
  display:grid; grid-template-columns: 260px 1fr 280px; gap:0;
}

.lem-search-exact-img {
  display:flex; align-items:center; justify-content:center;
  border-right:1px solid #e5e7eb; box-sizing:border-box;
  padding:20px;
}
.lem-search-exact-img-inner {
  width:220px; aspect-ratio:1/1; background:#fff;
  display:flex; align-items:center; justify-content:center;
}
.lem-search-exact-img-inner img {
  max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain;
}

.lem-search-exact-main { padding:24px 28px; border-right:1px solid #e5e7eb; }

.lem-search-exact-actions {
  padding:24px 20px; display:flex; flex-direction:column; gap:10px;
  background:#f9fafb; justify-content:center;
}

.lem-search-exact-title-row {
  display:flex; align-items:center; gap:12px; margin-bottom:8px;
}
.lem-search-exact-model { font-size:26px; font-weight:800; color:#0f172a; margin:0; letter-spacing:-.3px; }
.lem-search-exact-badge {
  display:inline-block; background:#eff6ff; color:#1d4ed8; font-size:11px; font-weight:600;
  padding:4px 10px; border-radius:3px; text-transform:uppercase; letter-spacing:.5px; flex-shrink:0;
  border:1px solid #bfdbfe;
}
.lem-search-exact-meta {
  display:flex; flex-direction:row; align-items:center; flex-wrap:nowrap;
  font-size:13px; color:#64748b; margin-bottom:12px; line-height:1.5;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.lem-search-exact-meta span { display:inline; white-space:nowrap; }
.lem-search-exact-meta span:first-child { color:#0a64e0; font-weight:600; }
.lem-search-exact-meta .sep { display:inline; color:#cbd5e1; margin:0 6px; font-style:normal; }
.lem-search-exact-desc {
  font-size:13.5px; color:#475569; line-height:1.5; margin:0 0 16px;
}

.lem-search-exact-specs { border:1px solid #e5e7eb; border-radius:4px; overflow:hidden; }
.lem-search-exact-spec {
  display:grid; grid-template-columns: 130px 1fr; gap:0;
  border-bottom:1px solid #f1f5f9; font-size:13px;
}
.lem-search-exact-spec:last-child { border-bottom:none; }
.lem-search-exact-spec-label {
  color:#64748b; font-weight:500; padding:9px 14px; background:#f8fafc;
  border-right:1px solid #e5e7eb;
}
.lem-search-exact-spec-value {
  color:#1f2937; font-weight:600; padding:9px 14px;
}

.lem-search-exact-actions .lem-btn-exact {
  width:100%; justify-content:center; padding:11px 14px; font-size:13px;
}
.lem-search-exact-actions .lem-btn-exact.view,
.lem-search-exact-actions .lem-btn-exact.pdf { background:#fff; color:#0a64e0; border:1.5px solid #bfdbfe; }
.lem-search-exact-actions .lem-btn-exact.view:hover,
.lem-search-exact-actions .lem-btn-exact.pdf:hover { background:#eff6ff; }
.lem-search-exact-actions .lem-btn-exact.quote { background:#0a64e0; color:#fff; }
.lem-search-exact-actions .lem-btn-exact.quote:hover { background:#0854bd; }

/* Fuzzy Results Table — flat style matching reference */
.lem-search-fuzzy-title {
  display:block; width:100%;
  font-size:14px; font-weight:500; color:#374151; margin:0 0 18px;
  line-height:1.5;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.lem-search-fuzzy-title .keyword { display:inline; color:#0f172a; font-weight:700; white-space:nowrap; }
.lem-search-fuzzy-title .count { display:inline; color:#6b7280; font-weight:400; margin-left:6px; white-space:nowrap; }

.lem-search-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.lem-search-table {
  width:100%; min-width:720px; border-collapse:collapse; background:#fff;
  border-top:1px solid #e5e7eb; border-bottom:1px solid #e5e7eb;
}
.lem-search-table thead th {
  background:#f3f4f6; color:#374151; font-weight:700; font-size:12px;
  text-transform:uppercase; letter-spacing:.6px; text-align:left;
  padding:14px 18px; border-bottom:1px solid #e5e7eb;
  white-space:nowrap;
}
.lem-search-table tbody td {
  padding:16px 18px; border-bottom:1px solid #f1f5f9; font-size:14px; color:#374151;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.lem-search-table tbody tr:last-child td { border-bottom:none; }
.lem-search-table tbody tr:hover td { background:#f8fafc; }
.lem-search-table .lem-search-model { font-weight:700; color:#0a64e0; text-decoration:none; }
.lem-search-table .lem-search-model:hover { text-decoration:underline; }
.lem-search-table .lem-search-brand {
  font-size:14px; color:#374151; font-weight:500;
}
.lem-search-table .lem-search-actions { display:flex; gap:10px; }
.lem-search-table .lem-btn-tbl {
  display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:4px;
  font-size:12.5px; font-weight:600; text-decoration:none; border:none; cursor:pointer;
}
.lem-btn-tbl.view { background:#fff; color:#0a64e0; border:1.5px solid #bfdbfe; }
.lem-btn-tbl.view:hover { background:#eff6ff; }
.lem-btn-tbl.quote { background:#0a64e0; color:#fff; }
.lem-btn-tbl.quote:hover { background:#0854bd; }

/* Pagination */
.lem-search-pager {
  display:flex; justify-content:center; align-items:center; gap:6px; margin-top:22px;
}
.lem-search-pager a, .lem-search-pager span {
  min-width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid #e5e7eb; border-radius:6px; font-size:13px; color:#475569;
  text-decoration:none; background:#fff; padding:0 10px;
}
.lem-search-pager a:hover { background:#eff6ff; color:#0a64e0; border-color:#bfdbfe; }
.lem-search-pager .current { background:#0a64e0; color:#fff; border-color:#0a64e0; font-weight:600; }
.lem-search-pager .disabled { color:#cbd5e1; cursor:not-allowed; background:#f8fafc; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .lem-search-exact-card { grid-template-columns: 1fr; }
  .lem-search-exact-img { border-right:none; border-bottom:1px solid #e5e7eb; padding:24px; }
  .lem-search-exact-main { border-right:none; border-bottom:1px solid #e5e7eb; padding:24px; }
  .lem-search-exact-actions { flex-direction:column; background:#fff; padding:20px 24px; }
  .lem-search-exact-actions .lem-btn-exact { width:100%; }
  /* no results: buttons stack */
  .lem-search-empty-actions { grid-template-columns:1fr; gap:14px; }
  .lem-search-empty-actions .lem-btn-primary,
  .lem-search-empty-actions .lem-btn-secondary { width:100%; }
  .lem-search-empty-hint { grid-template-columns:1fr; gap:6px; }
  .lem-search-empty-hint-left,
  .lem-search-empty-hint-right { width:auto; justify-self:start; }
  .lem-search-table { font-size:12.5px; }
  .lem-search-table thead th, .lem-search-table tbody td { padding:10px 10px; }
  .lem-search-exact-spec { grid-template-columns: 80px 1fr; }
  .lem-search-title { font-size:26px; }
}
@media (max-width: 600px) {
  .lem-search-empty { flex-direction:column; padding:28px 22px; gap:20px; }
  .lem-search-empty-icon { width:60px; height:60px; font-size:24px; }
}
