/* Universal Search Dropdown Styles */
.search-suggestions {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e8ebe9;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(127, 169, 155, 0.15);
    z-index: 1000;
    max-height: 500px;
    overflow-y: auto;
    display: none;
}

.search-suggestions.show {
    display: block;
    animation: dropdownSlideIn 0.2s ease;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-suggestion {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
    border-bottom: 1px solid #f5f7f6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-suggestion:last-child {
    border-bottom: none;
}

.product-suggestion:hover,
.product-suggestion.selected {
    background: linear-gradient(135deg, #f0f4f2, #c5d6ce);
    transform: translateX(4px);
    border-left: 4px solid #7fa99b;
}

.product-suggestion .product-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e8ebe9;
    flex-shrink: 0;
}

.product-suggestion .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-suggestion .product-info {
    flex: 1;
}

.product-suggestion .product-name {
    font-weight: 600;
    color: #2f3e36;
    margin-bottom: 4px;
    font-size: 16px;
}

.product-suggestion .product-category {
    font-size: 12px;
    color: #93a099;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-suggestion .product-price {
    font-weight: 700;
    color: #7fa99b;
    font-size: 15px;
}

.highlight {
    background: linear-gradient(135deg, rgba(127, 169, 155, 0.3), rgba(127, 169, 155, 0.2));
    color: #6a8f81;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
}

.search-clear {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #b4bcb8;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-clear.visible {
    opacity: 1;
    visibility: visible;
}

.search-clear:hover {
    background: #e8ebe9;
    color: #728078;
}

.search-loading,
.search-error {
    padding: 20px;
    text-align: center;
    color: #93a099;
    font-size: 14px;
}

/* Ensure parent containers have proper positioning */
.search-form-container {
    position: relative;
}

/* Scrollbar styling for dropdown */
.search-suggestions::-webkit-scrollbar {
    width: 8px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: #f5f7f6;
    border-radius: 4px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: #c5d6ce;
    border-radius: 4px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #9bbdb0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .search-suggestions {
        max-height: 400px;
    }
    
    .product-suggestion {
        padding: 12px 15px;
    }
    
    .product-suggestion .product-image {
        width: 50px;
        height: 50px;
    }
    
    .product-suggestion .product-name {
        font-size: 14px;
    }
    
    .product-suggestion .product-price {
        font-size: 14px;
    }
}