* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

/* ── Top-Bar Navigation ── */
.top-bar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.top-bar-title {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
    white-space: nowrap;
}
.top-bar-nav { display: flex; gap: 0.75rem; align-items: center; }
.top-bar-nav a {
    font-size: 0.85rem;
    color: #6366f1;
    text-decoration: none;
}
.top-bar-nav a:hover { text-decoration: underline; }
.top-bar-nav--active { color: #0f172a !important; font-weight: 600; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.subtitle a { color: #6366f1; text-decoration: none; }
.subtitle a:hover { text-decoration: underline; }

/* ── Suchformular ── */
.search-form { margin-bottom: 1.5rem; }

.search-row { display: flex; gap: 0.5rem; }

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.search-input:focus { border-color: #6366f1; }

.index-select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.search-btn:hover { background: #4f46e5; }

/* ── Meta ── */
.results-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1rem;
}
.results-meta code {
    background: #e2e8f0;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* ── Kachel-Grid ── */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.tile {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
    display: flex;
    flex-direction: column;
}
.tile--low-score {
    position: relative;
    opacity: 0.45;
    filter: grayscale(60%);
}
.tile--low-score::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(248, 250, 252, 0.55);
    border-radius: 10px;
    pointer-events: none;
}
.tile--low-score:hover {
    opacity: 0.75;
    filter: grayscale(20%);
}
.tile:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

/* Produktbild */
.tile-img-wrap {
    position: relative;
    width: 100%;
    height: 90px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.tile-img {
    width: 100%;
    height: 90px;
    object-fit: contain;
    display: block;
}
.tile-img-placeholder {
    font-size: 2rem;
    color: #cbd5e1;
}
.badge-sale {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.03em;
}
.badge-pinned {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #7c3aed;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    z-index: 2;
}
.tile--pinned {
    outline: 2px solid #a78bfa;
    outline-offset: -2px;
    border-radius: 10px;
}

/* Admin-Banner (von Admin-Query-Rule action=banner) */
.admin-banners {
    margin: 0.75rem 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.admin-banner {
    background: linear-gradient(90deg, #fef3c7 0%, #fffbeb 100%);
    border: 1px solid #fcd34d;
    border-left: 4px solid #d97706;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #78350f;
}
.admin-banner a { color: #b45309; font-weight: 600; text-decoration: underline; }
.admin-banner a:hover { color: #7c2d12; }

/* Kachel-Body */
.tile-body {
    padding: 0.5rem 0.6rem 0.4rem;
    flex: 1;
}
.tile-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tile-brand {
    font-size: 0.7rem;
    color: #6366f1;
    margin-top: 2px;
    font-weight: 500;
}
.tile-price {
    font-size: 0.75rem;
    margin-top: 4px;
    font-weight: 600;
}
.price-sale { color: #ef4444; }
.price-old  { color: #94a3b8; text-decoration: line-through; font-size: 0.7rem; margin-left: 3px; }

/* Relevanz-Erklärung */
.tile-score {
    border-top: 1px solid #f1f5f9;
    padding: 0.4rem 0.6rem;
    font-size: 0.67rem;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.score-bar-wrap {
    height: 3px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2px;
}
.score-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}
.score-label {
    font-weight: 600;
    font-size: 0.68rem;
}
.score-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
.score-mode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 3px;
    font-size: 0.58rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.tile-score--none .score-bar,
.tile-score--filter .score-bar {
    min-width: 100%;
    background: repeating-linear-gradient(
        45deg,
        #cbd5e1 0 4px,
        transparent 4px 8px
    ) !important;
}
.score-match, .score-pos {
    color: #94a3b8;
    font-size: 0.64rem;
}

/* ── Overlay ── */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.overlay.visible { display: flex; }

.overlay-box {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.overlay-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    color: #64748b;
    transition: background 0.15s;
}
.overlay-close:hover { background: #e2e8f0; }

.ov-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
    padding-right: 2rem;
}
.ov-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    float: right;
    margin: 0 0 0.75rem 1rem;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.ov-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    margin-bottom: 0.75rem;
    clear: both;
}
.ov-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 0.85rem;
    align-items: baseline;
}
.ov-key {
    min-width: 130px;
    font-weight: 600;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}
.ov-val {
    color: #1e293b;
    word-break: break-word;
}
.ov-link {
    color: #6366f1;
    text-decoration: none;
    font-size: 0.75rem;
}
.ov-link:hover { text-decoration: underline; }

.ov-details {
    margin-top: 0.5rem;
}
.ov-details summary {
    font-size: 0.8rem;
    color: #6366f1;
    cursor: pointer;
    font-weight: 600;
    padding: 0.25rem 0;
}
.ov-rest { margin-top: 0.5rem; }

/* ── Debug-Panel (collapsible Query-Analyse) ── */
.debug-panel {
    margin-bottom: 1rem;
    font-size: 0.8rem;
}
.dp-summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.45rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    user-select: none;
}
.debug-panel[open] .dp-summary { border-radius: 8px 8px 0 0; }
.dp-summary::-webkit-details-marker { display: none; }
.dp-summary::before { content: '▶'; font-size: 0.6rem; color: #94a3b8; transition: transform 0.15s; flex-shrink: 0; }
.debug-panel[open] .dp-summary::before { transform: rotate(90deg); }
.dp-title { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: #64748b; white-space: nowrap; }
.dp-pills { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.dp-pill { font-size: 0.68rem; padding: 1px 6px; border-radius: 10px; font-weight: 500; white-space: nowrap; }
.dp-pill--color    { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.dp-pill--size     { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }
.dp-pill--brand    { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.dp-pill--gender   { background: #f0f4ff; color: #3730a3; border: 1px solid #a5b4fc; }
.dp-pill--wg       { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }
.dp-pill--filter   { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.dp-pill--warn     { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.dp-pill--neutral  { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.dp-pill--redirect { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.dp-pill--synonym  { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }
.dp-pill--admin           { background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; }
.dp-pill--flexion         { background: #ecfeff; color: #155e75; border: 1px solid #67e8f9; }
.dp-pill--federation      { background: #e0e7ff; color: #3730a3; border: 1px solid #818cf8; }
.dp-pill--ai-hybrid       { background: #fce7f3; color: #9d174d; border: 1px solid #f9a8d4; }
.dp-pill--ai-off          { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.dp-pill--dominance-fail  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

.dp-pipeline {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.7rem;
    margin-top: 4px;
}
.dp-pipeline th {
    text-align: left;
    padding: 4px 6px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 600;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.dp-pipeline td {
    padding: 4px 6px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}
.dp-pipeline code { background: #f1f5f9; padding: 0 4px; border-radius: 3px; }
.dp-src-admin    { color: #9a3412; font-weight: 600; }
.dp-src-facet    { color: #075985; font-weight: 500; }
.dp-src-unmapped { color: #991b1b; }
.dp-src-skipped  { color: #94a3b8; font-style: italic; }

.dp-body {
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: white;
}
.dp-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-bottom: 1px solid #f8fafc;
    align-items: baseline;
    line-height: 1.5;
}
.dp-row:last-child { border-bottom: none; }
.dp-key {
    min-width: 110px;
    font-weight: 600;
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.dp-val { color: #1e293b; word-break: break-all; }
.dp-val code {
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: ui-monospace, 'Cascadia Code', monospace;
}
.dp-muted { color: #94a3b8; font-style: italic; }
.dp-chip  { background: #f1f5f9; border-radius: 4px; padding: 0 5px; font-size: 0.72rem; display: inline-block; margin: 1px 0; }
.dp-chip--hit  { background: #dcfce7; color: #166534; }
.dp-chip--hit small { color: #16a34a; font-weight: 600; }
.dp-chip--miss { background: #f1f5f9; color: #94a3b8; text-decoration: line-through; }
.dp-action {
    font-size: 0.72rem;
    color: #6366f1;
    text-decoration: none;
    margin-left: 0.4rem;
}
.dp-action:hover { text-decoration: underline; }
.dp-raw {
    margin: 0.35rem 0 0;
    padding: 0.5rem 0.6rem;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 6px;
    font-size: 0.72rem;
    line-height: 1.35;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow: auto;
}

/* Ranking-Score-Details-Chips (Overlay) */
.score-detail {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 0.8rem;
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-block;
}
.score-detail--words     { background: #dbeafe; color: #1e40af; }
.score-detail--attribute { background: #d1fae5; color: #065f46; }
.score-detail--typo      { background: #fef3c7; color: #92400e; }
.score-detail--proximity { background: #e0e7ff; color: #3730a3; }
.score-detail--exactness { background: #fce7f3; color: #9f1239; }
.score-detail--vectorSort,
.score-detail--hybrid    { background: #f3e8ff; color: #581c87; }

/* ── Query-Analyse-Box (Legacy — kann entfernt werden wenn .debug-panel überall ist) ── */
.query-analysis {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.qa-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0369a1;
    margin-bottom: 0.4rem;
}
.qa-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}
.qa-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}
.qa-tag--color   { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.qa-tag--size    { background: #ede9fe; color: #5b21b6; border: 1px solid #c4b5fd; }
.qa-tag--brand   { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.qa-tag--gender  { background: #f0f4ff; color: #3730a3; border: 1px solid #a5b4fc; }
.qa-tag--filter  { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.qa-tag--nofilter{ background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.qa-tag--warn    { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.qa-remove {
    font-size: 0.75rem;
    color: #6366f1;
    text-decoration: none;
    margin-left: 0.25rem;
}
.qa-remove:hover { text-decoration: underline; }
.qa-text {
    margin-top: 0.4rem;
    font-size: 0.72rem;
    color: #64748b;
}
.qa-text code {
    background: #e0f2fe;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.7rem;
    color: #0369a1;
}

/* ── Attribut-Chips auf Kacheln ── */
.tile-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 3px;
}
.attr-chip {
    font-size: 0.62rem;
    padding: 1px 5px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}
.attr-chip.attr-match {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fde68a;
    font-weight: 700;
}

/* ── Varianten-Zeile auf Kacheln ── */
.tile-variants {
    margin-top: 4px;
    padding-top: 3px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.variant-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}
.variant-label {
    font-size: 0.58rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    margin-right: 1px;
}
.variant-chip {
    font-size: 0.58rem;
    padding: 0 4px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    white-space: nowrap;
}
.badge-variants {
    align-self: flex-start;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: #6366f1;
    color: white;
    margin-top: 2px;
}

/* ── Instant Search Spinner ── */
.instant-spinner {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 0.6rem 0;
}
.spinner-dot {
    width: 7px;
    height: 7px;
    background: #6366f1;
    border-radius: 50%;
    animation: bounce 0.9s infinite ease-in-out;
}
.spinner-dot:nth-child(2) { animation-delay: 0.15s; }
.spinner-dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%            { transform: scale(1.0); opacity: 1;   }
}

/* Ergebniscontainer Überblendung */
#results-container {
    transition: opacity 0.15s;
}

/* „Alle X Ergebnisse anzeigen" Link */
.xhr-more {
    text-align: center;
    padding: 1.25rem 0 0.5rem;
}
.xhr-more-link {
    display: inline-block;
    padding: 0.55rem 1.4rem;
    background: #6366f1;
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.xhr-more-link:hover { background: #4f46e5; }

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 2rem;
    padding-bottom: 2rem;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: white;
    color: #1e293b;
    transition: background 0.12s, border-color 0.12s;
    white-space: nowrap;
}
.page-btn:hover {
    background: #f1f5f9;
    border-color: #6366f1;
    color: #6366f1;
}
.page-btn--active {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
    cursor: default;
}
.page-btn--active:hover {
    background: #6366f1;
    color: white;
}
.page-btn--disabled {
    color: #cbd5e1;
    border-color: #f1f5f9;
    background: #f8fafc;
    cursor: default;
}
.page-btn--disabled:hover {
    background: #f8fafc;
    border-color: #f1f5f9;
    color: #cbd5e1;
}
.page-gap {
    color: #94a3b8;
    padding: 0 0.2rem;
}

/* ── Status ── */
.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.no-results { text-align: center; color: #64748b; padding: 2rem; }
.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 1rem;
    border-radius: 8px;
}
.info code {
    background: #dbeafe;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 0 0.2rem;
}
.avail-yes { color: #16a34a; }
.avail-no  { color: #dc2626; }

/* ── Debug-Boxen (Synonym / Redirect) ── */
.debug-box {
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}
.debug-box code {
    background: rgba(0,0,0,0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.75rem;
}
.debug-box--redirect {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
}
.debug-box--synonym {
    background: #ede9fe;
    border: 1px solid #c4b5fd;
    color: #5b21b6;
}
.debug-box--info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #075985;
}
.debug-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}
.debug-label {
    color: inherit;
    opacity: 0.7;
    margin-left: 0.3rem;
}
.debug-score {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.05rem 0.4rem;
    background: rgba(0,0,0,0.08);
    border-radius: 4px;
    font-size: 0.7rem;
}
.debug-chip {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    font-size: 0.72rem;
    margin: 0 0.15rem;
}
.debug-hint {
    opacity: 0.6;
    font-size: 0.7rem;
    margin-left: 0.3rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   Doofinder-Style Overlay Search (.df-*)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Overlay Container ── */
.df-overlay {
    min-height: calc(100vh - 42px); /* abzüglich top-bar */
    background: #fff;
}

/* ── Header / Suchzeile ── */
.df-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}
.df-logo {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
    white-space: nowrap;
}
.df-search-wrap {
    flex: 1;
    max-width: 700px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    transition: border-color 0.15s;
}
.df-search-wrap:focus-within {
    border-color: #6366f1;
    background: #fff;
}
.df-search-icon { width: 20px; height: 20px; flex-shrink: 0; color: #94a3b8; }
.df-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.05rem;
    color: #0f172a;
    min-width: 0;
}
.df-search-input::placeholder { color: #94a3b8; }
.df-input-clear {
    border: none;
    background: none;
    font-size: 1.3rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.2rem;
}
.df-input-clear:hover { color: #64748b; }
.df-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.15s;
    flex-shrink: 0;
}
.df-close-btn:hover { background: #f1f5f9; color: #0f172a; }

/* ── Chips-Zeile (Zuletzt gesucht / Suchvorschläge) ── */
.df-chips-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    min-height: 2.5rem;
}
.df-chips-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    margin-right: 0.3rem;
    white-space: nowrap;
}
.df-chip {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 0.82rem;
    color: #1e293b;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
    white-space: nowrap;
}
.df-chip:hover { border-color: #6366f1; color: #6366f1; }
.df-chip mark { background: none; font-weight: 700; color: #0f172a; }
.df-chip-remove {
    margin-left: 0.25rem;
    font-size: 0.9rem;
    color: #94a3b8;
    cursor: pointer;
}
.df-chip-remove:hover { color: #dc2626; }
.df-chips-clear {
    font-size: 0.75rem;
    color: #94a3b8;
    cursor: pointer;
    margin-left: 0.5rem;
    text-decoration: underline;
}
.df-chips-clear:hover { color: #dc2626; }

/* ── Zweispaltiges Layout ── */
.df-content {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}
.df-sidebar {
    flex: 0 0 200px;
    min-width: 160px;
}
.df-main {
    flex: 1;
    min-width: 0;
}

/* ── Sidebar ── */
.df-sidebar-section { margin-bottom: 1.5rem; }
.df-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #f1f5f9;
}
.df-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.df-sidebar-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.88rem;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.1s;
    cursor: pointer;
}
.df-sidebar-link:hover { color: #6366f1; }
.df-sidebar-count {
    font-size: 0.72rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    min-width: 1.4rem;
    text-align: center;
}

/* ── Section Header (Produkte / Highlights + Alle anzeigen) ── */
.df-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}
.df-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.df-show-all {
    font-size: 0.82rem;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}
.df-show-all:hover { text-decoration: underline; }

/* ── Karussell ── */
.df-carousel-wrap {
    position: relative;
    margin: 0 -4px;
    padding: 4px;
}
.df-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}
.df-carousel::-webkit-scrollbar { display: none; }
.df-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    z-index: 5;
    font-size: 1.4rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.12s;
}
.df-carousel-arrow:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.14); color: #0f172a; }
.df-carousel-arrow--left  { left: -12px; }
.df-carousel-arrow--right { right: -12px; }

/* ── Produkt-Karten ── */
.df-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
    display: flex;
    flex-direction: column;
}
.df-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}
.df-card-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f8fafc;
}
.df-card-body {
    padding: 0.6rem 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.df-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.df-card-brand {
    font-size: 0.72rem;
    color: #6366f1;
    margin-top: 0.15rem;
}
.df-card-desc {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}
.df-card-price {
    font-size: 0.88rem;
    font-weight: 700;
    margin-top: auto;
    padding-top: 0.4rem;
}
.df-card-price .price-sale { color: #ef4444; }
.df-card-price .price-old {
    font-size: 0.72rem;
    font-weight: 400;
    color: #94a3b8;
    text-decoration: line-through;
    margin-left: 0.3rem;
}
.df-redirect {
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}
.df-redirect-icon { font-size: 1rem; }
.df-redirect-link { color: #92400e; font-weight: 600; text-decoration: underline; }
.df-redirect-label { opacity: 0.7; }

.df-empty-msg {
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 2rem 0;
    text-align: center;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .df-content { flex-direction: column; }
    .df-sidebar { flex: none; min-width: 0; }
    .df-card { flex: 0 0 180px; }
    .df-card-img { height: 150px; }
    .df-carousel-arrow { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   FACETTEN-NAVIGATION
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout ── */
.search-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-top: 0.5rem;
}
.results-column {
    flex: 1;
    min-width: 0;
}

/* ── Sidebar ── */
.facet-sidebar {
    flex: 0 0 220px;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}
.facet-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}
.facet-sidebar-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0f172a;
}
.facet-clear-all {
    font-size: 0.7rem;
    color: #6366f1;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    white-space: nowrap;
}
.facet-clear-all:hover { color: #dc2626; }

/* ── Facet Group ── */
.facet-group {
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.6rem;
}
.facet-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.facet-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 0.2rem 0;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    text-align: left;
}
.facet-group-header:hover { color: #6366f1; }
.facet-group-arrow {
    font-size: 0.55rem;
    color: #94a3b8;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.facet-group--collapsed .facet-group-arrow { transform: rotate(180deg); }
.facet-group--collapsed .facet-group-body  { display: none; }

/* ── Checkbox Items ── */
.facet-list {
    list-style: none;
    padding: 0;
    margin: 0.3rem 0 0;
}
.facet-item { margin-bottom: 0.2rem; }
.facet-item--zero { opacity: 0.38; }
.facet-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: #1e293b;
    padding: 0.18rem 0.3rem;
    border-radius: 5px;
    transition: background 0.1s;
}
.facet-checkbox-label:hover { background: #f1f5f9; }
.facet-checkbox {
    width: 14px;
    height: 14px;
    accent-color: #6366f1;
    cursor: pointer;
    flex-shrink: 0;
}
.facet-checkbox-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}
.facet-count {
    font-size: 0.68rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 0.04rem 0.32rem;
    border-radius: 8px;
    min-width: 1.4rem;
    text-align: center;
    flex-shrink: 0;
}
.facet-show-more {
    font-size: 0.7rem;
    color: #6366f1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.3rem;
    text-decoration: underline;
    display: none;
}
.facet-show-more:hover { color: #4f46e5; }

/* ── Color Swatches ── */
.facet-swatch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.3rem;
}
.facet-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-clip: padding-box;
    padding: 0;
}
.facet-swatch:hover:not([disabled]) {
    border-color: #6366f1;
    transform: scale(1.15);
}
.facet-swatch--active {
    border-color: #6366f1 !important;
    border-width: 2px;
    box-shadow: 0 0 0 2px #6366f1, 0 0 0 4px #fff;
}
.facet-swatch-check {
    font-size: 0.65rem;
    line-height: 1;
    color: transparent;
}
.facet-swatch--active .facet-swatch-check { color: rgba(255,255,255,0.9); }
.facet-swatch--active.facet-swatch--light .facet-swatch-check { color: rgba(0,0,0,0.6); }
.facet-swatch--zero {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ── Size Pills ── */
.facet-pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    margin-top: 0.3rem;
}
.facet-pill {
    padding: 0.22rem 0.48rem;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: #f8fafc;
    font-size: 0.76rem;
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 1.3;
}
.facet-pill:hover:not([disabled]) { border-color: #6366f1; color: #6366f1; }
.facet-pill--active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    font-weight: 600;
}
.facet-pill--zero { opacity: 0.33; cursor: not-allowed; }
.facet-pill-count { font-size: 0.6rem; opacity: 0.65; }

/* ── Radio (Gender / Price) ── */
.facet-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.3rem;
}
.facet-radio-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: #1e293b;
    padding: 0.18rem 0.3rem;
    border-radius: 5px;
    transition: background 0.1s;
}
.facet-radio-label:hover { background: #f1f5f9; }
.facet-radio { accent-color: #6366f1; cursor: pointer; flex-shrink: 0; }
.facet-radio-text { flex: 1; }

/* ── Toggle (Verfügbarkeit / Angebote) ── */
.facet-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    padding: 0.3rem 0;
    font-size: 0.8rem;
    color: #1e293b;
}
.facet-toggle-input { display: none; }
.facet-toggle-track {
    width: 32px;
    height: 17px;
    background: #e2e8f0;
    border-radius: 9px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.facet-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 13px;
    height: 13px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.facet-toggle-input:checked + .facet-toggle-track { background: #6366f1; }
.facet-toggle-input:checked + .facet-toggle-track::after { transform: translateX(15px); }
.facet-toggle-text { flex: 1; }

/* ── Active Filters Bar ── */
.active-filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0 0.2rem;
}
.active-filters-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}
.active-filters-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.22rem 0.55rem;
    border-radius: 20px;
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #c4b5fd;
    font-size: 0.76rem;
    white-space: nowrap;
    cursor: default;
}
.filter-chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #7c3aed;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
    margin-left: 0.1rem;
}
.filter-chip-remove:hover { color: #dc2626; }
.filter-chip--clear-all {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
    cursor: pointer;
    font-size: 0.72rem;
}
.filter-chip--clear-all:hover { border-color: #dc2626; color: #dc2626; }

/* ── Mobile Toggle ── */
.facet-mobile-toggle {
    display: none;
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    color: #1e293b;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.facet-toggle-icon { transition: transform 0.2s; font-style: normal; }
.facet-mobile-toggle[aria-expanded="true"] .facet-toggle-icon { transform: rotate(180deg); }

/* ── Facet Responsive ── */
@media (max-width: 768px) {
    .search-layout   { flex-direction: column; }
    .facet-sidebar   { flex: none; width: 100%; position: static; max-height: none; }
    .facet-mobile-toggle { display: flex; }
    .facet-sidebar-body  { display: none; }
    .facet-sidebar--open .facet-sidebar-body { display: block; }
}

/* ── Facet Loading-State ── */
.facet-sidebar--loading { opacity: 0.5; pointer-events: none; }
.facet-results-loading  { opacity: 0.45; transition: opacity 0.15s; }

/* ── Feedback-Bar ── */
.feedback-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #1e293b;
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    box-shadow: 0 -2px 12px rgba(0,0,0,.18);
}
.feedback-bar__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
.feedback-bar__comment {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
}
.feedback-bar__comment[hidden] { display: none; }

body.has-feedback-bar { padding-bottom: 64px; }
body.has-feedback-bar--expanded { padding-bottom: 140px; }
.feedback-bar__comment textarea {
    flex: 1;
    resize: vertical;
    min-height: 2.2rem;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.05);
    color: #f1f5f9;
    font-family: inherit;
    font-size: 0.875rem;
}
.feedback-bar__comment textarea:focus {
    outline: 2px solid #6366f1;
    outline-offset: 1px;
    background: rgba(255,255,255,.10);
}
.fb-send {
    background: #6366f1;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 0.45rem 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.fb-send:hover:not(:disabled) { background: #4f46e5; }
.fb-send:disabled { opacity: 0.5; cursor: default; }
.feedback-bar__comment-thanks {
    color: #86efac;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    align-self: center;
}
.feedback-bar__label {
    font-weight: 600;
    white-space: nowrap;
    color: #94a3b8;
}
.feedback-bar__query {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e2e8f0;
    font-style: italic;
}
.feedback-bar__buttons { display: flex; gap: 0.4rem; }
.fb-btn {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    transition: background 0.15s, transform 0.1s;
}
.fb-btn:hover:not(:disabled) { background: rgba(255,255,255,.18); transform: scale(1.15); }
.fb-btn:disabled { cursor: default; opacity: 0.5; }
.fb-btn--active  { background: rgba(99,102,241,.55) !important; border-color: #6366f1; opacity: 1 !important; }
.feedback-bar__thanks {
    color: #86efac;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}
