/* ═══════════════════════════════════════════════════
   MEK7 Search — Stylesheet (minimalistisch)
   ═══════════════════════════════════════════════════ */

:root {
    --mek7-accent:      #e8391e;
    --mek7-accent-dark: #c02e16;
    --mek7-bg:          #ffffff;
    --mek7-border:      #d0d0d0;
    --mek7-text:        #1a1a1a;
    --mek7-muted:       #6b7280;
    --mek7-hover:       #f7f7f7;
    --mek7-shadow:      0 4px 20px rgba(0,0,0,.10);
    --mek7-radius:      4px;
    --mek7-input-h:     38px;
}

/* ── Wrapper ─────────────────────────────────────── */

.mek7-search-wrapper {
    position: relative;
    width: 100%;
    max-width: 680px;
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

/* ── Suchleiste ──────────────────────────────────── */

.mek7-search-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--mek7-bg);
    border: 1px solid var(--mek7-border);
    border-radius: var(--mek7-radius);
    padding: 2px 2px 2px 8px;
    transition: border-color .15s, box-shadow .15s;
}

.mek7-search-wrapper:focus-within .mek7-search-bar {
    border-color: #999;
    box-shadow: none;
}

/* ── Fahrzeug-Badge ──────────────────────────────── */

.mek7-vehicle-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--mek7-accent);
    color: #fff;
    border-radius: 3px;
    padding: 3px 5px 3px 7px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    max-width: 160px;
    flex-shrink: 0;
}

.mek7-vehicle-icon { font-size: 12px; flex-shrink: 0; }

.mek7-vehicle-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mek7-vehicle-clear {
    background: rgba(255,255,255,.25);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    line-height: 1;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: background .15s;
}

.mek7-vehicle-clear:hover { background: rgba(255,255,255,.4); }

/* ── Input ───────────────────────────────────────── */

.mek7-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.mek7-search-icon {
    width: 16px;
    height: 16px;
    color: #999;
    flex-shrink: 0;
}

.mek7-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--mek7-text);
    height: var(--mek7-input-h);
    min-width: 0;
    -webkit-appearance: none;
}

.mek7-search-input::placeholder { color: #aaa; }
.mek7-search-input::-webkit-search-cancel-button { display: none; }

.mek7-clear-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    font-size: 18px;
    line-height: 1;
    padding: 0 6px;
    flex-shrink: 0;
    transition: color .15s;
}
.mek7-clear-btn:hover { color: #666; }
.mek7-clear-btn.visible { display: block; }

/* ── Dropdown ────────────────────────────────────── */

.mek7-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--mek7-bg);
    border: 1px solid var(--mek7-border);
    border-radius: var(--mek7-radius);
    box-shadow: var(--mek7-shadow);
    z-index: 99999;
    overflow: hidden;
    animation: mek7SlideIn .1s ease;
}

.mek7-dropdown.open { display: block; }

@keyframes mek7SlideIn {
    from { opacity: 0; transform: translateY(-3px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Treffer ─────────────────────────────────────── */

.mek7-hit {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 0 10px;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f3f3f3;
    transition: background .1s;
    min-height: 60px;
}

.mek7-hit:last-child { border-bottom: none; }
.mek7-hit:hover,
.mek7-hit.focused { background: var(--mek7-hover); }

.mek7-hit-img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 3px;
    background: #f5f5f5;
    flex-shrink: 0;
}

.mek7-hit-img-placeholder {
    width: 46px;
    height: 46px;
    border-radius: 3px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.mek7-hit-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mek7-hit-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--mek7-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.mek7-hit-title mark,
.mek7-hit-sku mark {
    background: rgba(232,57,30,.12);
    color: var(--mek7-accent-dark);
    border-radius: 2px;
    font-style: normal;
}

.mek7-hit-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.mek7-hit-sku {
    font-size: 11px;
    font-family: monospace;
    color: var(--mek7-muted);
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
}

.mek7-hit-cat {
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mek7-hit-ymm {
    font-size: 10px;
    color: var(--mek7-accent);
    font-weight: 600;
    white-space: nowrap;
}

/* ── Footer ──────────────────────────────────────── */

.mek7-dropdown-footer {
    padding: 10px 12px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Fahrzeug-Filter Chip im Footer */
.mek7-footer-vehicle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px 10px;
}
.mek7-footer-vehicle-label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mek7-footer-vehicle-off {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #888;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.mek7-footer-vehicle-off:hover { background: #555; }

/* Alle anzeigen Button */
.mek7-show-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 12px;
    background: var(--mek7-accent);
    color: #fff !important;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    box-sizing: border-box;
}
.mek7-show-all-btn:hover { background: var(--mek7-accent-dark); color: #fff !important; }

/* Legacy — falls noch genutzt */
.mek7-show-all { font-size: 12px; color: var(--mek7-accent); font-weight: 600; text-decoration: none; }
.mek7-show-all:hover { color: var(--mek7-accent-dark); }

/* ── States ──────────────────────────────────────── */

/* No-Results mit Filter-Hinweis */
.mek7-no-results--filtered {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 12px;
    text-align: center;
}
.mek7-no-results-text { font-size: 13px; color: #555; }
.mek7-no-results-hint {
    font-size: 12px; color: #888;
    background: #f5f5f5; border-radius: 4px;
    padding: 4px 8px; display: inline-block;
}
.mek7-no-results-filter-off {
    width: 100%; padding: 9px 12px;
    background: #555; color: #fff;
    border: none; border-radius: 6px;
    font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background .15s;
}
.mek7-no-results-filter-off:hover { background: #333; }

.mek7-loading,
.mek7-no-results {
    padding: 16px;
    text-align: center;
    color: var(--mek7-muted);
    font-size: 13px;
}

.mek7-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #eee;
    border-top-color: var(--mek7-accent);
    border-radius: 50%;
    animation: mek7Spin .6s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
}

@keyframes mek7Spin { to { transform: rotate(360deg); } }

/* ── Mobile ──────────────────────────────────────── */

@media (max-width: 600px) {
    .mek7-vehicle-badge { max-width: 110px; font-size: 10px; }
    .mek7-search-input  { font-size: 16px; }
    .mek7-hit           { grid-template-columns: 40px 1fr; gap: 0 8px; padding: 8px 10px; min-height: 54px; }
    .mek7-hit-img,
    .mek7-hit-img-placeholder { width: 40px; height: 40px; }
    .mek7-dropdown      { left: -4px; right: -4px; }
}

/* ── Mobile Fullscreen Overlay ───────────────────── */

#mek7-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #fff;
    flex-direction: column;
    animation: mek7OverlayIn .15s ease;
}

#mek7-overlay.open {
    display: flex;
}

@keyframes mek7OverlayIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mek7-overlay-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--mek7-border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}

.mek7-overlay-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 8px 12px;
}

.mek7-overlay-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: var(--mek7-text);
    min-width: 0;
    -webkit-appearance: none;
}

.mek7-overlay-input::placeholder { color: #aaa; }
.mek7-overlay-input::-webkit-search-cancel-button { display: none; }

.mek7-overlay-clear {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    font-size: 20px;
    line-height: 1;
    padding: 0;
}

.mek7-overlay-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--mek7-accent);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 0;
}

.mek7-overlay-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mek7-overlay-results { }

.mek7-overlay-footer {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    position: sticky;
    bottom: 0;
}

.mek7-overlay-hint {
    padding: 24px 16px;
    color: var(--mek7-muted);
    font-size: 14px;
    text-align: center;
}

/* ── Suchverlauf ─────────────────────────────────── */

.mek7-history-list { padding: 8px 0; }

.mek7-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    font-size: 12px;
    color: var(--mek7-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.mek7-history-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--mek7-accent);
    font-size: 12px;
    font-weight: 500;
    padding: 0;
}

.mek7-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    text-decoration: none;
    color: var(--mek7-text);
    border-bottom: 1px solid #f5f5f5;
    transition: background .1s;
}

.mek7-history-item:hover { background: var(--mek7-hover); }
.mek7-history-item svg { color: var(--mek7-muted); flex-shrink: 0; }

/* Desktop Verlauf im Dropdown */
.mek7-history-list--desktop .mek7-history-header { padding: 6px 14px; }
.mek7-history-list--desktop .mek7-history-item { padding: 8px 14px; }

/* ── Preis im Dropdown ───────────────────────────── */
.mek7-hit-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--mek7-accent);
    white-space: nowrap;
}

.mek7-hit-price--sale del {
    color: var(--mek7-muted);
    font-weight: 400;
    font-size: 11px;
    margin-right: 3px;
}
.mek7-hit-price--sale strong {
    color: var(--mek7-accent);
}

/* ── Mobile Listenansicht ────────────────────────── */

@media (max-width: 767px) {
    .ymm-list-table thead { display: none !important; }
    .ymm-list-table,
    .ymm-list-table tbody { display: block !important; width: 100% !important; }

    /* Zeile als Flexbox: Bild links, Rest rechts */
    .ymm-list-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 10px 12px !important;
        border-bottom: 1px solid #f0f0f0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .ymm-list-col--img {
        flex: 0 0 56px !important;
    }
    .ymm-list-col--name {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    .ymm-list-col--action {
        flex: 0 0 auto !important;
        margin-left: 0 !important;
    }

    /* Bild: links, feste Breite */
    .ymm-list-col--img {
        grid-area: img !important;
        display: flex !important;
        align-items: center !important;
        padding: 0 !important;
    }
    .ymm-list-img {
        width: 60px !important;
        height: 60px !important;
        object-fit: contain !important;
        border-radius: 4px !important;
        background: #f5f5f5 !important;
    }

    /* Rechte Seite: alles in einer Spalte */
    .ymm-list-col--name {
        grid-area: name !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 1px !important;
        padding: 0 !important;
        min-width: 0 !important;
        align-self: end !important;
    }
    .ymm-list-title {
        font-size: 13px !important;
        font-weight: 600 !important;
        display: block !important;
        line-height: 1.3 !important;
        white-space: normal !important;
    }
    .ymm-list-artnr {
        font-size: 11px !important;
        color: #888 !important;
        display: block !important;
    }

    /* SKU-Zelle: direkt nach Name in gleicher Spalte */
    .ymm-list-col--sku {
        display: none !important; /* Name hat bereits ArtNr über .ymm-list-artnr */
    }

    /* Preis: direkt unter ArtNr */
    .ymm-list-col--price {
        display: none !important; /* Preis kommt via .ymm-list-price-mobile in name-Zelle */
    }

    /* Lager: ausblenden auf Mobile (Platz sparen) */
    .ymm-list-col--stock {
        display: none !important;
    }

    /* Warenkorb: rechts außen */
    .ymm-list-col--action {
        grid-area: cart !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        padding: 0 !important;
        align-self: center !important;
    }
    .ymm-list-col--action .button,
    .ymm-list-col--action .add_to_cart_button,
    .ymm-list-col--action .ymm-btn--details {
        white-space: nowrap !important;
        font-size: 12px !important;
        padding: 6px 10px !important;
        margin: 0 !important;
    }
}

/* Mobile Preis in SKU-Zelle */
.ymm-list-price-mobile { display: none; }

@media (max-width: 767px) {
    .ymm-list-price-mobile {
        display: inline-flex;
        align-items: center;
        font-weight: 700;
        font-size: 13px;
        color: var(--mek7-accent);
    }
    .ymm-list-price-mobile del {
        color: #aaa;
        font-weight: 400;
        font-size: 11px;
        margin-right: 3px;
    }
    .ymm-list-price-mobile ins {
        text-decoration: none;
    }
}

/* ── Mobile: Warenkorb-Text → Icon ───────────────── */

@media (max-width: 767px) {
    .ymm-list-col--action .add_to_cart_button {
        font-size: 0 !important;
        padding: 8px 10px !important;
        min-width: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .ymm-list-col--action .add_to_cart_button::before {
        content: "🛒";
        font-size: 18px !important;
        line-height: 1 !important;
    }
    /* Details-Button bleibt lesbar aber kürzer */
    .ymm-list-col--action .ymm-btn--details {
        font-size: 11px !important;
        padding: 6px 8px !important;
    }
}



/* Desktop: WC-Button sichtbar, Icon versteckt */
.mek7-cart-desktop { display: inline-block; }
.mek7-cart-icon-btn { display: none; }

@media (max-width: 767px) {
    /* Mobile: WC-Button versteckt, Icon sichtbar */
    .mek7-cart-desktop { display: none !important; }
    .mek7-cart-icon-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        background: var(--mek7-accent);
        border-radius: 6px;
        font-size: 18px;
        text-decoration: none;
        flex-shrink: 0;
    }
    .mek7-cart-icon-btn:hover { background: var(--mek7-accent-dark); }
}

/* ── Roller-Style Preis + Warenkorb (Mobile) ─────── */

@media (max-width: 767px) {
    .ymm-list-price-mobile {
        display: flex !important;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
        flex: 1 !important;
    }

    /* Rabatt-Badge: rot, rund, fett */
    .ymm-list-price-mobile .mek7-badge {
        background: #e8391e;
        color: #fff;
        font-size: 10px;
        font-weight: 800;
        padding: 2px 8px;
        border-radius: 20px;
        white-space: nowrap;
        letter-spacing: .3px;
    }

    /* Streichpreis */
    .ymm-list-price-mobile del,
    .ymm-list-price-mobile del .woocommerce-Price-amount {
        color: #999 !important;
        font-size: 11px !important;
        font-weight: 400 !important;
    }

    /* Aktueller Preis */
    .ymm-list-price-mobile ins,
    .ymm-list-price-mobile ins .woocommerce-Price-amount {
        text-decoration: none !important;
        color: var(--mek7-accent) !important;
        font-size: 14px !important;
        font-weight: 800 !important;
    }

    /* Kein Sale */
    .ymm-list-price-mobile .woocommerce-Price-amount {
        font-size: 14px;
        font-weight: 700;
        color: var(--mek7-accent);
    }

    /* Warenkorb SVG-Button */
    .mek7-cart-icon-btn {
        background: #4caf50 !important;
        border-radius: 8px !important;
        width: 42px !important;
        height: 42px !important;
        position: relative !important;
        color: white !important;
    }
    .mek7-cart-icon-btn svg {
        width: 20px !important;
        height: 20px !important;
        stroke: white !important;
    }
    .mek7-cart-icon-btn::after {
        content: "+";
        position: absolute;
        top: -5px;
        right: -5px;
        background: var(--mek7-accent);
        color: white;
        font-size: 12px;
        font-weight: 900;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        border: 1px solid white;
    }
    .mek7-cart-icon-btn:hover { background: #388e3c !important; }
}

/* ── Navigationsleiste ───────────────────────────── */

.mek7-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.mek7-nav-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    min-width: 0;
    flex: 1;
}

.mek7-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--mek7-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    padding: 4px 8px;
    border: 1px solid var(--mek7-accent);
    border-radius: 4px;
    transition: all .15s;
}
.mek7-back-btn--right {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    transition: all .15s;
    white-space: nowrap;
}
.mek7-back-btn--right:hover {
    border-color: #e8391e;
    color: #e8391e;
}

.mek7-back-btn:hover {
    background: var(--mek7-accent);
    color: white;
}

.mek7-nav-sep { color: #ccc; }

.mek7-nav-cat {
    font-weight: 600;
    color: var(--mek7-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mek7-nav-query {
    font-weight: 600;
    color: var(--mek7-text);
    font-size: 13px;
}

.mek7-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mek7-nav-count {
    font-size: 12px;
    color: var(--mek7-muted);
    white-space: nowrap;
}

.mek7-sort-select {
    font-size: 12px;
    border: 1px solid var(--mek7-border);
    border-radius: 4px;
    padding: 4px 6px;
    background: white;
    color: var(--mek7-text);
    cursor: pointer;
}

/* View-Toggle Bar */
.mek7-view-bar {
    margin-bottom: 12px;
}

/* Pagination oben etwas kompakter */
.mek7-pagination {
    margin-bottom: 16px !important;
    margin-top: 0 !important;
}

@media (max-width: 767px) {
    .mek7-nav-bar { padding: 8px 0; gap: 6px; }
    .mek7-view-bar { display: none; } /* Toggle auf Mobile ausblenden - Liste ist Standard */
    .mek7-nav-count { display: none; } /* Platz sparen - steht im Breadcrumb */
}

/* Mobile: Listenansicht als Standard */
@media (max-width: 767px) {
    .ymm-view--grid { display: none !important; }
    .ymm-view--list { display: block !important; }
}

/* ── Fahrzeug-Badge Toggle ───────────────────────── */

.mek7-vehicle-badge {
    cursor: pointer !important;
    user-select: none;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 5px 8px 5px 10px !important;
    gap: 1px !important;
    max-width: 220px !important;
    border-radius: 6px !important;
    transition: all .2s !important;
    position: relative !important;
}

.mek7-vehicle-badge:hover { filter: brightness(1.08); }

/* Status-Zeile oben */
.mek7-vehicle-status-row {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

/* Zustandstext */
.mek7-vehicle-status-text {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    opacity: .85;
}

/* Toggle-Icons */
.mek7-vehicle-toggle-icon { font-size: 11px; flex-shrink: 0; }
.mek7-icon-off { display: none; }
.mek7-icon-on  { display: inline; }

/* Fahrzeugname */
.mek7-vehicle-label {
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
}

/* Icon verstecken (war Moto-Emoji) */
.mek7-vehicle-icon { display: none !important; }

/* × Button */
.mek7-vehicle-clear {
    position: absolute !important;
    top: 3px !important;
    right: 3px !important;
    width: 14px !important;
    height: 14px !important;
    font-size: 11px !important;
}

/* Aktiv: Grün — klar "AN" */
.mek7-vehicle-badge.mek7-badge--active {
    background: #2e7d32 !important;
}
.mek7-badge--active .mek7-vehicle-status-text::before { content: "Filter AN"; }
.mek7-badge--active .mek7-icon-on  { display: inline; }
.mek7-badge--active .mek7-icon-off { display: none; }

/* Inaktiv: Grau — klar "AUS" */
.mek7-vehicle-badge.mek7-badge--inactive {
    background: #757575 !important;
}
.mek7-badge--inactive .mek7-vehicle-status-text::before { content: "Filter AUS"; }
.mek7-badge--inactive .mek7-icon-on  { display: none; }
.mek7-badge--inactive .mek7-icon-off { display: inline; }

@media (max-width: 600px) {
    .mek7-vehicle-badge { max-width: 160px !important; }
}

/* ── Kein Flackern beim Laden ────────────────────── */

/* Standard: Grid ausblenden bis JS entschieden hat */
html:not([data-mek7-view]) .ymm-view--grid { display: none; }
html:not([data-mek7-view]) .ymm-view--list { display: block; }

/* Grid aktiv */
html[data-mek7-view="grid"] .ymm-view--grid { display: block; }
html[data-mek7-view="grid"] .ymm-view--list { display: none; }

/* Liste aktiv */
html[data-mek7-view="list"] .ymm-view--grid { display: none; }
html[data-mek7-view="list"] .ymm-view--list { display: block; }

/* Mobile: immer Liste */
@media (max-width: 767px) {
    html[data-mek7-view="grid"] .ymm-view--grid { display: none !important; }
    html[data-mek7-view="grid"] .ymm-view--list { display: block !important; }
}

/* ── Lager-Toggle ────────────────────────────────── */

.mek7-stock-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid var(--mek7-border);
    border-radius: 4px;
    background: white;
    color: var(--mek7-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}

.mek7-stock-toggle-off { display: inline; }
.mek7-stock-toggle-on  { display: none; }

/* Aktiv: nur vorrätige anzeigen */
.mek7-stock-toggle.mek7-stock-active {
    background: #2e7d32;
    color: white;
    border-color: #2e7d32;
}
.mek7-stock-toggle.mek7-stock-active .mek7-stock-toggle-off { display: none; }
.mek7-stock-toggle.mek7-stock-active .mek7-stock-toggle-on  { display: inline; }

/* Nicht vorrätige Zeilen ausblenden */
html[data-mek7-stock="instock"] .ymm-list-row.mek7-outofstock,
html[data-mek7-stock="instock"] .ymm-product-grid .mek7-outofstock {
    display: none !important;
}
