.autopartspro-search-widget {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.autopartspro-search-container {
    max-width: 1200px;
    margin: 0 auto;
}

.autopartspro-search-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.autopartspro-search-form {
    margin-bottom: 20px;
}

.autopartspro-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.autopartspro-form-group {
    flex: 1;
    min-width: 200px;
}

.autopartspro-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 15px;
    text-align: left;
    margin-left: 2%;
}

.autopartspro-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s;
}

.autopartspro-select:hover:not(:disabled) {
    border-color: #999;
}

.autopartspro-select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.autopartspro-form-group-button {
    flex: 0 0 auto;
    min-width: auto;
}

.autopartspro-search-btn {
    padding: 10px 30px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.autopartspro-search-btn:hover:not(:disabled) {
    background-color: #0056b3;
}

.autopartspro-search-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.autopartspro-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.autopartspro-results {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.autopartspro-results-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.autopartspro-results-header h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.autopartspro-products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.autopartspro-product-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    transition: box-shadow 0.3s;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.autopartspro-product-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.autopartspro-product-image {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 4px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.autopartspro-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.autopartspro-product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    min-height: 48px;
    flex-grow: 0;
}

.autopartspro-product-name a {
    color: #333;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.autopartspro-product-name a:hover {
    color: #007bff;
    text-decoration: underline;
}

.autopartspro-product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
    min-height: 42px;
}

.autopartspro-product-price {
    font-size: 20px;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 15px;
}

.autopartspro-product-button {
    margin-top: auto;
}

.autopartspro-view-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.autopartspro-view-btn:hover {
    background-color: #0056b3;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 768px) {
    .autopartspro-form-row {
        flex-direction: column;
    }
    
    .autopartspro-form-group {
        min-width: 100%;
    }
    
    .autopartspro-search-btn {
        width: 100%;
    }
    
    .autopartspro-products-list {
        grid-template-columns: 1fr;
    }
}

