/* Live Search Styles */
.live-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.live-search-dropdown.live-search-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Search Items */
.live-search-item {
    border-bottom: 1px solid #f3f4f6;
}

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

.live-search-item.selected {
    background-color: #f8fafc;
}

.live-search-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #374151;
    transition: background-color 0.15s ease;
}

.live-search-link:hover,
.live-search-item.selected .live-search-link {
    background-color: #f8fafc;
    color: #1f2937;
}

/* Product Image */
.live-search-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    background: #f9fafb;
    padding: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}

.live-search-image-placeholder {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Content */
.live-search-content {
    flex: 1;
    min-width: 0;
}

.live-search-name {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    color: #1f2937;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-search-category {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.live-search-highlight {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
    padding: 1px 2px;
    border-radius: 2px;
}

/* Price */
.live-search-price {
    font-size: 14px;
    font-weight: 600;
    color: #1d4ed8;
    margin-left: 12px;
    flex-shrink: 0;
}

/* Footer */
.live-search-footer {
    border-top: 1px solid #e5e7eb;
    padding: 8px;
}

.live-search-view-all {
    display: block;
    text-align: center;
    padding: 8px 12px;
    color: #1d4ed8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.live-search-view-all:hover {
    background-color: #eff6ff;
    color: #1e40af;
}

/* No Results */
.live-search-no-results {
    text-align: center;
    padding: 24px 16px;
    color: #6b7280;
}

.live-search-no-results p {
    margin: 8px 0;
    font-size: 14px;
}

/* Loading State */
.live-search-loading {
    text-align: center;
    padding: 16px;
    color: #6b7280;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .live-search-dropdown {
        left: -8px;
        right: -8px;
        max-height: 300px;
    }
    
    .live-search-link {
        padding: 10px 12px;
    }
    
    .live-search-image,
    .live-search-image-placeholder {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }
    
    .live-search-name {
        font-size: 13px;
    }
    
    .live-search-category {
        font-size: 11px;
    }
    
    .live-search-price {
        font-size: 13px;
    }
}

/* Container Positioning */
.hero form {
    position: relative;
}

/* Smooth scrolling for keyboard navigation */
.live-search-dropdown {
    scroll-behavior: smooth;
}

.live-search-item.selected {
    scroll-margin: 8px;
}

/* Focus styles */
.live-search-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

/* Animation for results */
.live-search-item {
    animation: slideInDown 0.15s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}