:root {
    --mbe-green: #8fcb3a;
    --mbe-green-dark: #669d20;
    --mbe-green-soft: #f1f9e8;
    --mbe-ink: #1d2920;
    --mbe-muted: #667268;
    --mbe-line: #e6ebe5;
}

.mbe-smart-search-shell {
    position: relative;
    isolation: isolate;
    display: flex !important;
    width: 100%;
    max-width: 100%;
    height: 52px;
    min-height: 52px;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    box-sizing: border-box;
    overflow: visible;
    border: 1px solid #dbe3da;
    border-radius: 16px !important;
    background: #fff;
    box-shadow: 0 5px 20px rgba(31, 54, 35, .08);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.mbe-smart-search-shell *,
.mbe-smart-search-shell *::before,
.mbe-smart-search-shell *::after {
    box-sizing: border-box;
}

.mbe-smart-search-shell:focus-within {
    z-index: 1060;
    border-color: var(--mbe-green);
    box-shadow: 0 0 0 4px rgba(143, 203, 58, .16), 0 14px 34px rgba(31, 54, 35, .13);
    transform: translateY(-1px);
}

.mbe-smart-search-shell > .mbe-smart-search-typeahead,
.mbe-smart-search-shell > input.mbe-smart-search-input {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
}

.mbe-smart-search-shell .mbe-smart-search-typeahead {
    display: flex !important;
    position: relative !important;
    align-items: stretch;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
}

.mbe-smart-search-input,
.mbe-smart-search-shell .mbe-smart-search-input.form-control {
    width: 100% !important;
    height: 50px !important;
    padding: 0 54px 0 48px !important;
    border: 0 !important;
    border-radius: 16px 0 0 16px !important;
    outline: 0 !important;
    color: var(--mbe-ink) !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -.01em;
}

.mbe-smart-search-input::placeholder {
    color: #89938b !important;
    opacity: 1;
    font-weight: 400;
}

.mbe-smart-search-leading {
    position: absolute;
    z-index: 4;
    left: 16px;
    top: 50%;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: var(--mbe-green-dark);
    pointer-events: none;
    transform: translateY(-50%);
}

.mbe-smart-search-leading svg,
.mbe-smart-search-clear svg,
.mbe-smart-search-menu svg {
    display: block !important;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    flex: 0 0 20px !important;
}

.mbe-smart-search-clear {
    position: absolute;
    z-index: 5;
    top: 50%;
    right: 60px;
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #68736a;
    background: #f1f4f1;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(.8);
    transition: opacity .15s ease, transform .15s ease, background .15s ease;
}

.mbe-smart-search-clear.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

.mbe-smart-search-clear:hover,
.mbe-smart-search-clear:focus-visible {
    color: var(--mbe-ink);
    background: #e6ece6;
    outline: 0;
}

.mbe-smart-search-shell .input-group-append {
    position: relative;
    z-index: 3;
    display: flex !important;
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 50px !important;
    flex: 0 0 52px !important;
    margin-left: 0;
}

.mbe-smart-search-shell .mbe-smart-search-submit,
.mbe-smart-search-shell .input-group-append .btn {
    display: inline-flex !important;
    width: 52px !important;
    min-width: 52px;
    max-width: 52px !important;
    height: 50px;
    padding: 0 !important;
    align-items: center;
    justify-content: center;
    appearance: none;
    border: 0 !important;
    border-radius: 13px !important;
    color: #173006 !important;
    background: linear-gradient(135deg, #a7e752, var(--mbe-green)) !important;
    box-shadow: inset 0 0 0 1px rgba(66, 105, 13, .08), 0 4px 10px rgba(108, 159, 34, .18);
    transition: filter .15s ease, transform .15s ease;
}

.mbe-smart-search-shell .mbe-smart-search-submit:hover,
.mbe-smart-search-shell .input-group-append .btn:hover {
    filter: saturate(1.08) brightness(.97);
    transform: translateY(-1px);
}

.mbe-smart-search-menu {
    position: fixed;
    z-index: 2147483001;
    top: 70px;
    left: 14px;
    display: none;
    width: min(680px, calc(100vw - 28px));
    min-width: 0;
    max-width: calc(100vw - 20px);
    max-height: min(590px, calc(100vh - 130px));
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(132, 151, 134, .2);
    border-radius: 20px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 24px 65px rgba(27, 48, 31, .18), 0 4px 14px rgba(27, 48, 31, .08);
    opacity: 0;
    transform: translateY(-6px) scale(.99);
    transform-origin: top center;
    color: var(--mbe-ink);
    font-family: inherit;
    line-height: 1.4;
    -webkit-overflow-scrolling: touch;
}

.mbe-smart-search-menu.is-open {
    display: block;
    animation: mbeSearchOpen .18s ease forwards;
}

@keyframes mbeSearchOpen {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.mbe-smart-search-menu__head {
    display: flex;
    min-height: 72px;
    padding: 15px 18px 13px;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid var(--mbe-line);
    color: var(--mbe-ink);
    background: linear-gradient(120deg, #fbfefa 0%, var(--mbe-green-soft) 100%);
}

.mbe-smart-search-menu__head > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.mbe-smart-search-menu__head small {
    color: var(--mbe-green-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.mbe-smart-search-menu__head strong {
    margin-top: 2px;
    color: var(--mbe-ink);
    font-size: 15px;
    line-height: 1.3;
}

.mbe-smart-search-menu__sparkle {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 11px;
    color: #426d0d;
    background: #dff4c5;
}

.mbe-smart-search-menu__hint {
    max-width: 45%;
    padding: 6px 9px;
    overflow: hidden;
    border: 1px solid #d4e9bb;
    border-radius: 99px;
    color: #496a20;
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mbe-smart-search-menu__intro {
    margin: 0;
    padding: 18px 18px 4px;
    color: var(--mbe-muted);
    font-size: 13px;
    line-height: 1.5;
}

.mbe-smart-search-chips {
    display: flex;
    padding: 12px 18px 18px;
    flex-wrap: wrap;
    gap: 8px;
}

.mbe-smart-search-chip {
    padding: 8px 12px;
    border: 1px solid #dfe8dc;
    border-radius: 999px;
    color: #3e4c40;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease;
}

.mbe-smart-search-chip:hover,
.mbe-smart-search-chip:focus-visible {
    border-color: #a8d56f;
    color: #3f6b0b;
    background: var(--mbe-green-soft);
    outline: 0;
    transform: translateY(-1px);
}

.mbe-smart-search-menu__promise {
    display: flex;
    padding: 12px 18px;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--mbe-line);
    color: #5d685f;
    background: #fafcfa;
    font-size: 11px;
}

.mbe-smart-search-menu__promise svg {
    width: 16px;
    height: 16px;
    color: var(--mbe-green-dark);
}

.mbe-smart-search-menu__list { padding: 6px; }

.mbe-smart-search-menu__item {
    display: grid;
    min-height: 76px;
    padding: 8px 10px;
    align-items: center;
    grid-template-columns: 58px minmax(0, 1fr) auto 22px;
    gap: 12px;
    border-radius: 13px;
    color: var(--mbe-ink);
    text-decoration: none !important;
    transition: background .14s ease, transform .14s ease;
}

.mbe-smart-search-menu__item:hover,
.mbe-smart-search-menu__item.is-active {
    color: var(--mbe-ink);
    background: var(--mbe-green-soft);
    transform: translateX(2px);
}

.mbe-smart-search-menu__media {
    display: grid;
    width: 58px;
    height: 58px;
    overflow: hidden;
    place-items: center;
    border: 1px solid #edf0ed;
    border-radius: 11px;
    background: #fff;
}

.mbe-smart-search-menu__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mbe-smart-search-menu__image-fallback {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #82b83d;
    background: #f5faef;
}

.mbe-smart-search-menu__body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.mbe-smart-search-menu__name {
    overflow: hidden;
    color: var(--mbe-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mbe-smart-search-menu__meta {
    color: #7b857d;
    font-size: 11px;
}

.mbe-smart-search-menu__price {
    color: #345d08;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.mbe-smart-search-menu__item-arrow {
    display: grid;
    place-items: center;
    color: #98a29a;
}

.mbe-smart-search-menu__item-arrow svg {
    width: 16px;
    height: 16px;
}

.mbe-smart-search-menu__all {
    display: flex;
    min-height: 54px;
    padding: 12px 18px;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #dce8d9;
    color: #31590a !important;
    background: linear-gradient(90deg, #f5fbed 0%, #eaf7da 100%);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
}

.mbe-smart-search-menu__all > svg {
    width: 19px;
    height: 19px;
}

.mbe-smart-search-menu__arrow {
    display: grid;
    margin-left: auto;
    place-items: center;
    transition: transform .15s ease;
}

.mbe-smart-search-menu__all:hover .mbe-smart-search-menu__arrow { transform: translateX(3px); }

.mbe-smart-search-empty {
    display: flex;
    padding: 26px 22px;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.mbe-smart-search-empty > svg {
    width: 31px;
    height: 31px;
    margin-bottom: 10px;
    color: var(--mbe-green-dark);
}

.mbe-smart-search-empty strong {
    color: var(--mbe-ink);
    font-size: 15px;
}

.mbe-smart-search-empty span {
    max-width: 420px;
    margin-top: 5px;
    color: var(--mbe-muted);
    font-size: 12px;
    line-height: 1.5;
}

.mbe-smart-search-skeleton {
    display: grid;
    padding: 11px 16px;
    align-items: center;
    grid-template-columns: 56px minmax(0, 1fr) 66px;
    gap: 12px;
}

.mbe-smart-search-skeleton > span:first-child,
.mbe-smart-search-skeleton > span:last-child,
.mbe-smart-search-skeleton i {
    display: block;
    border-radius: 8px;
    background: linear-gradient(90deg, #eef2ee 25%, #f8faf8 50%, #eef2ee 75%);
    background-size: 200% 100%;
    animation: mbeSearchPulse 1.1s linear infinite;
}

.mbe-smart-search-skeleton > span:first-child { height: 56px; }
.mbe-smart-search-skeleton > span:last-child { height: 14px; }
.mbe-smart-search-skeleton > span:nth-child(2) { display: flex; flex-direction: column; gap: 8px; }
.mbe-smart-search-skeleton i:first-child { width: 86%; height: 14px; }
.mbe-smart-search-skeleton i:last-child { width: 48%; height: 10px; }

@keyframes mbeSearchPulse { to { background-position: -200% 0; } }

.mbe-native-search-hidden,
.mbe-smart-search-shell .tt-menu,
.mbe-smart-search-shell .ac_results,
.mbe-smart-search-shell .autocomplete-suggestions,
.mbe-smart-search-shell .typeahead__result { display: none !important; }

.mbe-smart-search-live-ad {
    display: grid;
    min-height: 88px;
    margin: 10px 12px 2px;
    padding: 10px;
    align-items: center;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    border: 1px solid #d9eac7;
    border-radius: 14px;
    background: linear-gradient(120deg, #f8fcef, #eef8e2);
}

.mbe-smart-search-live-ad__media {
    display: grid;
    width: 112px;
    height: 66px;
    overflow: hidden;
    place-items: center;
    border-radius: 10px;
    background: #fff;
}

.mbe-smart-search-live-ad__media img,
.mbe-smart-search-live-ad__media video {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.mbe-smart-search-live-ad__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.mbe-smart-search-live-ad__content small {
    color: #66833e;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mbe-smart-search-live-ad__content strong {
    overflow: hidden;
    color: #22341c;
    font-size: 13px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mbe-smart-search-live-ad__content > span {
    display: -webkit-box;
    overflow: hidden;
    color: #687264;
    font-size: 11px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mbe-smart-search-live-ad__link {
    padding: 8px 10px;
    border-radius: 9px;
    color: #274c05 !important;
    background: #dff2c8;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
}

.mbe-smart-search-results-ad {
    position: relative;
    margin: 0 0 1.25rem;
    overflow: hidden;
    border: 1px solid #dbe9cd;
    border-radius: 18px;
    background: #f7fbed;
    box-shadow: 0 8px 24px rgba(45, 76, 24, .08);
}

.mbe-smart-search-results-ad__slide {
    display: none;
    min-height: 150px;
    grid-template-columns: minmax(180px, 32%) minmax(0, 1fr);
}

.mbe-smart-search-results-ad__slide.is-active { display: grid; }

.mbe-smart-search-results-ad__media {
    min-height: 150px;
    overflow: hidden;
    background: #fff;
}

.mbe-smart-search-results-ad__media img,
.mbe-smart-search-results-ad__media video {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-height: 260px;
    object-fit: cover;
}

.mbe-smart-search-results-ad__content {
    display: flex;
    padding: 20px 24px 24px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
}

.mbe-smart-search-results-ad__label {
    color: #66833e;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mbe-smart-search-results-ad__content strong { margin-top: 3px; color: #24351d; font-size: 20px; line-height: 1.25; }
.mbe-smart-search-results-ad__content p { margin: 7px 0 0; color: #657060; font-size: 13px; line-height: 1.5; }
.mbe-smart-search-results-ad__button { margin-top: 12px; padding: 9px 14px; border-radius: 9px; color: #244803 !important; background: #d9f0bd; font-size: 12px; font-weight: 800; text-decoration: none !important; }

.mbe-smart-search-results-ad__dots {
    position: absolute;
    right: 16px;
    bottom: 10px;
    display: flex;
    gap: 6px;
}

.mbe-smart-search-results-ad__dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #aab5a4;
}

.mbe-smart-search-results-ad__dots button.is-active { width: 22px; border-radius: 99px; background: var(--mbe-green-dark); }

.mbe-smart-search-notice {
    display: flex;
    margin: 0 0 1.25rem;
    padding: 1rem 1.1rem;
    align-items: flex-start;
    gap: .75rem;
    border: 1px solid #dcecc9;
    border-radius: 14px;
    color: #31520e;
    background: linear-gradient(120deg, #f7fced, #edf8df);
}

.mbe-smart-search-notice strong,
.mbe-smart-search-notice span { display: block; }
.mbe-smart-search-notice span { margin-top: .15rem; color: #5f6b5c; }
.mbe-smart-search-notice__icon { color: var(--mbe-green-dark); font-size: 1.2rem; }

/* Harte Größenlimits verhindern, dass globale NOVA-/Template-Regeln SVGs oder
   Produktbilder innerhalb der Suche auf die Breite des Dropdowns aufziehen. */
.mbe-smart-search-menu__sparkle svg {
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    flex-basis: 18px !important;
}

.mbe-smart-search-menu__promise svg,
.mbe-smart-search-menu__item-arrow svg {
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    flex-basis: 16px !important;
}

.mbe-smart-search-menu__all > svg {
    width: 19px !important;
    min-width: 19px !important;
    max-width: 19px !important;
    height: 19px !important;
    min-height: 19px !important;
    max-height: 19px !important;
    flex-basis: 19px !important;
}

.mbe-smart-search-empty > svg {
    width: 31px !important;
    min-width: 31px !important;
    max-width: 31px !important;
    height: 31px !important;
    min-height: 31px !important;
    max-height: 31px !important;
    flex-basis: 31px !important;
}

.mbe-smart-search-menu__image {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
}

@media (max-width: 767.98px) {
    .mbe-smart-search-shell { width: 100%; height: 48px; min-height: 48px; border-radius: 13px !important; }
    .mbe-smart-search-input,
    .mbe-smart-search-shell .mbe-smart-search-input.form-control { height: 46px !important; padding: 0 45px 0 43px !important; font-size: 16px; }
    .mbe-smart-search-shell .input-group-append { width: 48px !important; min-width: 48px !important; max-width: 48px !important; height: 46px !important; flex-basis: 48px !important; }
    .mbe-smart-search-shell .mbe-smart-search-submit,
    .mbe-smart-search-shell .input-group-append .btn { width: 48px !important; min-width: 48px; max-width: 48px !important; height: 46px; border-radius: 11px !important; }
    .mbe-smart-search-leading { left: 13px; }
    .mbe-smart-search-clear { right: 54px; }
    .mbe-smart-search-menu {
        position: fixed;
        right: auto;
        bottom: auto;
        width: calc(100vw - 20px);
        min-width: 0;
        max-width: calc(100vw - 20px);
        max-height: min(440px, calc(100dvh - 120px));
        border-radius: 16px;
        transform-origin: top center;
    }
    .mbe-smart-search-menu__head { min-height: 62px; padding: 12px 14px; }
    .mbe-smart-search-menu__intro { padding: 14px 14px 2px; }
    .mbe-smart-search-chips { padding: 10px 14px 14px; gap: 7px; }
    .mbe-smart-search-chip { padding: 8px 10px; }
    .mbe-smart-search-menu__list { padding: 5px; }
    .mbe-smart-search-menu__item { min-height: 72px; padding: 8px; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 10px; }
    .mbe-smart-search-menu__media { width: 52px; height: 52px; grid-row: 1 / span 2; }
    .mbe-smart-search-menu__body { grid-column: 2; align-self: end; }
    .mbe-smart-search-menu__price { grid-column: 2; align-self: start; font-size: 12px; }
    .mbe-smart-search-menu__name { display: -webkit-box; overflow: hidden; line-height: 1.3; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .mbe-smart-search-menu__meta { display: none; }
    .mbe-smart-search-menu__item-arrow { display: none; }
    .mbe-smart-search-menu__hint { display: none; }
    .mbe-smart-search-menu__head { position: sticky; z-index: 2; top: 0; }
    .mbe-smart-search-menu__all { position: sticky; bottom: 0; }
    .mbe-smart-search-live-ad { min-height: 76px; margin: 8px 9px 1px; grid-template-columns: 76px minmax(0, 1fr); gap: 9px; }
    .mbe-smart-search-live-ad__media { width: 76px; height: 56px; }
    .mbe-smart-search-live-ad__link { grid-column: 1 / -1; justify-self: stretch; padding: 7px 10px; text-align: center; }
    .mbe-smart-search-results-ad__slide.is-active { display: block; }
    .mbe-smart-search-results-ad__media { min-height: 0; height: 150px; }
    .mbe-smart-search-results-ad__content { padding: 15px 16px 30px; }
    .mbe-smart-search-results-ad__content strong { font-size: 16px; }
}

@media (max-width: 374.98px) {
    .mbe-smart-search-leading { display: none; }
    .mbe-smart-search-input,
    .mbe-smart-search-shell .mbe-smart-search-input.form-control { padding-left: 13px !important; }
    .mbe-smart-search-menu__head strong { font-size: 14px; }
    .mbe-smart-search-menu__sparkle { width: 32px; height: 32px; flex-basis: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    .mbe-smart-search-shell,
    .mbe-smart-search-menu,
    .mbe-smart-search-chip,
    .mbe-smart-search-menu__item,
    .mbe-smart-search-menu__arrow,
    .mbe-smart-search-clear { animation: none !important; transition: none !important; }
    .mbe-smart-search-menu.is-open { opacity: 1; transform: none; }
}
