/* ============================================
   PRODUCT SEARCH STYLES
   Search functionality for products
   ============================================ */

.product-search-section {
    padding: 40px 20px 20px;
    background: #f8f9fa;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #ddd;
    border-radius: 50px;
    padding: 12px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-box:focus-within {
    border-color: var(--primary-color, #8B4513);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
}

.search-box i.fa-search {
    color: #999;
    margin-right: 12px;
    font-size: 18px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
}

.search-box input::placeholder {
    color: #999;
}

.clear-search {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search:hover {
    color: #dc3545;
}

.clear-search i {
    font-size: 16px;
}

.search-results-count {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.search-results-count span {
    font-weight: 600;
    color: var(--primary-color, #8B4513);
}

/* Product card states */
.product-card {
    transition: all 0.3s ease;
}

.product-card.hidden {
    display: none;
}

.product-card.highlight {
    animation: highlight 0.5s ease;
}

@keyframes highlight {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* No results message */
.no-results-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results-message i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
    display: block;
}

.no-results-message h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.no-results-message p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.no-results-message .btn {
    display: inline-block;
    margin-top: 10px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .product-search-section {
        padding: 30px 15px 15px;
    }
    
    .search-box {
        padding: 10px 16px;
    }
    
    .search-box input {
        font-size: 14px;
    }
    
    .search-box i.fa-search {
        font-size: 16px;
        margin-right: 10px;
    }
}

/* Search suggestions (optional enhancement) */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 12px 12px;
    margin-top: -2px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.search-suggestion-item:hover {
    background: #f8f9fa;
}

.search-suggestion-item i {
    color: #999;
    margin-right: 10px;
}

/* Loading state */
.search-box.loading::after {
    content: '';
    position: absolute;
    right: 20px;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color, #8B4513);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
