/**
 * Custom Search Autocomplete Styles
 *
 * @category  Warehouse
 * @package   Warehouse_Theme
 */

/* Autocomplete Dropdown */
.search-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 500px;
    overflow-y: auto;
    display: none;
    margin-top: -1px;
}

.search-autocomplete-dropdown.show {
    display: block;
}

/* Autocomplete List */
.autocomplete-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.autocomplete-item {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

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

.autocomplete-item a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    gap: 12px;
}

.autocomplete-item a:hover {
    color: #333;
}

/* Autocomplete Image */
.autocomplete-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Autocomplete Info */
.autocomplete-info {
    flex: 1;
    min-width: 0;
}

.autocomplete-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.4;
}

.autocomplete-name strong {
    color: #A51E23;
    font-weight: 700;
}

.autocomplete-price-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.autocomplete-price {
    font-size: 14px;
    font-weight: 700;
    color: #A51E23;
}

.autocomplete-price-special {
    font-size: 14px;
    font-weight: 700;
    color: #A51E23;
}

.autocomplete-price-old {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

/* Loading State */
.autocomplete-loading {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.autocomplete-loading:before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #A51E23;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Results State */
.autocomplete-no-results {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Error State */
.autocomplete-error {
    padding: 20px;
    text-align: center;
    color: #d32f2f;
    font-size: 14px;
}

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

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

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

.search-autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: #7a1619;
}

/* Firefox scrollbar */
.search-autocomplete-dropdown {
    scrollbar-width: thin;
    scrollbar-color: #A51E23 #f5f5f5;
}

