/* Modern Search Autocomplete - Trendyol Style */
.search-autocomplete-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    max-height: 500px;
    overflow-y: auto;
    z-index: 9999;
    animation: searchFadeIn 0.2s ease;
}

@keyframes searchFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-section {
    padding: 8px 0;
}

.search-section + .search-section {
    border-top: 1px solid #f0f0f0;
}

.search-section-title {
    padding: 12px 16px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-section-title i {
    font-size: 0.85rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    transition: background 0.15s ease;
    cursor: pointer;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 8px;
    flex-shrink: 0;
}

.search-item-icon i {
    font-size: 1.1rem;
    color: #666;
}

.search-item-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-item-content {
    flex: 1;
    min-width: 0;
}

.search-item-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-item-title mark {
    background: #fff3cd;
    color: #333;
    font-weight: 600;
    padding: 0;
    border-radius: 2px;
}

.search-item-content .text-muted {
    font-size: 0.8rem;
    color: #999;
}

.search-item-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color, #ff6000);
    flex-shrink: 0;
}

.search-footer {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
}

.search-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary-color, #ff6000);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.search-view-all:hover {
    background: var(--primary-color, #ff6000);
    color: #fff;
}

.search-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.search-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.3;
}

.search-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Badge styling */
.search-result-item .badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
}

/* Scrollbar styling */
.search-autocomplete-results::-webkit-scrollbar {
    width: 6px;
}

.search-autocomplete-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-autocomplete-results::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.search-autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .search-autocomplete-results {
        max-height: 400px;
        border-radius: 8px;
    }

    .search-item-image {
        width: 40px;
        height: 40px;
    }

    .search-item-title {
        font-size: 0.85rem;
    }

    .search-item-price {
        font-size: 0.85rem;
    }
}
