.anm-home-search {
    position: relative;
    z-index: 9999;
    width: min(1120px, calc(100% - 24px));
    margin: 14px auto 12px;
}

.anm-home-search__shell {
    position: relative;
    border: 1px solid rgba(15, 143, 98, .22);
    border-radius: 18px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 12px 30px rgba(15,23,42,.10);
}

.anm-home-search__bar {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px 7px 15px;
}

.anm-home-search__icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: #087a52;
    font-size: 18px;
}

.anm-home-search__input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-size: 15px;
    line-height: 1.3;
    padding: 10px 0;
}

.anm-home-search__input::placeholder { color: #7c8798; }

/* Use only AllNaijaMarket's own clear button; Chromium/Edge otherwise adds a second X. */
.anm-home-search__input::-webkit-search-cancel-button,
.anm-home-search__input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.anm-home-search__clear[hidden] { display: none !important; }

.anm-home-search__clear,
.anm-home-search__submit-look {
    flex: 0 0 auto;
    border: 0;
    border-radius: 12px;
    min-width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
}

.anm-home-search__clear {
    background: #eef2f7;
    color: #475569;
    cursor: pointer;
    font-size: 18px;
}


.anm-home-search__submit-look {
    color: #fff;
    background: linear-gradient(135deg,#087a52,#0f8f62);
    box-shadow: 0 8px 18px rgba(15,143,98,.25);
    pointer-events: none;
}

.anm-home-search__hint {
    margin: 6px 4px 0;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.35;
    text-align: center;
}

.anm-home-search__panel {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    z-index: 5000;
    overflow: hidden;
    border: 1px solid rgba(148,163,184,.24);
    border-radius: 17px;
    background: rgba(255,255,255,.985);
    box-shadow: 0 24px 60px rgba(15,23,42,.20);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.anm-home-search__panel[hidden] { display: none !important; }

.anm-home-search__panel-head {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 13px;
    border-bottom: 1px solid rgba(148,163,184,.16);
    color: #64748b;
    font-size: 11px;
}

.anm-home-search__panel-head strong { color: #0f172a; font-size: 12px; }

.anm-home-search__list {
    max-height: min(66vh, 610px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.anm-home-search__status {
    margin: 0;
    padding: 22px 16px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.anm-home-search-result {
    display: grid;
    grid-template-columns: 58px minmax(0,1fr) 24px;
    align-items: center;
    gap: 11px;
    min-height: 76px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(148,163,184,.13);
    color: inherit;
    text-decoration: none;
    transition: background .15s ease, transform .15s ease;
}

.anm-home-search-result:last-child { border-bottom: 0; }
.anm-home-search-result:hover { background: rgba(15,143,98,.055); }
.anm-home-search-result:active { transform: scale(.995); }

.anm-home-search-result__media {
    width: 58px;
    height: 58px;
    overflow: hidden;
    border-radius: 13px;
    border: 1px solid rgba(148,163,184,.18);
    background: #f1f5f9;
}

.anm-home-search-result__media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.anm-home-search-result__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.anm-home-search-result__topline {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 17px;
}

.anm-home-search-result__badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: .02em;
}

.anm-home-search-result__badge--market { background: #fff7ed; color: #9a3412; }
.anm-home-search-result__badge--product,
.anm-home-search-result__badge--product_category { background: #eff6ff; color: #1d4ed8; }
.anm-home-search-result__badge--service,
.anm-home-search-result__badge--service_category { background: #f5f3ff; color: #6d28d9; }
.anm-home-search-result__badge--shop { background: #ecfdf5; color: #047857; }

.anm-home-search-result__verified {
    width: 16px;
    height: 16px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #087a52;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}

.anm-home-search-result__content strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0f172a;
    font-size: 13.5px;
    line-height: 1.3;
}

.anm-home-search-result__content small,
.anm-home-search-result__content em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.25;
}

.anm-home-search-result__content small { color: #475569; }
.anm-home-search-result__content em { color: #8491a4; font-style: normal; }
.anm-home-search-result__arrow { color: #087a52; font-weight: 900; }

.anm-home-search.is-loading .anm-home-search__submit-look::after {
    content: '';
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: anmSearchSpin .7s linear infinite;
}
.anm-home-search.is-loading .anm-home-search__submit-look i { display: none; }
@keyframes anmSearchSpin { to { transform: rotate(360deg); } }

@media (max-width: 680px) {
    .anm-home-search { width: calc(100% - 16px); margin-top: 9px; margin-bottom: 9px; }
    .anm-home-search__shell { border-radius: 14px; }
    .anm-home-search__bar { min-height: 50px; gap: 7px; padding: 5px 6px 5px 11px; }
    .anm-home-search__input { font-size: 13px; }
    .anm-home-search__clear,.anm-home-search__submit-look { min-width: 38px; height: 38px; border-radius: 10px; }
    .anm-home-search__hint { font-size: 10px; margin-top: 4px; }
    .anm-home-search__panel { top: calc(100% + 5px); border-radius: 14px; }
    .anm-home-search__list { max-height: min(62vh, 520px); }
    .anm-home-search-result { grid-template-columns: 50px minmax(0,1fr) 18px; min-height: 67px; gap: 9px; padding: 8px 9px; }
    .anm-home-search-result__media { width: 50px; height: 50px; border-radius: 11px; }
    .anm-home-search-result__content strong { font-size: 12.5px; }
    .anm-home-search-result__content small,.anm-home-search-result__content em { font-size: 10px; }
}

@media (prefers-color-scheme: dark) {
    .anm-home-search__shell,.anm-home-search__panel { background: rgba(15,23,42,.97); border-color: rgba(148,163,184,.22); }
    .anm-home-search__input,.anm-home-search__panel-head strong,.anm-home-search-result__content strong { color: #f8fafc; }
    .anm-home-search__input::placeholder,.anm-home-search__hint,.anm-home-search__panel-head,.anm-home-search__status,.anm-home-search-result__content small { color: #a8b3c4; }
    .anm-home-search-result__content em { color: #7f8ca0; }
    .anm-home-search__clear { background: rgba(148,163,184,.13); color: #dbe4ef; }
    .anm-home-search-result:hover { background: rgba(134,239,172,.06); }
    .anm-home-search-result__media { background: #111827; border-color: rgba(148,163,184,.2); }
}

@media (prefers-reduced-motion: reduce) {
    .anm-home-search-result { transition: none; }
    .anm-home-search.is-loading .anm-home-search__submit-look::after { animation-duration: 1.4s; }
}
