/* Product Search Styles */

/* Product Search Section */
.product-search-section {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 2rem;
    margin-top: 2rem;
    border: 1px solid #e9ecef;
}

.search-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    max-width: 600px;
}

.product-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.product-search-input:focus {
    outline: none;
    border-color: #749D47;
    box-shadow: 0 0 0 3px rgba(116, 157, 71, 0.1);
}

.search-clear-btn {
    padding: 0.75rem 1rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.search-clear-btn:hover {
    background: #5a6268;
}

.search-results-info {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #e7f3e0;
    border-radius: 4px;
    font-size: 14px;
    color: #2d5016;
}

/* Filtered products container */
#filtered-products-container {
    margin-top: 1rem;
}

#filtered-products-container .table-header {
    padding: 1rem;
    border-radius: 4px 4px 0 0;
    border: 1px solid #dee2e6;
}

.no-search-results {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.no-search-results p {
    margin: 0;
    font-size: 1.1rem;
    color: #6c757d;
}

/* Search result accordions */
.search-result-accordion {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: white;
    transition: box-shadow 0.3s ease;
}

.search-result-accordion:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    gap: 1.5rem;
}

.accordion-header .product-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.accordion-header .no-image {
    font-size: 24px;
    color: #6c757d;
}

.accordion-header .product-info {
    flex: 1;
    min-width: 0;
}

.product-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-price {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stock-status {
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.stock-status.in-stock {
    background: #d4edda;
    color: #155724;
}

.stock-status.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.product-actions {
    flex-shrink: 0;
}

.view-product {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #749D47;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.view-product:hover {
    background: #37612F;
    color: white;
    text-decoration: none;
}

.wavelength-filter-section {
    padding: 1.5rem;
    background: #f7f7f7;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.filter-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: #333;
}

.input-group input,
.input-group select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-actions .button {
    padding: 0.5rem 1rem;
    background: #749D47;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-actions .button:hover {
    background: #37612F;
}

.reset-filter {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.reset-filter:hover {
    text-decoration: underline;
}

.active-filters {
    padding: 1rem;
    background: #edf7ed;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.filter-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: white;
    border-radius: 4px;
    margin: 0 0.5rem;
    font-size: 0.9rem;
}

.no-products-message {
    text-align: center;
    padding: 40px 20px;
    margin: 20px 0;
}

.no-products-message p {
    margin-bottom: 20px;
    font-size: 18px;
}

.no-products-message .standard-button {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
}

@media (max-width: 768px) {
    .product-search-section {
        padding: 1rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-clear-btn {
        width: 100%;
    }
    
    /* Responsive accordion headers */
    .accordion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .accordion-header .product-image {
        width: 60px;
        height: 60px;
        align-self: center;
    }
    
    .accordion-header .product-info {
        text-align: center;
    }
    
    .product-actions {
        align-self: center;
    }
    
    .filter-inputs {
        gap: 0.75rem;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-actions .button {
        width: 100%;
    }
}