/* Search Modal Styling - Dropdown Style */
.search-dropdown-wrapper {
    position: relative;
}

.search-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 100%;
    max-width: 800px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: white;
    margin-top: 8px;
    display: none;
    z-index: 1050;
}

.search-dropdown-menu.show {
    display: block;
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    /* border-bottom: 1px solid #e0e0e0; */
}

.search-modal-header h5 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-modal-header .trending-icon {
    color: #16a64f;
    font-size: 18px;
}

.search-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-modal-close:hover {
    color: #666;
}

.search-modal-body {
    padding: 8px 20px;
    max-height: 320px;
    overflow-y: auto;
}

.trending-items-container {
    margin-bottom: 0;
}

.trending-items-title {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-bottom: 12px;
}

.trending-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trending-item {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.trending-item:hover {
    background: #e0e0e0;
    color: #16a64f;
    text-decoration: none;
}

.search-results-container {
    max-height: none;
    overflow-y: visible;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border: 0.5px solid rgba(224, 224, 224, 0.4);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
    box-shadow: 0 0 3px rgba(22, 166, 79, 0.1);
}

.search-result-item:hover {
    /* border-color: #16a64f; */
    transform: scale(1.05);
}

.search-result-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 16px;
    flex-shrink: 0;
}

.search-result-details {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-price {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #16a64f;
    font-weight: 600;
}

.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

/* Hide default typeahead dropdown */
.typeahead.dropdown-menu {
    display: none !important;
}

/* Loading state */
.search-loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.search-loading i {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrollbar styling */
.search-modal-body::-webkit-scrollbar {
    width: 6px;
}

.search-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.search-modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.search-modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .search-dropdown-menu {
        max-width: 95vw;
        left: 50%;
        right: auto;
        width: 85vw;
        transform: translateX(-50%);
    }
    
    .search-modal-body {
        max-height: 60vh;
    }
    
    .search-result-image {
        width: 60px;
        height: 60px;
    }
    
    .search-result-name {
        font-size: 14px;
    }
    
    .search-result-price {
        font-size: 13px;
    }
    
    .trending-items {
        gap: 6px;
    }
    
    .trending-item {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .search-modal-body {
        padding: 16px;
        max-height: 400px;
    }
}
