/* WECS Live-Suche – Overlay */
html.wls-lock, html.wls-lock body { overflow: hidden !important; }

.wls-overlay {
  --wls-primary: #2563eb;
  --wls-mark: #fef3c7;
  --wls-ratio: 1/1;
  --wls-cols: 3;
  --wls-text: #1f2937;
  --wls-muted: #6b7280;
  --wls-line: #e5e7eb;
  --wls-bg: #ffffff;
  --wls-soft: #f6f7f9;
  position: fixed; inset: 0; z-index: 100000;
  display: none; flex-direction: column;
  background: var(--wls-bg); color: var(--wls-text);
  font-size: 15px; line-height: 1.4;
}
.wls-overlay.is-open { display: flex; animation: wls-in .14s ease-out; }
@keyframes wls-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wls-overlay.is-open { animation: none; } }
.wls-overlay *, .wls-overlay *::before, .wls-overlay *::after { box-sizing: border-box; }
.wls-overlay [hidden] { display: none !important; }

/* Kopfzeile mit Suchfeld */
.wls-top { border-bottom: 1px solid var(--wls-line); padding: 14px 20px; background: var(--wls-bg); }
.wls-form { position: relative; max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.wls-icon { position: absolute; left: 14px; width: 18px; height: 18px; border: 2px solid var(--wls-muted); border-radius: 50%; pointer-events: none; }
.wls-icon::after { content: ''; position: absolute; width: 2px; height: 8px; background: var(--wls-muted); right: -4px; bottom: -6px; transform: rotate(-45deg); }
.wls-input {
  flex: 1; min-width: 0; height: 50px; padding: 0 16px 0 46px;
  border: 2px solid var(--wls-line); border-radius: 10px; font-size: 18px; color: inherit; background: var(--wls-soft);
  -webkit-appearance: none; appearance: none;
}
.wls-input:focus { outline: none; border-color: var(--wls-primary); background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--wls-primary) 18%, transparent); }
.wls-close { width: 46px; height: 46px; border: 0; border-radius: 50%; background: transparent; font-size: 32px; line-height: 1; color: var(--wls-muted); cursor: pointer; }
.wls-close:hover, .wls-close:focus-visible { background: var(--wls-soft); color: var(--wls-text); outline: none; }
.wls-loading .wls-input { background-image: linear-gradient(90deg, transparent, color-mix(in srgb, var(--wls-primary) 12%, transparent), transparent); background-size: 200% 100%; animation: wls-load 1s linear infinite; }
@keyframes wls-load { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Inhalt */
.wls-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.wls-start, .wls-results, .wls-msg { max-width: 1200px; margin: 0 auto; padding: 20px; }
.wls-block { margin-bottom: 28px; }
.wls-block h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--wls-muted); margin: 0 0 12px; font-weight: 600; }
.wls-block h3 a { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 8px; color: var(--wls-primary); }
.wls-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wls-chip { border: 1px solid var(--wls-line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; color: inherit; }
.wls-chip:hover, .wls-chip:focus-visible { border-color: var(--wls-primary); color: var(--wls-primary); outline: none; }
.wls-chip-hot::before { content: '↗ '; color: var(--wls-primary); }
.wls-msg { text-align: center; color: var(--wls-muted); padding-top: 60px; font-size: 16px; }

/* Ergebnisse mit Filterleiste */
.wls-results { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.wls-filter-toggle { display: none; }
.wls-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.wls-all { color: var(--wls-primary); text-decoration: none; font-weight: 500; }
.wls-all:hover { text-decoration: underline; }
.wls-foot { text-align: center; margin: 24px 0 8px; }
.wls-all-btn { display: inline-block; border: 2px solid var(--wls-primary); border-radius: 8px; padding: 10px 22px; }
.wls-all-btn:hover { background: var(--wls-primary); color: #fff; text-decoration: none; }

.wls-filters { position: sticky; top: 0; font-size: 14px; }
.wls-fgroup { border-bottom: 1px solid var(--wls-line); padding: 12px 0; }
.wls-fgroup h4 { font-size: 13px; font-weight: 600; margin: 0 0 8px; }
.wls-fgroup ul { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.wls-fopt { display: flex; justify-content: space-between; width: 100%; text-align: left; border: 0; background: none; padding: 4px 6px; border-radius: 6px; cursor: pointer; color: inherit; font-size: 14px; }
.wls-fopt span, .wls-check span { color: var(--wls-muted); font-size: 12px; margin-left: 6px; }
.wls-fopt:hover { background: var(--wls-soft); }
.wls-fopt.is-active { background: color-mix(in srgb, var(--wls-primary) 12%, #fff); color: var(--wls-primary); font-weight: 600; }
.wls-fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.wls-fchips .wls-fopt { width: auto; border: 1px solid var(--wls-line); border-radius: 999px; padding: 3px 10px; }
.wls-fchips .wls-fopt.is-active { border-color: var(--wls-primary); }
.wls-price-range { display: flex; align-items: center; gap: 6px; }
.wls-price-range input { width: 100%; min-width: 0; height: 34px; border: 1px solid var(--wls-line); border-radius: 6px; padding: 0 8px; }
.wls-price-range input:focus { outline: none; border-color: var(--wls-primary); }
.wls-check { display: flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; }
.wls-check input { accent-color: var(--wls-primary); }
.wls-reset { border: 0; background: none; color: var(--wls-primary); padding: 0 0 8px; cursor: pointer; font-size: 14px; }

/* Produktkarten */
.wls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.wls-grid-start { grid-template-columns: repeat(var(--wls-cols), minmax(0, 1fr)); }
.wls-card { position: relative; display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; border-radius: 10px; padding: 8px; transition: box-shadow .15s; }
.wls-card:hover, .wls-card:focus-visible { box-shadow: 0 4px 18px rgba(0,0,0,.09); outline: none; color: inherit; text-decoration: none; }
.wls-card:focus-visible { box-shadow: 0 0 0 3px var(--wls-primary); }
.wls-img { position: relative; display: block; aspect-ratio: var(--wls-ratio); background: var(--wls-soft); border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.wls-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.wls-badge { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; color: #fff; background: var(--wls-primary); }
.wls-badge-sale { background: #dc2626; }
.wls-badge-top { background: #d97706; }
.wls-brand { font-size: 12px; color: var(--wls-muted); }
.wls-title { font-size: 14px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wls-title mark { background: var(--wls-mark); color: inherit; padding: 0 1px; border-radius: 2px; }
.wls-stars { position: relative; display: inline-block; width: 70px; height: 14px; font-size: 14px; line-height: 14px; }
.wls-stars::before, .wls-stars span::before { content: '★★★★★'; letter-spacing: 0; }
.wls-stars::before { color: #d1d5db; }
.wls-stars span { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; color: #f59e0b; }
.wls-prices { margin-top: auto; }
.wls-price { font-weight: 700; font-size: 15px; }
.wls-price-sale { color: #dc2626; }
.wls-old { color: var(--wls-muted); font-size: 13px; }
.wls-stock { font-size: 12px; }
.wls-stock.wls-in { color: #15803d; }
.wls-stock.wls-out { color: #b91c1c; }

/* Empfehlungen unter den Treffern */
.wls-reco-block { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--wls-line); }

/* Tablet */
@media (max-width: 991px) {
  .wls-results { grid-template-columns: 1fr; gap: 12px; }
  .wls-filter-toggle { display: inline-flex; justify-self: start; border: 1px solid var(--wls-line); background: #fff; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 14px; color: inherit; }
  .wls-filters { display: none; position: static; }
  .wls-show-filters .wls-filters { display: block; }
  .wls-grid-start { grid-template-columns: repeat(min(var(--wls-cols), 3), minmax(0, 1fr)); }
}
/* Smartphone */
@media (max-width: 575px) {
  .wls-top { padding: 10px 12px; }
  .wls-input { height: 46px; font-size: 16px; }
  .wls-start, .wls-results, .wls-msg { padding: 14px 12px; }
  .wls-grid, .wls-grid-start { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wls-card { padding: 4px; }
}
