/* Search Autocomplete Styles */
.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.search-autocomplete .autocomplete-results {
    padding: 8px 0;
}

.search-autocomplete .autocomplete-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-autocomplete .autocomplete-item:hover,
.search-autocomplete .autocomplete-item.active {
    background-color: #f8f9fa;
}

.search-autocomplete .autocomplete-item a {
    color: inherit;
    text-decoration: none;
}

.search-autocomplete .autocomplete-item a:hover {
    color: inherit;
    text-decoration: none;
}

.search-autocomplete .item-title {
    font-weight: 500;
    line-height: 1.2;
    font-size: 16px;
}

.search-autocomplete .item-category {
    font-size: 11px;
    line-height: 1.2;
}

.search-autocomplete .item-price {
    font-size: 12px;
    line-height: 1.2;
}

.search-autocomplete .no-results {
    padding: 16px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

/* Badge styles */
.search-autocomplete .badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-autocomplete {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        max-height: 60vh;
        border: 1px solid #e5e7eb;
        border-bottom: none;
    }
    
    .search-autocomplete .autocomplete-item a {
        padding: 16px !important;
    }
    
    .search-autocomplete .item-image img {
        width: 50px !important;
        height: 50px !important;
    }
}

/* Loading state */
.search-autocomplete.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Scrollbar styling */
.search-autocomplete::-webkit-scrollbar {
    width: 6px;
}

.search-autocomplete::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-autocomplete::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-autocomplete::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
