/* ============================================
   search.css — Live Search Suggestions Dropdown
   ============================================ */

/* Wrapper that gives the input + dropdown a shared stacking context */
.search-bar-wrap {
    position: relative;
    width: 100%;
}

/* The dropdown panel itself */
.search-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 2000;
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    /* Smooth open/close */
    animation: suggestions-fade-in 0.18s ease;
}

@keyframes suggestions-fade-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Mobile search dropdown sits below the search bar strip */
#mobileSearchSuggestions {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin: 8px 0 0;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
}

/* Individual suggestion row */
.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #F3F4F6;
}
.suggestion-item:last-child {
    border-bottom: none;
}
.suggestion-item:hover,
.suggestion-item:focus {
    background-color: #F3F4F6;
    outline: none;
}

/* Thumbnail */
.suggestion-thumb {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 8px;
    object-fit: cover;
    background-color: #F8F8F8;
    border: 1px solid #E5E7EB;
}

/* Text block */
.suggestion-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.suggestion-name {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.suggestion-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.suggestion-price {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #10B981;
    direction: ltr;
}
.suggestion-model-badge {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
    background-color: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    padding: 1px 6px;
    letter-spacing: 0.4px;
}

/* Empty / error state */
.suggestion-empty {
    padding: 20px 16px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #9CA3AF;
}

/* Scrollbar inside the dropdown */
.search-suggestions-dropdown {
    scrollbar-width: thin;
    scrollbar-color: #E5E7EB transparent;
}
.search-suggestions-dropdown::-webkit-scrollbar {
    width: 5px;
}
.search-suggestions-dropdown::-webkit-scrollbar-thumb {
    background-color: #D1D5DB;
    border-radius: 10px;
}
