/* Search Autocomplete Dropdown */
#search_autocomplete .search-ac-dropdown {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 420px;
    overflow-y: auto;
}

/* Section Headers */
.search-ac-section-header {
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    background: #f8f8f8;
    border-top: 1px solid #eee;
    cursor: default;
}

.search-ac-section-header:first-child {
    border-top: none;
}

/* Product Item */
.search-ac-item {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.search-ac-item:hover,
.search-ac-item.selected {
    background-color: #f0f7f5;
}

.search-ac-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    gap: 12px;
}

/* Thumbnail */
.search-ac-image {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
}

.search-ac-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.search-ac-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.search-ac-name {
    font-size: 14px;
    color: #333;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-ac-name strong {
    color: #215E4D;
    font-weight: 700;
}

/* Badges */
.search-ac-badges {
    display: flex;
    gap: 4px;
}

.search-ac-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 1px 6px;
    border-radius: 3px;
    line-height: 1.5;
}

.search-ac-badge-sale {
    background: #ff4444;
    color: #fff;
}

.search-ac-badge-new {
    background: #6ecdb2;
    color: #fff;
}

/* Pricing */
.search-ac-price {
    font-size: 13px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.search-ac-price-regular {
    color: #333;
    font-weight: 600;
}

.search-ac-price-old {
    color: #999;
    text-decoration: line-through;
    font-size: 12px;
}

.search-ac-price-special {
    color: #d32f2f;
    font-weight: 600;
}

/* Extra Attributes */
.search-ac-attrs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.search-ac-attr {
    font-size: 11px;
    color: #888;
    background: #f0f0f0;
    padding: 1px 5px;
    border-radius: 2px;
}

/* Recent Search Item */
.search-ac-recent-search {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    gap: 10px;
}

.search-ac-search-icon {
    flex-shrink: 0;
    color: #999;
    display: flex;
    align-items: center;
}

.search-ac-recent-text {
    font-size: 14px;
    color: #555;
}

/* No Results */
.search-ac-no-results {
    padding: 16px 14px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #search_autocomplete .search-ac-dropdown {
        max-height: 60vh;
        border-radius: 0;
    }

    .search-ac-link {
        padding: 8px 10px;
    }

    .search-ac-image {
        width: 40px;
        height: 40px;
    }

    .search-ac-name {
        font-size: 13px;
    }

    .search-ac-price {
        font-size: 12px;
    }
}
