/* search wrap */
.dafmp-search{position:relative;width:100%;z-index:9999}

/* form (height reduced ~40px total visual) */
.dafmp-search__form{
display:flex;align-items:center;gap:8px;
padding:6px 8px 6px 14px; /* reduced */
border:1px solid rgba(24,37,63,.08);
border-radius:14px;
background:rgba(255,255,255,.96);
box-shadow:0 12px 32px rgba(16,24,40,.10);
backdrop-filter:blur(8px)
}

/* input area */
.dafmp-search__field-wrap{position:relative;display:flex;align-items:center;flex:1 1 auto;min-width:0}

/* INPUT HEIGHT REDUCED */
.dafmp-search__input{
width:100%;min-width:0;
height:42px; /* was 54px */
padding:0 38px 0 2px;
border:0;outline:0;background:transparent;
color:#18253f;
font-size:.95rem;
font-weight:500;
line-height:1.3;
box-shadow:none
}

.dafmp-search__input::placeholder{color:#7a8597;opacity:1}
.dafmp-search__input:focus,.dafmp-search__input:active{border:0;outline:0;box-shadow:none}

/* clear button */
.dafmp-search__clear{
position:absolute;top:50%;right:0;
display:inline-flex;align-items:center;justify-content:center;
width:30px;height:30px; /* smaller */
padding:0;border:0;border-radius:8px;
background:transparent;color:#667085;
cursor:pointer;transform:translateY(-50%);
transition:background-color .2s ease,color .2s ease
}

.dafmp-search__clear:hover,.dafmp-search__clear:focus{background:#f2f4f7;color:#18253f}
.dafmp-search__clear svg{width:16px;height:16px;display:block}

/* submit button (height reduced) */
.dafmp-search__btn{
display:inline-flex;align-items:center;justify-content:center;
flex:0 0 auto;
width:42px;height:42px; /* was 54px */
padding:0;border:0;border-radius:10px;
background:#89ab4f;color:#fff;
cursor:pointer;
transition:transform .2s ease,box-shadow .2s ease,background-color .2s ease;
box-shadow:0 10px 20px rgba(137,171,79,.22)
}

.dafmp-search__btn:hover,.dafmp-search__btn:focus{
background:#7c9b46;
transform:translateY(-1px);
box-shadow:0 12px 24px rgba(124,155,70,.28)
}

.dafmp-search__btn:focus-visible{outline:2px solid #2f4a1e;outline-offset:2px}
.dafmp-search__btn svg{display:block;width:18px;height:18px}

/* 🔥 DROPDOWN FIX (IMPORTANT) */
.dafmp-search__results{
position:absolute;
top:calc(100% + 8px);
left:0;
width:100%;
border:1px solid rgba(24,37,63,.08);
border-radius:14px;
background:#fff;
box-shadow:0 25px 60px rgba(16,24,40,.18);

/* CRITICAL FIX */
z-index:99999; /* force front */
isolation:isolate; /* prevent stacking bugs */
}

.dafmp-search__results[hidden]{display:none}
.dafmp-search__results-inner{max-height:420px;overflow:auto}

/* status */
.dafmp-search__status{padding:16px 18px;color:#667085;font-size:.9rem;font-weight:500}
.dafmp-search__status[hidden]{display:none}

/* list */
.dafmp-search__items{display:flex;flex-direction:column}
.dafmp-search__item{
display:flex;align-items:flex-start;gap:12px;
padding:12px 14px;
text-decoration:none;background:#fff;
border-bottom:1px solid #eef2f6;
transition:background-color .18s ease
}

.dafmp-search__item:last-child{border-bottom:0}
.dafmp-search__item:hover,.dafmp-search__item:focus{background:#f8fafc}

/* thumb */
.dafmp-search__thumb{
flex:0 0 56px;width:56px;height:56px;
border-radius:10px;overflow:hidden;background:#f3f5f7
}

.dafmp-search__thumb img{display:block;width:100%;height:100%;object-fit:cover}

.dafmp-search__thumb--placeholder{
display:flex;align-items:center;justify-content:center;
color:#98a2b3;font-size:.75rem;font-weight:700
}

/* content */
.dafmp-search__meta{flex:1 1 auto;min-width:0}

.dafmp-search__topline{
display:flex;align-items:center;justify-content:space-between;
gap:8px;margin-bottom:4px
}

.dafmp-search__title{
margin:0;color:#18253f;
font-size:.95rem;font-weight:700;
line-height:1.3;word-break:break-word
}

.dafmp-search__price{
flex:0 0 auto;color:#89ab4f;
font-size:.88rem;font-weight:700;
white-space:nowrap
}

.dafmp-search__type{
display:inline-flex;align-items:center;
padding:3px 7px;border-radius:999px;
background:#f3f7ec;color:#5e7d2f;
font-size:.68rem;font-weight:700;
line-height:1;text-transform:capitalize
}

.dafmp-search__excerpt{
margin:6px 0 0;
color:#667085;font-size:.82rem;line-height:1.4
}

/* responsive */
@media (max-width:782px){
.dafmp-search__form{padding:6px 6px 6px 12px;border-radius:12px}
.dafmp-search__input{height:40px}
.dafmp-search__btn{width:40px;height:40px}
}

@media (max-width:640px){
.dafmp-search__form{gap:6px;padding:5px 5px 5px 10px}
.dafmp-search__input{height:38px;padding-right:34px}
.dafmp-search__clear{width:28px;height:28px}
.dafmp-search__btn{width:38px;height:38px}
}