/**
 * Live Search Suggestions Styles
 */

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-top: 8px;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
}

.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #666;
    gap: 10px;
}

.search-no-results {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #999;
    gap: 10px;
    flex-direction: column;
}

.search-no-results i {
    font-size: 2rem;
    color: #ccc;
}

.search-suggestion {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover {
    background-color: #f8f8f8;
}

.search-suggestion:active {
    background-color: #f0f0f0;
}

/* Search icon wrapper for "Buscar para" option */
.search-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-icon-wrapper i {
    font-size: 1.2rem;
    color: #007bff;
}

/* Product suggestion */
.product-suggestion {
    gap: 12px;
}

.suggestion-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
}

.suggestion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggestion-details {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggestion-size {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 4px;
}

.suggestion-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.price-regular {
    font-weight: 600;
    color: #333;
}

.price-original {
    text-decoration: line-through;
    color: #999;
    font-size: 0.8rem;
}

.price-discount {
    font-weight: 600;
    color: #333;
}

.live-discount-badge {
    background: #FFD600;
    color: #333;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 4px;
    white-space: nowrap;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .search-suggestions {
        margin-top: 4px;
        border-radius: 8px;
    }
    
    .search-suggestion {
        padding: 10px;
    }
    
    .suggestion-image {
        width: 45px;
        height: 45px;
    }
}

/* Ensure suggestions appear above other content */
.search-wrapper {
    position: relative;
    z-index: 100;
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-suggestions {
    animation: slideDown 0.2s ease-out;
}