/**
 * TwoPixels Smart Search - Frontend CSS
 * Version 1.1.0
 * (c) TwoPixels - Webagentur | https://webagentur-twopixels.de
 */

/* Dropdown Container */
.tp-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-height: 480px;
    overflow-y: auto;
    margin-top: 4px;
}

/* Sektionen */
.tp-search-section {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.tp-search-section:last-of-type {
    border-bottom: none;
}

.tp-search-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    padding: 8px 16px 4px;
}

/* Items */
.tp-search-item {
    transition: background 0.15s ease;
}

.tp-search-item a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #1f2937;
    gap: 12px;
}

.tp-search-item:hover,
.tp-search-item--active {
    background: #f3f4f6;
}

/* Produkt-Item */
.tp-search-item--product a {
    align-items: flex-start;
}

.tp-search-item-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: #f9fafb;
    flex-shrink: 0;
}

.tp-search-item-content {
    flex: 1;
    min-width: 0;
}

.tp-search-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tp-search-item-name mark {
    background: #fef08a;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.tp-search-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #059669;
    margin-top: 4px;
}

/* Kategorie-Item */
.tp-search-item--category a {
    font-size: 14px;
}

.tp-search-cat-icon {
    font-size: 16px;
    opacity: 0.6;
}

/* Beliebte Suchen */
.tp-search-item--popular a {
    font-size: 14px;
}

.tp-search-popular-icon {
    font-size: 14px;
}

/* Keine Ergebnisse */
.tp-search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: #6b7280;
    text-align: center;
}

.tp-search-no-results-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Footer */
.tp-search-footer {
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 0 0 8px 8px;
}

.tp-search-all-link {
    display: block;
    text-align: center;
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.tp-search-all-link:hover {
    color: #5a67d8;
}

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

.tp-search-dropdown::-webkit-scrollbar-track {
    background: #f3f4f6;
}

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

.tp-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Mobile Anpassungen */
@media (max-width: 768px) {
    .tp-search-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        margin-top: 0;
    }

    .tp-search-item a {
        padding: 12px 16px;
    }

    .tp-search-item-img {
        width: 56px;
        height: 56px;
    }
}
